{"id":46973454,"url":"https://github.com/sol-eng/slurm-docker-cluster","last_synced_at":"2026-03-11T12:05:21.686Z","repository":{"id":128621214,"uuid":"544838749","full_name":"sol-eng/slurm-docker-cluster","owner":"sol-eng","description":"Launch a SLURM cluster connected against RSW","archived":false,"fork":false,"pushed_at":"2026-01-26T22:03:13.000Z","size":625,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-27T09:31:49.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sol-eng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-03T10:16:11.000Z","updated_at":"2025-10-28T16:25:31.000Z","dependencies_parsed_at":"2025-02-02T20:19:23.666Z","dependency_job_id":"54414e1b-cb3c-4305-ab15-9f845ef848a8","html_url":"https://github.com/sol-eng/slurm-docker-cluster","commit_stats":null,"previous_names":["sol-eng/slurm-docker-cluster"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sol-eng/slurm-docker-cluster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-eng%2Fslurm-docker-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-eng%2Fslurm-docker-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-eng%2Fslurm-docker-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-eng%2Fslurm-docker-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sol-eng","download_url":"https://codeload.github.com/sol-eng/slurm-docker-cluster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-eng%2Fslurm-docker-cluster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30380935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-11T12:05:20.520Z","updated_at":"2026-03-11T12:05:21.679Z","avatar_url":"https://github.com/sol-eng.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slurm Docker Cluster\n\nThis is a multi-container Slurm cluster using docker-compose.  The compose file\ncreates named volumes for persistent storage of MySQL and Postgres data files as well as\nSlurm state and log directories.\n\n## Containers and Volumes\n\nThe compose file will run the following containers:\n\n* mysql\n* postgres\n* slurmdbd\n* slurmctld\n* c1 (slurmd)\n* c2 (slurmd)\n* rstudio1\n* rstudio2\n\nThe compose file will create the following named volumes:\n\n* etc_munge         \t ( -\u003e /etc/munge     )\n* etc_slurm         \t ( -\u003e /etc/slurm     )\n* slurm_jobdir      \t ( -\u003e /data          )\n* var_lib_mysql     \t ( -\u003e /var/lib/mysql )\n* var_libpostgres     \t ( -\u003e /var/lib/postgres )\n* var_log_slurm     \t ( -\u003e /var/log/slurm )\n* home\t \t\t ( -\u003e /home )\n* var_lib_rstudio_server ( -\u003e /var/lib/rstudio-server )\n\n## General Architecture\n\nThe dependency is shown in the image below.\n\n![](img/docker-compose.png)\n\nA more detailed view contains the mounted volumes as well. \n\n![](img/docker-compose-no-nw-no-port.png)\n\n\n## Building the Docker Image\n\nThe setup uses one single docker image named `slurm-docker-cluster`. You can build this directly via  `docker-compose`\n\n```console\ndocker-compose build \n```\nwhich will build the `slurm-docker-cluster` using default values for the versions of RStudio Workbench (2024.09.0+375.pro3) and SLURM (23.11.3) and for Ubuntu 22.04 LTS (Focal).\n\nIf you wanted to use a different Posit Workbench and SLURM version (or a different Ubuntu LTS version), you can set the environment variables `PWB_VERSION`, `SLURM_VERSION`, `DIST` and `DISTNUM`to your desired Workbench and SLURM version. e.g. \n\n```console\nexport PWB_VERSION=\"2023.09.0-daily-203.pro2\"\nexport SLURM_VERSION=\"23.02.3-1\" \nexport DIST=\"jammy\"\nexport DISTNUM=\"2204\"\n```                                                  \n\n\n## Starting the Cluster\n\nRun `docker-compose` to instantiate the cluster:\n\n```console\ndocker-compose up -d\n```\n\nNote: Make sure you have the environment variable `RSP_LICENSE` set to a valid license key for Posit Workbench.  \n\n## RStudio Workbench availability\n\nOnce the cluster is up and running, RSWB is available at http://localhost:8788 and http://localhost:8789\n\n## Accessing the Cluster\n\nUse `docker-compose exec` to run a bash shell on the controller container:\n\n```console\ndocker compose exec slurmctld bash\n```\n\nFrom the shell, execute slurm commands, for example:\n\n```console\n[root@slurmctld /]# sinfo\nPARTITION AVAIL  TIMELIMIT  NODES  STATE NODELIST\nnormal*      up 5-00:00:00      2   idle c[1-2]\n```\n\n## Submitting Jobs\n\nThe `slurm_jobdir` named volume is mounted on each Slurm container as `/data`.\nTherefore, in order to see job output files while on the controller, change to\nthe `/data` directory when on the **slurmctld** container and then submit a job:\n\n```console\n[root@slurmctld /]# cd /data/\n[root@slurmctld data]# sbatch --wrap=\"uptime\"\nSubmitted batch job 2\n[root@slurmctld data]# ls\nslurm-2.out\n```\n\n## Stopping and Restarting the Cluster\n\n```console\ndocker-compose stop\ndocker-compose start\n```\n\nor for restarting simply\n\n```console\ndocker-compose restart\n```\n\n## Deleting the Cluster\n\nTo remove all containers and volumes, run:\n\n```console\ndocker-compose down\ndocker volume ls  | grep slurm-docker-cluster | \\\n\tawk '{print $2}' | xargs docker volume rm \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsol-eng%2Fslurm-docker-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsol-eng%2Fslurm-docker-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsol-eng%2Fslurm-docker-cluster/lists"}