Skip to content

Instantly share code, notes, and snippets.

@khangvan
Forked from minlaxz/jupyter-lab.service-systemd
Created December 22, 2020 15:18
Show Gist options
  • Select an option

  • Save khangvan/48a4df2b6e0cfb29be7ce8f2fce611c6 to your computer and use it in GitHub Desktop.

Select an option

Save khangvan/48a4df2b6e0cfb29be7ce8f2fce611c6 to your computer and use it in GitHub Desktop.

Revisions

  1. @minlaxz minlaxz revised this gist Sep 30, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jupyter-lab.service-systemd
    Original file line number Diff line number Diff line change
    @@ -18,4 +18,4 @@ RestartSec=10
    # sudo systemctl start jupyter-lab.service

    [Install]
    WantedBy=multi-user.target
    WantedBy=multi-user.target
  2. @minlaxz minlaxz revised this gist Sep 30, 2020. No changes.
  3. @minlaxz minlaxz revised this gist Sep 30, 2020. No changes.
  4. @minlaxz minlaxz renamed this gist Sep 30, 2020. 1 changed file with 0 additions and 0 deletions.
  5. @minlaxz minlaxz created this gist Sep 30, 2020.
    21 changes: 21 additions & 0 deletions jetson-nano-jupyter-lab-auto-restart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # 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