This repository defines a Docker environment for running the Slurm scheduler.
-
Runs a Slurm controller, a Slurm daemon, and an ssh server in a single container
-
Creates a user called "user" who can log in with ssh using a password
-
The password is automatically generated and echoed to standard output when the container is started
-
The "compute node" represented by the Slurm daemxon is configured to have a single socket with a single core
- Docker
- Docker Compose
- Bring up the docker-compose stack:
Check the logs with
docker-compose up -d
and read out the user's password from the start of the log. It should appear asdocker-compose logs
but with a different randomly-generated password on each run.slurm_1 | Set password for 'user' to 'lav8IeGheuch'
- Log in via ssh:
ssh -p 2022 user@localhost
- Change to the scratch directory (which is a persistent volume):
cd /scratch/user
- Submit a test job:
sbatch /usr/share/slurm-examples/testjob.sh
- Check the output file:
The suffix in the log file name is the job ID, so will change for each new job.
cat testjob_*.log
- If the log file says "Hello World!", then everything is working!