Skip to content

Instantly share code, notes, and snippets.

@toancong
Last active March 29, 2018 04:58
Show Gist options
  • Save toancong/cf4688fe1de7ea319e02f4c1df63be2c to your computer and use it in GitHub Desktop.
Save toancong/cf4688fe1de7ea319e02f4c1df63be2c to your computer and use it in GitHub Desktop.
[Unit]
Description=Jupyter Notebook
[Service]
PIDFile=/run/jupyter.pid
ExecStart=/usr/local/bin/jupyter notebook --ip=0.0.0.0 --allow-root --notebook-dir /home/ai/Documents
User=ai
Group=ai
WorkingDirectory=/home/ai/Documents
Restart=always
RestartSec=10
IgnoreSIGPIPE=false
KillMode=process
Environment=PATH=/usr/local/cuda-9.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Environment=LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda/extras/CUPTI/lib64
[Install]
WantedBy=multi-user.target
@toancong
Copy link
Author

Use these command for control service

sudo systemctl daemon-reload
sudo systemctl restart jupyter
sudo systemctl enable jupyter
sudo systemctl status jupyter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment