How-to-open-jupyter-notebook-on-CRI-or-RCC

how_to
Author

Charles Zhou

Published

May 17, 2022

Workflow

This is a workflow to show how to open jupyter notebook on CRI or RCC. There are some detailed instructions here, CRI’s instructions and More general instructions

On RCC follow these steps

https://rcc.uchicago.edu/docs/software/environments/python/index.html#running-jupyter-notebooks

On Gardner

On remote side (gardner)

log into gardner

$ ssh <username>@gardner.cri.uchicago.edu

on gardner run

$ PATH=/apps/software/gcc-6.2.0/miniconda3/4.7.10/bin:$PATH
$ jupyter notebook --no-browser --port=XXXX

This version of jupyter works, others may fail.

The default port will be 8888, and “–no-browser” is required because if you do not specify –no-browser –ip=, the web browser will be launched on the node and the URL returned cannot be used on your local machine.

If you set port=8889, the result should be like the following:

To access the notebook, open this file in a browser:
file:///home/<username>/.local/share/jupyter/runtime/nbserver-129406-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=47871f1a27e41715e04362540f5730611a30b17ae2072827
or http://127.0.0.1:8889/?token=47871f1a27e41715e04362540f5730611a30b17ae2072827

Local machine

Open a new terminal and run the following command.

$ ssh -N -f -L localhost:YYYY:localhost:XXXX <username>@gardner.cri.uchicago.edu

Select any port=YYYY which you haven’t used for other work.

Then open a browser, type in localhost=<YYYY> and copy and paste the token from the last step.
Finally, it should worked out.

On theta

Find notes in notion here

Reuse

© HakyImLab and Listed Authors - CC BY 4.0 for Text and figures - MIT for code