This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Jupyter notebook ====== <box 90% round blue|Information> There is also a jupyterhub available, see [[doku:jupyterhub|Jupyterhub]] </box> To use ''jupyter notebook'' on VSC-3 nodes log in from a login node to your node, e.g. by doing: salloc -N 1 [-L <licence> -J <jobname> ..] srun hostname ssh nXX-XXX module load intelpython/35/2017 First time setup (to allow access from other hosts): jupyter notebook --generate-config sed -i "s/#c.NotebookApp.allow_origin/c.NotebookApp.allow_origin/;s/#c.NotebookApp.ip.*/c.NotebookApp.ip = '0.0.0.0'/" .jupyter/jupyter_notebook_config.py <box 75% round center green>Without this change in the configuration the jupyter notebook won't be reachable via the ssh-tunnel</box> To start the jupyter notebook: nXX-XXX> jupyter notebook --port=12345 --no-browser [..] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://0.0.0.0:12345/?token=aecbb236af1c04281ce5f7765bf0cc6003b2e4a9710cd7d2 Note down the token the notebook server produced (e.g. 'aecbb236af1c04281ce5f7765bf0cc6003b2e4a9710cd7d2') To connect to the given port (in this example 12345), it has to be forwarded to your local browser (on the local command line): my_local_machine> ssh -L 12345:<vsc3 node nXX-XXX>:12345 <user>@vsc3.vsc.ac.at Please make sure that you use the right node when starting the tunnel (the machine the jupyter notebook server was started) <box 75% round center red>**Do not close the terminal window with the ssh tunnel session!**</box> Now connect with your local browser to the URL given by jupyter (including the first-time-token you noted down earlier): http://localhost:12345/?token=<token> When your work is finished on the allocated node, release the node allocation with scancel $JOBID or (if you do not remember the job id and had only one job running), alternatively with scancel -u $USER doku/jupyter/manual_jupyter_server.txt Last modified: 2023/06/22 05:37by katrin