-
-
Save jmkim/5ea776d4ccdbddddea2153085f529831 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. | |
# Original by Doowon Kim (Doowon): https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd | |
# Edited by Phil Chiu (whophil) and WesternGun (WesternGun): | |
# https://gist.github.com/whophil/5a2eab328d2f8c16bb31c9ceaf23164f | |
# Edited by Jongmin Kim (kdzlvaids): https://gist.github.com/kdzlvaids/5ea776d4ccdbddddea2153085f529831 | |
[Unit] | |
Description=Jupyter Notebook | |
[Service] | |
Type=simple | |
PIDFile=/run/jupyter.pid | |
ExecStart=/bin/bash -c "/opt/anaconda3/bin/jupyter notebook --config=/home/notebook/.jupyter/jupyter_notebook_config.py --debug > /home/notebook/log/jupyter/notebook-$(date +%Y%m%d-%H%M%S-%N).log 2>&1" | |
User=notebook | |
Group=notebook | |
WorkingDirectory=/home/notebook | |
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