Skip to content

Instantly share code, notes, and snippets.

@allmwh
Forked from whophil/jupyter.service
Last active September 25, 2021 16:03
Show Gist options
  • Save allmwh/4d65925d1992c8afdcf378f701d6312f to your computer and use it in GitHub Desktop.
Save allmwh/4d65925d1992c8afdcf378f701d6312f to your computer and use it in GitHub Desktop.
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/wenlin/.pyenv/shims/jupyter-notebook --config=/home/wenlin/.jupyter/jupyter_notebook_config.py
User=wenlin
Group=wenlin
WorkingDirectory=/home/wenlin/d/coding/python
Restart=always
RestartSec=10
#KillMode=mixed
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment