a guest Feb 16th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ## Setup jupyter notebook installed in a conda env as a system service:
- - [ ] Install jupyter from within a conda env
- - [ ] Generate a jupyter config and setup a salted password (look this up elsewhere)
- - [ ] Add the start-jupyter-serivce.sh script to the user directory.
- - [ ] Change the env name, user name, and location of jupyter-notebook executable
- - [ ] If it does not already exist, create the the necessary config directory.
- mkdir -p ~/.config/systemd/user
- - [ ] Create the service file and place it in the above directory
- - [x] Create the log file:
- mkdir -p ~/logs/jupyter
- touch ~/logs/jupyter/jupyter.log
- - [ ] Place the start-jupyter-service.sh file in the users home directory and make it executable
- chmod u+x ~/start-jupyter-service.sh
- - [ ] Run `sudo loginctl enable-linger USER_NAME`
- - [ ] Run `systemctl --user start jupyter.service`
- - [ ] Add to ~/.bashrc `export XDG_RUNTIME_DIR=/run/user/'id -u'`
RAW Paste Data