Skip to content

Slurm Production Port Forwarding

Overview

Secure method for port forwarding from Slurm bare-metal production GPU nodes. It enables access to internal services running inside Slurm jobs using SSH tunnels via bastion or login nodes.

Port forwarding and web server/app access on Slurm production nodes or cluster

Step 1: Allocate a Node Using Slurm

salloc -N 1 -p <Partition_Name> --account=<ACCOUNT_NAME>

Example:

salloc -N 1 -p 256C8G1H_MI325X_Ubuntu22 --account=myteam

Step 2: Launch Container

Example 1: Nginx Web Server

podman run -d --name webtest -p 8080:80 docker.io/library/nginx:latest

Step 3: Verify the Service on the Node

Check container status:

podman ps

Test locally on the node:

curl http://localhost:8080

If this works, your service is running correctly.

Step 4: Access the service from your browser (via controller/DNS)

From your local machine:

ssh -L {local_port}:{compute-node-hostname}:8080 <SSH User Name>@<DNS>

Now open your browser:

http://localhost:{local_port}

Traffic Flow

Browser → localhost:{local port} → SSH Tunnel → Controller → Compute Node → Container