Railway

Deploy Slurm on Railway

Play with a real Slurm scheduler on Railway

Deploy Slurm on Railway

slurm-on-railway

Antvirf/slurm-on-railway

Just deployed

Slurm on Railway

Why? Why not. POC of running Slurm controller + container-local worker nodes on Railway. Only local dependencies are railway CLI and docker.

Deployment

  1. Deploy with railway template - be patient, the build takes about 10 minutes but subsequent deployments will be faster.
  2. Create railway.env file with your project info:
# After deploying the template, you can get these from the URL:
https://railway.com/project/$PROJECT_ID/service/$SERVICE_ID?environmentId=$ENVIRONMENT_ID
export RAILWAY_PROJECT_ID=xxx
export RAILWAY_ENVIRONMENT_ID=xxx
export RAILWAY_SERVICE_ID=xxx
  1. From the Settings tab of your project, get your public domain and port - e.g. interchange.proxy.rlwy.net:59019
  2. Auth your Railway CLI with railway login
  3. Run commands using the client.sh wrapper:
chmod +x client.sh
./client.sh  

# example
./client.sh interchange.proxy.rlwy.net:59019 scontrol ping -vvvv
Using Project: xxx
Using Environment: xxx
Using Service: xxx
--- Building Local Slurm Image ---
sha256:639351c1520234413d42a3df8b0230e3a04e317af4a1e305bbc35e775e750759
--- Syncing with Railway ---
Warning: Received unknown message type: stand_by
Remote hostname detected: 8f524205061f
Warning: Received unknown message type: stand_by
--- Launching Client Container ---
scontrol: debug2: _sack_connect: connected to /run/slurm/sack.socket
Slurmctld(primary) at 8f524205061f is UP

Client script

  1. Builds a local Docker image slurm-railway.
  2. Fetches the authentication key (created at build-time) and hostname (set by Railway at runtime) from Railway
  3. Launch a background sackd (Slurm Auth and Cred Kiosk) daemon inside the container to handle the auth/slurm handshake.
  4. Run given command / drop into bash

Deploy and Host

One-click deploy.

About Hosting

One-click deploy

Why Deploy

Play with Slurm :)

Common Use Cases

Play with Slurm :)

Dependencies for

None

Deployment Dependencies

None


Template Content

slurm-on-railway

Antvirf/slurm-on-railway

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
View Template
openui
Deploy OpenUI: AI-powered UI generation with GitHub OAuth and OpenAI API.

zexd
View Template
firecrawl
firecrawl api server + worker without auth, works with dify

Rama