Skip to content

Instantly share code, notes, and snippets.

@bachkukkik
Last active June 30, 2020 07:42
Show Gist options
  • Save bachkukkik/33f57e2f47743d1c44c84873c5edca1b to your computer and use it in GitHub Desktop.
Save bachkukkik/33f57e2f47743d1c44c84873c5edca1b to your computer and use it in GitHub Desktop.
Linux : jupyter self restart
#### cat /etc/systemd/system/jupyter_self_restart.service
[Unit]
Description= pi_kk start Jupyter Notebook on system boot
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/pi/.local/bin/jupyter-notebook --config=/home/pi/.jupyter/jupyter_notebook_config.py
User=pi
Group=pi
WorkingDirectory=/home/pi/My_GitHub_Repo
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment