This lesson is being piloted (Beta version)

Tunneling Jupyter Lab in SuperPOD

Overview

Teaching: 20 min
Exercises: 0 min
Questions
  • How to use Jupter Lab in SuperPOD?

Objectives
  • Learn port forwarding technique to enable Jupter Lab

4. Jupter Lab on SuperPOD

The following procedure are for Window and MacOS, Linux

Using Visual Studio Code terminal for any systems:

When not logged into M2, ssh with “-D” for Dynamic Forwarding with port 8080, “-C” for compression, to M2 login node:

$ ssh -C -D 8080 username@m2.smu.edu

Once in login node, request a compute node, load the library and activate conda env as usual, then run Jupyter lab instance:

$ srun -p v100x8 -N1 -c1 --mem=16gb --pty $SHELL
$ module load python/3 
$ conda activate myenv
$ jupyter lab --ip=0.0.0.0 --no-browser

Using Window OS’s MobaXTerm

For Window, I use MobaXTerm (https://mobaxterm.mobatek.net/) and Firefox to configure port-forwarding

Setup in MobaXTerm

Open MobaXTerm and Select Tunneling tab:

image

image

The Graphical port forwarding tool appears, Click on play button

image

The Duo screen appears, enter 1 to authenticate the Duo Once you pass the Duo screen, the port forwarding tool enabled:

image

Leave the port-forwarding screen opened and we switch to Firefox

Setup Firefox to enable proxy viewing (similar for MacOS as well)

Open Firefox, my version is 104.0.2. Use combination Alt+T+S to open up the settings tab. Scroll to bottom and select Settings from Network Settings:

image

Test Proxy

Go back to MobaXTerm and login into SuperPOD using regular SSH Request a compute node with container

$ srun -N1 -G1 -c10 --mem=64G --time=12:00:00 --pty $SHELL

Load cuda, cudnn and activate any of your conda environment, for example Tensorflow_2.9

$ module load spack conda
$ module load cuda-11.4.4-gcc-10.3.0-ctldo35 cudnn-8.2.4.15-11.4-gcc-10.3.0-eluwegp
$ source activate ~/tensorflow_2.9   

Make sure to install jupyter

$ pip install jupyter   

Next insert the following command:

$ jupyter notebook --ip=0.0.0.0 --no-browser
# or
$ jupyter lab --ip=0.0.0.0 --no-browser   

The following screen appears

image

Copy the highlighted URLs to Firefox, you will see Jupyter Notebook port forward to this:

image

Select TensorflowGPU29 kernel notebook and Check GPU device:

image

Key Points

  • Jupter Lab, Port-Forwarding