Skip to content

aihpi/interactive-slurm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive SLURM SSH Sessions

License: MIT

A streamlined solution for running interactive SSH sessions on SLURM compute nodes, designed for seamless integration with VSCode Remote-SSH and other development tools.

🚀 Quick Start

Setup (One Command)

git clone https://github.com/aihpi/interactive-slurm.git
cd interactive-slurm
./setup.sh

The setup script automatically:

  • ✅ Generates SSH keys and configures access
  • ✅ Installs scripts on your HPC cluster
  • ✅ Sets up VSCode integration
  • ✅ Handles container options if needed

Connect

ssh slurm-cpu

That's it! You now have access to a compute node with:

  • VSCode Remote-SSH support
  • Automatic updates (runs in background)
  • Full SLURM integration
  • Optional container support
  • Multiple GPU types (A30 and H100)

✨ Features

  • 🚀 One-Command Setup: Fully automated installation
  • 🆙 Auto-Updates: Scripts update themselves automatically from GitHub
  • 🎯 VSCode Ready: Perfect Remote-SSH integration
  • 🔧 Simple Management: Use remote commands for all operations
  • 🔐 Secure: Automatic SSH key management
  • 🖥️ Multiple GPU Types: Support for A30 (gpuswap) and H100 GPUs
  • H100 Performance: Access to high-performance H100 GPUs on aisc-shortrun partition

📋 Prerequisites

  • Access to a SLURM-managed HPC cluster
  • SSH access to the cluster's login node
  • VSCode with Remote-SSH extension (optional)

🖥️ Basic Usage

Connect to CPU Environment

ssh slurm-cpu

VSCode Integration

  1. Install Extension: Get "Remote-SSH" from VSCode marketplace
  2. Connect: Press Ctrl/Cmd+Shift+P → "Remote-SSH: Connect to Host"
  3. Select Host: Choose slurm-cpu from the list
  4. Start Coding: VSCode connects to the compute node automatically!

Manage Sessions

# List running jobs
remote list

# Switch to A30 GPU environment
remote gpuswap

# Reserve H100 GPUs (default: 1 GPU)
remote h100

# Reserve multiple H100 GPUs
remote h100 4

# Use H100 with container image
remote h100 2 /path/to/container.sqsh

# Exit all interactive sessions
remote exit

# Check for updates
remote check

# Update to latest version
remote update

🆙 Auto-Updates

Automatic: When you connect, scripts check for updates in the background (once daily) and apply them automatically.

Manual Control:

# Check for updates
remote check

# Force update
remote update

🛠️ Troubleshooting

Common Issues

Connection takes too long (>5 minutes):

# Check job status
ssh login.hpc.yourcluster.edu
squeue --me

VSCode connection fails:

  1. Test command line first: ssh slurm-cpu
  2. Check VSCode timeout settings: remote.SSH.connectTimeout ≥ 300
  3. View logs: VSCode → Output → Remote-SSH

Get help:

remote help

📚 More Information

Based on

Interactive SLURM builds upon vscode-remote-hpc with enhanced automation and auto-update capabilities.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •