This is an old revision of the document!
Jupyter notebook
Information
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
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)
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