Apptainer/Singularity is the most widely used container system for HPC.
https://apptainer.org/docs/
NB: if running this on Mac with Apple silicon (M1/M2), by default Docker will pull the ARM/aarch64 version of CentOS 7
(and any subsequent conversion of Docker images will use same architecture). Solution is to specify --platform linux/amd64
.
Architecture can be checked from within container with arch
(should return x86_64).
# capture current working directory (should be the top-level singularity-docker directory containing Dockerfile)
WORKING_DIR=`pwd`
docker build -t singularity:1.3.2 . # tag should match software version
- Can do this on Google shell
Check that we can call the tool now encapsulated within the container
docker run -it --rm singularity:1.3.2 arch
docker run -it --rm singularity:1.3.2 apptainer -h # can run as either apptainer or singularity
docker run -it --rm singularity:1.3.2 singularity -h # can run as either apptainer or singularity