Child pages
  • Jupyter Notebook on Cedar
Skip to end of metadata
Go to start of metadata

Refer to Pydpiper on Graham for running Pydpiper and MICe-lab software on a Scinet cluster, and other tips.

Network Address Translation (NAT) is blocked by default at the firewall, preventing users from accessing the internet from the compute nodes at Graham. Although one can contact technical support to have a specific port opened, the user would have to supply the IP address or range of addresses which should be allowed to use that port. (Ref: https://docs.computecanada.ca/wiki/SSH_tunnelling#Connecting_to_a_program_running_on_a_compute_node)

Cedar has the exact same default software modules as Graham, and very similar hardware without these firewall issues. You can run Jupyter notebooks on a compute node with a NVIDIA P100 Pascal (12G HBM2 memory) .

jupyter-notebook

Replace "nzxwang" with your username, and then enter your password. You should be on the cedar login node.

$ cd $SCRATCH

$ salloc -J fastai -D `pwd` --time=24:00:00 --cpus-per-task=4 --mem-per-cpu 4G --account=def-jlerch

If you want a GPU:

$ salloc -J fastai -D `pwd` --time=24:00:00 --gres=gpu:1 --cpus-per-task=4 --mem-per-cpu 4G --account=def-jlerch

Once on the node, run this script:

$ cat /home/nzxwang/venv/fastai/bin/notebook.sh

#!/bin/bash
#https://docs.computecanada.ca/wiki/Jupyter#Connecting_to_Jupyter_Notebook
unset XDG_RUNTIME_DIR
jupyter notebook --ip $(hostname -f) --no-browser

$ bash /home/nzxwang/venv/fastai/bin/notebook.sh

[I 09:54:49.044 NotebookApp] Serving notebooks from local directory: /scratch/nzxwang
[I 09:54:49.045 NotebookApp] The Jupyter Notebook is running at:
[I 09:54:49.045 NotebookApp] http://cdr255.int.cedar.computecanada.ca:8888/?token=0cbd45da11bff8386043a0f0cf772df76b690a3118c5a157
[I 09:54:49.045 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 09:54:49.076 NotebookApp]

To access the notebook, open this file in a browser:
file:///home/nzxwang/.local/share/jupyter/runtime/nbserver-155585-open.html
Or copy and paste one of these URLs:
http://cdr255.int.cedar.computecanada.ca:8888/?token=0cbd45da11bff8386043a0f0cf772df76b690a3118c5a157

On your local machine:

Then open up localhost:8880 in the browser and enter in the token from the last part of the URL.

  • No labels