This guide helps you set up and run containers using Apptainer (formerly Singularity) on Virginia Tech’s ARC clusters via terminal or Open OnDemand.
Apptainer is provided via the module system.
module load apptainer/1.4.0
Verify the installation:
apptainer --version
Expected output:
apptainer version 1.4.0
Run a quick test using a lightweight container:
apptainer run docker://alpine echo "Hello from inside a container!"
Expected output:
Hello from inside a container!
You can get an interactive shell in a container like this:
apptainer shell docker://ubuntu:20.04
Try running some commands inside the container:
ls /
exit
.sif Container ImageIf building is allowed on your node:
apptainer build ubuntu_20.04.sif docker://ubuntu:20.04
Then run offline using:
apptainer run ubuntu_20.04.sif echo "Offline run successful"
docker:// lets you run or build from Docker Hub images..sif images in your $HOME or $WORK for persistent use.module load apptainer/1.4.0
apptainer run docker://alpine echo "Hello from container"