-
-
Save whophil/5a2eab328d2f8c16bb31c9ceaf23164f to your computer and use it in GitHub Desktop.
A systemd script for running a Jupyter notebook server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py | |
User=phil | |
Group=phil | |
WorkingDirectory=/home/phil/Notebooks/ | |
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
If you need environment variables for Tensorflow GPU work, and .bashrc usually does the job for you, you need to somehow make those available to the Jupyter service, or else Notebooks that need the GPU won't be able to see it.
Not sure this is the best way, but it's the way I got it to work: