Skip to content

Run a Jupyter Labs server in HPC's Hopper00x clusters

  • SSH into punakha.utep.edu and login with the provided credentials

  • Initialize an Slurm interactive job in one of the HPC partitions

#hopper001
srun -p DGX --gres=gpu:1 --pty bash -i
#hopper002
srun -p HGX --gres=gpu:1 --pty bash -i

Start the Docker daemon

a. No Internet access (Skip this if you need internet connection)

module load docker/27.3.1
start_rootless_docker.sh

b. Workaround for internet access

module load docker/27.3.1

cd ~
mkdir -p .docker

cp /etc/docker/daemon.json ~/.docker/daemon.json
sed -i 's|"iptables": false|"iptables": true|g' ~/.docker/daemon.json

cp /opt/ohpc/pub/apps/docker/start_rootless_docker.sh ~/.docker/start_rootless_docker.sh
sed -i "s|--config-file=/etc/docker/daemon.json|--config-file=/home/$(whoami)/.docker/daemon.json|g" ~/.docker/start_rootless_docker.sh

~/.docker/start_rootless_docker.sh

SHH Tunnel

Start the Jupyter Labs' Server

docker run --gpus all -it -p 8888:8888 nvcr.io/nvidia/pytorch:24.12-py3 jupyter lab --ip 0.0.0.0 --port 8888 --no-browser

Connect to the Jupyter Labs' Server

SSH Tunnel

To open Jupyter's UI, we need to create an SSH tunnel from our local machine to the HPC server. Run this command in your local machine and input your HPC password when prompted:

#Use hopper001 or hopper002
#%USERNAME% should be the match your username in the HPC server
ssh -t -t %USERNAME%@punakha.utep.edu -L 8888:localhost:8888 ssh hopper00x -L 8888:localhost:8888

SHH Tunnel

Open Jupyter Lab's UI

In the local machine, open a browser and paste the URL provided in the Jupyter server (including the token)

Jupyter Server URL

Jupyter Server UI

Clean up

On HPC Server

#Ctrl + C twice
rm -rf ~/.docker
exit #from Hopper00x
exit #from Punakha

On SSH Tunnel

exit

References