-
Notifications
You must be signed in to change notification settings - Fork 32
Using SIRF with Apptainer or Singularity
Apptainer (formerly Singularity) is a container platform that supports laptops to HPC systems. Some clusters do not allow directly running Docker images, but do support Apptainer.
Apptainer can convert Docker images to its own .sif format. This could be as simple as
# First set-up Apptainer environment variables (adjust to your needs)
module load apptainer
# Convert
apptainer pull docker://synerbi/sirf:edge-gpuIn June 2026, our GPU docker image is about 9GB, and the converted .sif file is roughly the same size. Note that this needed about 32GB of disk space while doing the conversion. If you ran out of disk space (or quota), you can first do
export APPTAINER_TMPDIR=~/Scratch/apptainerbuild # adjust file path for you of course
mkdir -p $APPTAINER_TMPDIRAfter the above conversion, the following should work
apptainer exec --nv --env SIRF_INSTALL_PATH=/opt/SIRF-SuperBuild/INSTALL --env PYTHONPATH=/opt/SIRF-SuperBuild/INSTALL/python sirf_edge-gpu.sif pythonwhere the --nv option should enable GPU support, see Apptainer GPU doc.
(Note that SIRF 3.10 images probably need adding --env LD_LIBRARY_PATH=/opt/SIRF-SuperBuild/INSTALL/lib, but this is no longer required for "edge" images).
Depending on your local set-up, Apptainer might have mounted a local directory for you already. Checkout the Apptainer doc for more information on mounting.
The above should apply, but replacing apptainer with singularity and APPTAINER_TMPDIR with SINGULARITY_TMPDIR.