Skip to content

Add an Apple container Slurm profile with ARM64 Apptainer - #1712

Closed
dlq wants to merge 9 commits into
aces:devfrom
dlq:apple-container-slurm-prototype
Closed

dlq wants to merge 9 commits into
aces:devfrom
dlq:apple-container-slurm-prototype

Conversation

@dlq

@dlq dlq commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add an opt-in CBRAIN_LOCAL_PROFILE=slurm for Apple container. BrainPortal starts Bourreau over SSH as in #1665. Bourreau submits through ScirSlurm to a separate one-node Slurm container, with /cluster mounted on both sides for job work and the data-provider cache.

The Slurm image installs ARM64 Apptainer 1.5.5 during the build. Bourreau builds and stages a SIF from the Tool Config's OCI image, and the Slurm node runs the task inside it. The default profile continues to use ScirUnix.

Database isolation

  • The Slurm profile starts its own MariaDB container (cbrain-slurm-db) and persistent volume (cbrain-slurm-db-data). It uses a separate container network and its own generated credentials in .local/apple-container/slurm/env.
  • Within that instance, BrainPortal and Bourreau share the cbrain application schema through the existing SSH-forwarded connection. Slurm accounting uses slurm_acct_db and a dedicated slurm database user scoped to that schema.
  • The rebuild test recreated BrainPortal, Bourreau, and the compute node while retaining the database volume, shared cluster directory, and LocalStorage files. The earlier Diagnostics report was still present after recreation.

Validation on Apple silicon

  • Plain Diagnostics completed through Slurm and saved a report to LocalStorage. A separate cancellation test reached CANCELLED in Slurm accounting. Plain Diagnostics also passed after a profile stop and restart.
  • After rebuilding and recreating Bourreau and the compute node, both reported Apptainer 1.5.5. Bourreau built and cached a fresh SIF from docker://docker.io/arm64v8/debian:bullseye-slim and staged it in the shared work directory. The compute node's SIF inspection confirmed an ARM64 filesystem.
  • Diagnostics task Logfile browser is broken #5 ran inside Apptainer on cbrain-slurm-node (aarch64). Slurm job 6 reached COMPLETED with exit code 0:0. The task read all 3,973 bytes of the input using its relative path in the shared task directory.
  • CBRAIN saved Diagnostics-LocalBourreau-5-1.txt to LocalStorage as userfile 8. The SHA-256 of the report retrieved through CBRAIN matched the file on the provider.

Simplified launcher retest

With CBRAIN_LOCAL_PROFILE=slurm, up builds a missing image and rebuild replaces BrainPortal, Bourreau, and the compute node in one command. The rebuild retains the MariaDB volume and shared cluster directory. An earlier report was still present afterward.

  • Plain Diagnostics task 8 saved its report to LocalStorage as userfile 13.
  • Apptainer Diagnostics task 9 ran as Slurm job 10 on cbrain-slurm-node with exit code 0:0. The staged SIF contained an ARM64 filesystem. The task read all 3,973 bytes of its input via the relative path in the shared task directory.
  • CBRAIN saved Diagnostics-LocalBourreau-9-1.txt as userfile 15. The SHA-256 of the report retrieved through CBRAIN matched the LocalStorage file.
  • ShellCheck, Bash and Ruby syntax checks, and Git whitespace checks passed.

Review order

This PR targets aces:dev and builds on #1665. Until #1665 lands, GitHub's Files changed tab also includes the base Apple container deployment. Review #1665 first, then use the Slurm and Apptainer delta for the changes specific to this PR.

@dlq dlq closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant