Jump to content

SPM/Docker

From Wikibooks, open books for an open world
< SPM


Docker

[edit | edit source]

Docker is a container technology, performing operating-system-level virtualisation.

https://www.docker.com/

Singularity

[edit | edit source]

Singularity is another container technology that performs operating-system-level virtualization. One of the main uses of Singularity is to bring containers and reproducibility to scientific computing and HPC.

https://sylabs.io/singularity/
https://apptainer.org/

SPM Containers

[edit | edit source]

Official SPM12 Dockerfile and singularity.def (using the Standalone SPM):

https://github.com/spm/spm-docker

https://github.com/spm/spm-docker/pkgs/container/spm-docker
https://hub.docker.com/r/spmcentral/spm/

For example, to start SPM with its graphical user interface:

xhost +local:docker
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp:/tmp -v /tmp/.X11-unix:/tmp/.X11-unix spmcentral/spm fmri

If the container's root filesystem is mounted as read only (--read-only flag), you need to bind mount an extra volume:

-v /tmp/.matlab:/root/.matlab

See also

[edit | edit source]

Neurodesk

[edit | edit source]
https://www.neurodesk.org/

Neurodocker

[edit | edit source]
https://github.com/ReproNim/neurodocker
https://hub.docker.com/r/kaczmarj/neurodocker/

SPM BIDS-App

[edit | edit source]
https://github.com/BIDS-Apps/SPM
https://hub.docker.com/r/bids/spm/

MATLAB Dockerfile

[edit | edit source]
https://github.com/mathworks-ref-arch/matlab-dockerfile

Singularity

[edit | edit source]

SingularityCE User Guide

sudo singularity build spm12.sif spm12-octave.def
singularity exec spm12.sif
./spm12.sif --help

(how to install singularity on Ubuntu)