Skip to content

Instantly share code, notes, and snippets.

@xeno14
Forked from amitsaha/ipython-notebook.service
Last active November 11, 2015 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xeno14/46ee0f762fad440ed371 to your computer and use it in GitHub Desktop.
Save xeno14/46ee0f762fad440ed371 to your computer and use it in GitHub Desktop.
Run IPython notebook under systemd
# README:
# Copy this file to /usr/lib/systemd/system/
# sudo systemctl daemon-reload
# systemctl enable ipython-notebook
# systemctl start ipython-notebook
# The WorkingDirectory and ipython-dir must exist
# If you don't want anything fancy, go to http://127.0.0.1:8888 to see your notebook
# wheneber you want it
[Unit]
Description=IPython notebook
[Service]
Type=simple
PIDFile=/var/run/ipython-notebook.pid
ExecStart=/usr/bin/ipython notebook --no-browser --ipython-dir=/path/to/notebooks
User=gene
Group=gene
WorkingDirectory=/path/to/notebooks
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment