Ready-to-use Docker image with the standalone version of the Computational Anatomy Toolbox (CAT) toolbox for SPM. No MATLAB license required.
Find the image in Docker Hub here.
- Ubuntu 20.04 LTS (Focal Fossa)
- MATLAB Compiler Runtime R2017b (version 9.3)
- SPM standalone version (SPM12 r7771)
- CAT toolbox (CAT12.9 r2556)
docker pull jhuguetn/cat12
...
docker run -v /data:/data jhuguetn/cat12 -b /data/matlab_batch_script.m /data/img.nii
docker run -it --rm -v `pwd`/data:/data jhuguetn/cat12 \
-b /opt/spm/standalone/cat_standalone_segment.m \
/data/my_dataset/sub-0001/anat/sub-0001_T1w.nii
You need to make sure to map $HOME/.matlab
if you are running in contained
mode, because the MCR will write into that folder.
singularity build cat12-latest.sif docker://jhuguetn/cat12:latest
singularity run --cleanenv --contain \
-B $PWD:/data \
-B $HOME/.matlab \
cat12-latest.sif \
-b /opt/spm/standalone/cat_standalone_segment_long.m /data/my_dataset/sub-01/ses-0{1,2,3}/anat/sub-01_T1w.nii
Jordi Huguet (BarcelonaBeta Brain Research Center)