Jupyter notebook is a handy little system for running and documenting your code. You can run it on a remote cluster from your local workstation. Here’s how!

Jupyter docs here

Based off instructions here

Get an interactive terminal

srun --pty -p sched_mit_NNNNN bash

Note the node that you are allocated by the slurm scheduler. In this case it is


Start Jupyter notebook on your node

jupyter notebook --no-browser --port=8888

Open ssh conncetion to cluster and node421

ssh -t -t -L 8888:localhost:8888 ssh node421 -L 8888:localhost:8888

Tunnel from local machine to Jupyter notebook

Now direct your browser on your local machine to http://localhost:8888/. You should now see the Jupyter notebook view of the filesystem on the cluster.

Don’t forget to close connection when finished