Skip to content

Instantly share code, notes, and snippets.

@minlaxz
Last active November 12, 2023 12:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save minlaxz/2124955d434c5c1c79980871c48273ba to your computer and use it in GitHub Desktop.
Save minlaxz/2124955d434c5c1c79980871c48273ba to your computer and use it in GitHub Desktop.
Jupyter lab auto start or restart ( crash or server stopped ) on nvidia jetson nano or ubuntu.
# create a file and (name your wish) , then add this content to the file.
# OR
# sudo vim /etc/systemd/system/jupyter-lab.service
# paste code below
# Esc , shift z z
[Unit]
Description=Start Jupyter Lab Server at Boot
[Service]
Type=simple
ExecStart=/home/$USER/<python_env>/bin/jupyter lab --allow-root --no-browser --config=/home/$USER/.jupyter/jupyter_notebook_config.py
WorkingDirectory=$HOME
Restart=always
RestartSec=10
# sudo systemctl enable jupyter-lab.service
# sudo systemctl start jupyter-lab.service
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment