Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Connect to the head node at head.arcc.albany.edu using SSH. Do you need just a JupyterLab session? Then say no more! The HPC offers an extremely convenient way to start a JupyterLab session through the JupyterHub server, so you don’t have to SSH or do anything like that - just access the following link and be happy: http https://jupyterlab.its.albany.edu/. Have any questions? We’ve got your back, take a look at this great Wiki page on how to use this tool: JupyterHub Service Offering.

...

On macOS or Linux:
You're in luck! These systems come with SSH built in. Just open a terminal window and type:

Code Block
languagenone
ssh your_netid@hostname

On Windows:
You'll need to download an SSH client first. We recommend PuTTY (it's free!), but VS Code's Remote - SSH extension is also a great option if you're already using VS Code (also free).

...

The most common way to run jobs is by creating a script and submitting it with sbatch. A basic script looks something like this:

Code Block
languagebashnone
#!/bin/bash
#SBATCH --job-name=my_awesome_analysis
#SBATCH --output=results_%j.out
#SBATCH --error=results_%j.err
#SBATCH --time=01:00:00
#SBATCH --gpusgres=gpu:1

# Run your actual program
python my_analysis.py

...

  1. Browse the NGC catalog to find the container you need

  2. In your SLURM job script, specify the container directly:

    Code Block
    languagenone
    #SBATCH --container-image='docker://nvcr.io/nvidia/pytorch:25.01-py3'

...

Since containers have their own isolated filesystem, you'll need to explicitly mount your storage directories:

Code Block
languagenone
#SBATCH --container-mounts=/network/rit/dgx/dgx_[your_lab_here]:/mnt/dgx_[your_lab_here]

...

Let's walk through a practical example that you'll likely use all the time - setting up a Jupyter notebook session on the DGX On-Prem cluster. This script creates an interactive JupyterLab environment where you can develop and test your code with all the perks of our powerful GPUs. It automatically generates a secure password and gives you a URL to access your notebook from your browser.

Code Block
languagenone
#!/bin/bash

#SBATCH --job-name=jupyter
#SBATCH --output=jupyter-%j.out
#SBATCH --error=jupyter-%j.err
#SBATCH --time=8:00:00
#SBATCH --gres=gpu:1
#SBATCH --container-image='docker://nvcr.io/nvidia/pytorch:24.09-py3'
#SBATCH --container-mounts=/network/rit/dgx/dgx_vieirasobrinho_lab:/mnt/dgx_lab,/network/rit/lab/vieirasobrinho_lab:/mnt/lab

# Get the DGX node name
node_name="$SLURMD_NODENAME"

echo -e "JupyterLab is being loaded..."

# Generate a random port number between 8000 and 8999
port=$((RANDOM % 1000 + 8000))

# Generate a random password (alphanumeric, 6 characters)
password=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 6)

# Build the Jupyter URL
jupyter_url="http://${node_name}.its.albany.edu:${port}"

# Print session details
echo -e "\nYour JupyterLab session is available at: ${jupyter_url}\n"
echo -e "Your password is: ${password}\n"
echo -e "Please copy and paste the link into your browser and use the password to log in.\n"
echo -e "================================================================================\n"

# Start JupyterLab session
jupyter lab --allow-root --no-browser --NotebookApp.token="${password}" --NotebookApp.allow_origin='*' --NotebookApp.log_level='CRITICAL' --notebook-dir=/mnt --port=$port

...