As Jupyter notebook is getting more and more popular, it’s time to write a small tutorial explaining how you could launch a Jupyter notebook on Baobab.
Jupyter notebook is a web based interface. In this tutorial, we expect that you will connect to Baobab through x2go.
Once connected to Baobab through x2go, you need to write a sbatch script like this one. Adapt it to your need. Be sure to not specify the port number is it may happens it’s already in use and the job will then fail. Jupyter notebook detect if the default port is already in use and use the next one automatically.
In a terminal, submit the job:
[sagon@login2 jupyter][master] $ sbatch launchJupyter.sh
Submitted batch job 20684588
[sagon@login2 jupyter][master] $
Be sure that the Jupyter instance is running (R for running in the ST column):
[sagon@login2 jupyter][master] $ squeue -j 20684588
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
20684588 debug-EL7 launchJu sagon R 3:12 1 node001
[sagon@login2 jupyter][master] $
Get the url + token for authentication:
[sagon@login2 jupyter][master] $ grep "running at" -A1 slurm-20684588.out
[I 13:52:43.184 NotebookApp] The Jupyter Notebook is running at:
[I 13:52:43.184 NotebookApp] http://node001:8888/?token=f5282143b8c480822f4bdfa4ae3471ecca767428bbae46e0
On x2go, open firefox and point it to the Jupyter notebook url you got.
You can then create new notebook using the new button or open existing one.
The session is not available from outside Baobab and is not ciphered. Feel free to adapt this procedure to you need, like activating ssl.
.