Welcome to Jetson ORIN NANO SUPER repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
03.Use Jupyter Lab
Use Jupyter Lab
Use Jupyter Lab1. Jupyter Lab installation1.1. Jupyter Lab1.2、Node.js2. Jupyter Lab startup2.1. Set the default browser2.2. Start Jupyter Lab2.3. Host access3. Jupyter Lab configuration3.1. LAN access3.1.1, create a configuration file3.1.2, modify the configuration file3.2, Configure access password3.3, Start the service automatically at boot3.3.1, Edit the service file3.3.2, set up the self-start serviceStartup service automaticallyStart serviceCheck service statusVerify startup4. Use Jupyter Lab4.1. Kernel4.2. Run the program4.2.1. Running4.2.2. Running completed
1. Jupyter Lab installation
1.1. Jupyter Lab
Use the following command to install Jupyter Lab: If the download speed of Jupyter Lab is slow, you can use the specified source to install it
sudo apt updatesudo apt install python3-pip -ysudo pip3 install --upgrade pip
xxxxxxxxxxsudo pip3 install jupyterlab# Tsinghua source: pip3 install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple# Alibaba Cloud source: sudo pip3 install jupyterlab -i https://mirrors.aliyun.com/pypi/simple/


1.2、Node.js
Use the following command to install the latest Node.js:
xxxxxxxxxxsudo apt install curl -y
xxxxxxxxxxsudo curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
xxxxxxxxxxsudo apt install nodejs -y
Verify the version:
xxxxxxxxxxnode -v && npm -v

2. Jupyter Lab startup
Before starting Jupyter Lab, you need to set the system default browser, otherwise some prompts will appear when starting the terminal.
2.1. Set the default browser
Open the system Chromium browser and select Set the default browser:


2.2. Start Jupyter Lab
xxxxxxxxxxjupyter lab# Start without browser jupyter lab --no-browser# Start as administrator sudo jupyter lab --allow-root


2.3. Host access
The host refers to the Jetson motherboard system access, which can be accessed directly through http://localhost:8888/:
xxxxxxxxxxhttp://localhost:8888/

3. Jupyter Lab configuration
Configure LAN access, access password, and auto-start for Jupyter Lab.
3.1. LAN access
Device in the same LAN can be accessed by entering IP:8888 in the browser!
Note: The LAN of the campus network is generally inaccessible. You can change the laptop/mobile phone hotspot to test
xxxxxxxxxxFor example, the motherboard IP: 192.168.2.114; we can enter 192.168.2.114:8888 through the browser in the same LAN to perform Jupyter Lab on the motherboard
3.1.1, create a configuration file
xxxxxxxxxxsudo jupyter lab --generate-config
The location of the automatically generated configuration file: Writing default config to: /root/.jupyter/jupyter_lab_config.py
3.1.2, modify the configuration file
xxxxxxxxxxsudo gedit /root/.jupyter/jupyter_lab_config.py
Modified content: After modification, click Save and close the file
xxxxxxxxxx# Allow requests from any source to access the Jupyter Lab serverc.ServerApp.allow_origin = '*'# 0.0.0.0 means binding all available network interfaces and allowing access from any addressc.ServerApp.ip = '0.0.0.0'# Allow Jupyter Lab server to be started as root userc.ServerApp.allow_root = True# Modify the default port to avoid conflictsc.ServerApp.port = 8888

3.2, Configure access password
Enter the command to set the password in the terminal twice, and the input will not be displayed when entering the password!
xxxxxxxxxxsudo jupyter lab password
Automatically generated configuration file location: [JupyterPasswordApp] Wrote hashed password to /root/.jupyter/jupyter_server_config.json

3.3, Start the service automatically at boot
3.3.1, Edit the service file
xxxxxxxxxxsudo gedit /etc/systemd/system/jupyterlab.service
Add content: Click Save and close the file after adding