Last active
February 3, 2019 15:14
-
-
Save theone4ever/230dff45a01a8ecc7dd331f84d3cafc9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| [Unit] | |
| Description=Jupyter Notebook | |
| [Service] | |
| Type=simple | |
| PIDFile=/run/jupyter.pid | |
| # Step 1 and Step 2 details are here.. | |
| # ------------------------------------ | |
| #Note: `workon tf` is to switch to tf virtualenv where i have jupyter installed | |
| ExecStart=/bin/bash -c 'cd /home/keven/notebooks && source /home/keven/.profile && workon tf && jupyter notebook' | |
| User=keven | |
| Group=keven | |
| WorkingDirectory=/home/keven/notebooks | |
| Restart=always | |
| RestartSec=10 | |
| #KillMode=mixed | |
| [Install] | |
| WantedBy=multi-user.target |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create this file under
/usr/lib/systemd/system/jupyter.serviceThen execute
sudo systemctl enable jupyter.serviceReload the systemd daemona and restart the service
sudo systemctl daemon-reloadsudo systemctl restart jupyter.service