Skip to content

Singularity / Apptainer

Our Docker containers are converted to Singularity/Apptainer containers and stored on object storage.

First get an overview of which containers are available as Singularity containers in neurocommand/cvmfs/log.txt:

Terminal window
curl -s https://raw.githubusercontent.com/neurodesk/neurocommand/main/cvmfs/log.txt

Assign the container name to a variable:

Terminal window
export container=itksnap_3.8.0_20201208

Then download the container. One way is to use curl:

Terminal window
curl -X GET https://neurocontainers.neurodesk.workers.dev/$container.simg -O

Some of our containers contain GPU-accelerated applications. Here is an example that tests the GPU-accelerated program eddy in FSL:

Terminal window
curl -X GET https://neurocontainers.neurodesk.workers.dev/fsl_6.0.5.1_20221016.simg -O
git clone https://github.com/neurolabusc/gpu_test.git
singularity shell --nv fsl_6.0.5.1_20221016.simg
cd gpu_test/etest/
bash runme_gpu.sh

The Singularity containers can also be used in combination with our Transparent Singularity Tool, which wraps the executables inside a container so they are easily available to pipelines.

One example:

Terminal window
curl -s https://raw.githubusercontent.com/neurodesk/neurocommand/main/cvmfs/log.txt
export container=itksnap_3.8.0_20201208
git clone https://github.com/neurodesk/transparent-singularity ${container}
cd ${container}
./run_transparent_singularity.sh ${container}