Back to Module 3 | Back to Table of Contents
JupyterLab is a modern interactive data science and development environment that supports the simultaneous operation of codes in browsers, viewing data, editing documents and building interactive visualization. It is an upgraded version of Jupyter Notebook, which provides a more flexible multi-label layout, a richer ecology of plugins, and support for multiple programming languages, and is well suited for data analysis, machine learning, scientific computing and teaching.
Open the Jetson terminal and execute the installation command
# Update `pip3` to the latest version
pip3 install --upgrade pip
# Install or update JupyterLab
pip3 install jupyter jupyterlabOnce installed, it's under the ~https://download.docker.com/linux/ubuntu/dists/ path
Add local/bin to the environment variable
nano ~/.bashrc
# Add the following at the end
export PATH="$HOME/.local/bin:$PATH"
# Press Ctrl + X to save
# Update the environment variables
source ~/.bashrcGenerate Profile
# Running the following command creates a `jupter_lab_config.py` file in the `.jupyter` directory
jupyter lab --generate-configEdit Profile
# sudo vim /home/seeed/.jupyter/jupyter_lab_config.pyWrite the following:
NotebookApp.ip = '0.0.0.0' # Allow remote access
NotebookApp.port = 8888 # Port number
NotebookApp.open_browser = False # Do not open the browser automatically
NotebookApp.token = '' # Disable token authentication
NotebookApp.password = '' # Disable password authentication
NotebookApp.allow_remote_access = True # Allow remote accessPress Esc to enter: wq! Force save exit.
Set on startup
Enter the following command in the jetson terminal to determine the location of the jupyter-lab installation
which jupyter-labCreate jupyter.service
sudo vim /etc/systemd/system/jupyter.serviceWrite the following:
[Unit]
Description=JupyterLab
After=network.target
[Service]
Type=simple
User=lrhan
Group=lrhan
WorkingDirectory=/home/lrhan
ExecStart=/home/lrhan/.local/bin/jupyter-lab --ip=0.0.0.0 --port=8888 --no-browser
Restart=always
Environment="PATH=/home/seeed/.local/bin:/usr/bin:/bin"
[Install]
WantedBy=multi-user.targetRestart the Jupyter service to make the new configuration effective
# Stop Jupyter-related processes
pkill -9 -f jupyter
# Restart the Jupyter service
sudo systemctl restart jupyterOpen a terminal on Jetson to run JupyterLab
jupyter labAuto-open browser running Jupyter service after running
If you want to access the Jepyter service remotely from another computer, you can open the following links in the remote computer browser:
http://<jetson_ip>:8888/labof which is the ip address of the jetson device in the local area network.






