Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
Start Jupyter Server at Boot Time
How to Start Jupyter Server at boot time?
✍: FYIcenter.com
If you are sharing your Jupyter server to multiple users,
you may want to run it at boot time. So the server will be
available immediately after the computer started.
Running Jupyter server at boot time faces some challenges:
1. Jupyter server seems to be designed for non-root users. If you run it as root, you will get the following error message.
fyicenter$ sudo jupyter notebook
[E 15:56:31.172 NotebookApp] [nb_conda_kernels] couldn't call conda:
[Errno 2] No such file or directory: 'conda'
[I 15:56:31.172 NotebookApp] [nb_conda_kernels] enabled, 0 kernels found
[I 15:56:33.554 LabApp] JupyterLab extension loaded from
/usr/local/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 15:56:33.554 LabApp] JupyterLab application directory is
/usr/local/anaconda3/share/jupyter/lab
[C 15:56:33.557 NotebookApp] Running as root is not recommended.
Use --allow-root to bypass
2. The default configuration file is hidden in user's home directory. You can also move it to a better location and provide it to the "jupyter" command as an option.
fyicenter$ mv ~/.jupyter/jupyter_notebook_config /var/local fyicenter$ jupyter notebook --config /shared/jupyter_notebook_config.py
3. The Notebook file directory should be provided as a shared directory:
fyicenter$ vi /shared/jupyter_notebook_config.py ... c.NotebookApp.notebook_dir = '/shared/notebooks'
4. Read/write permissions should be given to the Notebook file directory '/shared/notebooks'. Otherwise you will get the permission error.
Web portal error: Creating Notebook Failed An error occurred while creating a new notebook. Permission denied: untitled.ipynb Solution: fyicenter$ sudo chmod -R 777 /shared/notebook/
5. You may also get more permission issues, if you have 'nbconvert' installed.
Web portal error:
500 : Internal Server Error
Server log error:
not able to open '/usr/local/anaconda3/share/jupyter/nbconvert/templates/html/':
not enough permission
Solution:
fyicenter$ sudo chmod -R 777 /usr/local/anaconda3/share/jupyter/nbconvert/templates/html/
6. Run it as @reboot crontab job with full path.
fyicenter$ crontab -e @reboot /usr/local/anaconda3/bin/jupyter notebook \ --config /shared/jupyter_notebook_config.py >> /shared/jupyter.log 2>&1
7. Reboot the computer. Jupyter sever should be started automatically.
⇒ Terminate Jupyter Notebook Execution
⇐ Notebook Directory for Jupyter Server
2022-04-13, 1267🔥, 0💬
Popular Posts:
How to connect FileZilla to an Anonymous FTP Server? If you know the server host name, you can conne...
What is "Microsoft SharePoint Server Colleague Import Add-in" COM Add-in in Outlook 2013? Should I d...
Where to find answers to frequently asked questions on FTP (File Transfer Protocol and related tools...
Where to find answers to frequently asked questions about Fitbit devices? Here is a collection of fr...
How to download Mozilla Firefox 2.0? If you want to try Mozilla Firefox 2.0, you can follow this tut...