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, 1229🔥, 0💬
Popular Posts:
Collections: Best World Music BitTorrent FAQ Chrome FAQ Facebook FAQ Firefox FAQ Fitbit FAQ Flash Pl...
I have an Apple iPad Air Model MD788C/A. Is it good? Yes. Apple iPad Air Model MD788C/A is a very go...
How to install Mozilla Firefox 2.0 add-on: FireFTP? FireFTP is a Mozilla Firefox 2 add-on that provi...
How to see the key exchange process in an SFTP connection with FileZilla FTP Client? If you are conn...
Why am I getting the "Spawn Failed: Server at http://127.0.0.1:47353/u ser/fyicenter/didn't respond ...