DEV Community


How-to run Jupyter notebook in an interactive node on a High-Performance Computer (HPC).

rohitfarmer profile image Rohit Farmer Originally published at on ・2 min read


Below is an example protocol to run Jupyter notebook in an interactive node on a high-performance computer (HPCs). Most of the HPCs have their specialised way of interacting with them. Therefore, you may have to tweak this protocol as per your need. I would be happy to discuss and troubleshoot with you; contact me at Any suggestions to augment this protocol with more advanced features are welcomed.

  1. SSH to the HPC.
  2. Claim an interactive node (follow the standard procedure for your HPC, in my case it is qrsh).
  3. Note the interactive node name.
  4. Run Jupyter on the claimed interactive node by jupyter notebook --no-browser --ip='' or create an alias in your bashrc for a shortcut. For example alias jup='jupyter notebook --no-browser --ip='''.
  5. On your computer start another SSH session with tunnelling using the interactive node name as noted above ssh user@host -L8888:nodeName:8888 -N. The prompt probably won’t return and you may also not see any message in your terminal, but as long as there is no error message, it’s probably running fine.
  6. To avoid re-writing the code in step 5 every time you tunnel you can use the shell script below.

I named it jupssh.


# Check if the arugment is passed.
if [[$# -eq 0]];
    echo 'Usage: jupssh <node name>'
    exit 1

ssh user@host -L8888:$1:8888 -N
  • Copy the URL that the Jupyter daemon has generated in step 4 and paste it in the browser on your computer. URL should look something similar to http://(nodeName or Choose either nodeName or in the URL.

Top banner photo by
unsplash-logoFederica Galli

Discussion (0)

Editor guide