Guest User

Untitled

a guest
Feb 16th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. ## Setup jupyter notebook installed in a conda env as a system service:
  2. - [ ] Install jupyter from within a conda env
  3. - [ ] Generate a jupyter config and setup a salted password (look this up elsewhere)
  4. - [ ] Add the start-jupyter-serivce.sh script to the user directory.
  5. - [ ] Change the env name, user name, and location of jupyter-notebook executable
  6. - [ ] If it does not already exist, create the the necessary config directory.
  7. ```bash
  8. mkdir -p ~/.config/systemd/user
  9. ```
  10. - [ ] Create the service file and place it in the above directory
  11. - [x] Create the log file:
  12. ```bash
  13. mkdir -p ~/logs/jupyter
  14. touch ~/logs/jupyter/jupyter.log
  15. ```
  16. - [ ] Place the start-jupyter-service.sh file in the users home directory and make it executable
  17. ```bash
  18. chmod u+x ~/start-jupyter-service.sh
  19. ```
  20. - [ ] Run `sudo loginctl enable-linger USER_NAME`
  21. - [ ] Run `systemctl --user start jupyter.service`
  22. - [ ] Add to ~/.bashrc `export XDG_RUNTIME_DIR=/run/user/'id -u'`
Add Comment
Please, Sign In to add comment