Empire AI Alpha — Jupyter, SSH & Tunnels

Created by Cesar Arias, Modified on Fri, 22 May at 2:22 AM by Cesar Arias

Alpha Jupyter Guide

Empire AI Alpha — Jupyter, SSH & Tunnels

This guide explains how to run Jupyter Notebook or JupyterLab on Empire AI Alpha, how to tunnel securely from your laptop, and how to configure SSH keys for easier access.

Where Jupyter can run: Jupyter can run on alphacpu01 in the cpu partition for light work, on current GPU partitions using -p YOUR_PARTITION -A YOUR_ACCOUNT for GPU-backed notebooks, or later on -p alpha once the future GPU partition becomes standard. CPU-heavy notebook workflows can also run on the grace partition, with separate ARM64 environments.

1) SSH to Empire AI

ssh <username>@alpha1.empire-ai.org

2) Load Python and CUDA

module load Python/3.10.15
module load cuda12.4/toolkit/12.4.1
pip install notebook

3) Interactive Jupyter session — current GPU pattern

salloc -p YOUR_PARTITION -A YOUR_ACCOUNT -c 4 --mem=16G -t 0:30:00 \
  --job-name=gpu-interactive --gres=gpu:1
srun --pty bash -l
hostname
jupyter notebook --no-browser --port=8889

Leave that terminal running. It prints the token and the host where Jupyter is listening.

4) SSH tunnel from your laptop

ssh -N -L 8889:localhost:8889 <remote_user>@<remote_host>

Then open http://localhost:8889/ in your browser and paste the token from the remote Jupyter output.

5) Future alpha pattern

salloc -p alpha -A YOUR_ACCOUNT -c 4 --mem=16G -t 0:30:00 \
  --job-name=gpu-interactive --gres=gpu:1
srun --pty bash -l
jupyter notebook --no-browser --port=8889

6) Batch Jupyter job

#SBATCH -p YOUR_PARTITION
#SBATCH -A YOUR_ACCOUNT
#SBATCH --gres=gpu:1
jupyter lab --no-browser --ip=127.0.0.1 --port=8889

Once the job starts, identify the node and tunnel to it:

squeue -j JOBID -o "%.18i %.9T %.20N %.8M %.10l"
cat jupyter-JOBID.out
ssh -N -L 8889:<compute_node_name>:8889 <remote_user>@<remote_host>

7) SSH key setup

ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub <YourUserName>@alpha1.empireai.edu
ssh <YourUserName>@alpha1.empireai.edu

If you want to cache the passphrase locally:

eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa

8) Troubleshooting

IssueFix
Port already in useChoose another port, such as 8890, and update both Jupyter and the tunnel command
No page loads locallyConfirm the tunnel is still running and the same port is used on both sides
Wrong hostTunnel to the same host where Jupyter is running; batch jobs often run on a compute node
Host key changed warningCheck with admins, then remove the old key with ssh-keygen -R <hostname>

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article