Skip to content

Instantly share code, notes, and snippets.

@tekumara
Last active May 23, 2018 23:52
Show Gist options
  • Save tekumara/a2999e7c7333b3430ef6014f821b252f to your computer and use it in GitHub Desktop.
Save tekumara/a2999e7c7333b3430ef6014f821b252f to your computer and use it in GitHub Desktop.
systemd service for Jupyter notebook (system python w/ CUDA libraries)
[Unit]
Description=Jupyter Notebook
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/jupyter notebook
Environment="LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64"
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/
[Install]
WantedBy=multi-user.target
@tekumara
Copy link
Author

To install:

sudo wget https://gist.githubusercontent.com/tukushan/a2999e7c7333b3430ef6014f821b252f/raw/41c929be44783fe5090da6d81f3106f523e0d80f/jupyter.service -N -P /lib/systemd/system/
sudo systemctl enable jupyter.service
sudo systemctl start jupyter.service

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