Port-Forwarding your UI with SuperPOD
Overview
Teaching: 5 min min
Exercises: 0 minQuestions
How to Port-Forwarding with SuperPOD
Objectives
7. Using SuperPOD
The method of using conda environment in SuperPOD is similar to ManeFrame 3. These are the steps:
1. Setup your own conda environment in SuperPOD with cuda library supported (refer to my SuperPOD 101 lecture notes)
2. Install the Stable Diffusion UI model onto your SuperPOD account (Automatic1111,ComfyUI, InvokeAI, Fooocus)
3. Notice the following ports are used for each model:
- Automatic1111: 172.0.0.1:7860
- ComfyUI: 172.0.0.1:8188
- InvokeAI: 172.0.0.1:9090
- Fooocus: 172.0.0.1:7865
4. Setup the model using the following method with 2 opened terminal
4.1. Terminal 1
- ssh to superpod account with Dynamic port number, for example port 8000 and request a compute node:
$ ssh -C -D 8000 tuev@superpod.smu.edu
$ srun -N 1 -G 1 -c 10 --mem=64gb --time=12:00:00 --pty $SHELL
Assume you are given a node name: bcm-dgxa100-0001
- Load neccessary libraries:
$ module load conda gcc cuda cudnn
- Activate the conda environment for stable diffusion
$ conda activate ~/sd
- Go to the UI model, for example stable-diffusion-webui for Automatic1111 and run the command:
$ cd $WORK/stable-diffusion-webui
$ jupyter lab &
$ ./webui.sh & # Note this is changed for each model (ComfyUI, InvokeAI, Fooocus)
Leave this terminal 1 going on and open another terminal
4.2. Terminal 2
Now you will need to ssh to the SuperPOD with the Dynamic and Static port and the requested node bcm-dgxa100-0001.
$ ssh -J tuev@superpod.smu.edu tuev@bcm-dgxa100-0001 -L 8000:localhost:8000 -L 7860:localhost:7860
Enter password twice with DUO, then you will be logged in a node
4.3. Open your browser that you have already setup the forwarding port to localhost with port 8000
Type in the address 127.0.0.1:7860, you will be able to run Automatic1111.
Do the same step for other UI model.
Key Points
Conda environment, GPU, cuda