FROM ubuntu:22.04 LABEL org.opencontainers.image.authors="SPM " LABEL org.opencontainers.image.source="https://github.com/spm/spm-docker" LABEL org.opencontainers.image.url="https://www.fil.ion.ucl.ac.uk/spm/" LABEL org.opencontainers.image.documentation="https://www.fil.ion.ucl.ac.uk/spm/docs/" LABEL org.opencontainers.image.version="SPM12" LABEL org.opencontainers.image.revision="r7771" LABEL org.opencontainers.image.vendor="Functional Imaging Laboratory" LABEL org.opencontainers.image.licenses="GPL-2.0+" LABEL org.opencontainers.image.title="Statistical Parametric Mapping (SPM) Software" LABEL org.opencontainers.image.description="Analysis of brain imaging data sequences (fMRI, PET, EEG, MEG)" RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ unzip xorg wget \ && apt-get clean \ && rm -rf \ /tmp/hsperfdata* \ /var/*/apt/*/partial \ /var/lib/apt/lists/* \ /var/log/apt/term* # Install MATLAB MCR in /opt/mcr/ ENV MATLAB_VERSION R2019b ENV MCR_VERSION v97 ENV MCR_UPDATE 9 RUN mkdir /opt/mcr_install \ && mkdir /opt/mcr \ && wget --progress=bar:force -P /opt/mcr_install https://ssd.mathworks.com/supportfiles/downloads/${MATLAB_VERSION}/Release/${MCR_UPDATE}/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_${MATLAB_VERSION}_Update_${MCR_UPDATE}_glnxa64.zip \ && unzip -q /opt/mcr_install/MATLAB_Runtime_${MATLAB_VERSION}_Update_${MCR_UPDATE}_glnxa64.zip -d /opt/mcr_install \ && /opt/mcr_install/install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent \ && rm -rf /opt/mcr_install /tmp/* # Install SPM Standalone in /opt/spm12/ ENV SPM_VERSION 12 ENV SPM_REVISION r7771 ENV LD_LIBRARY_PATH /opt/mcr/${MCR_VERSION}/runtime/glnxa64:/opt/mcr/${MCR_VERSION}/bin/glnxa64:/opt/mcr/${MCR_VERSION}/sys/os/glnxa64:/opt/mcr/${MCR_VERSION}/sys/opengl/lib/glnxa64:/opt/mcr/${MCR_VERSION}/extern/bin/glnxa64 ENV MCR_INHIBIT_CTF_LOCK 1 ENV SPM_HTML_BROWSER 0 # Running SPM once with "function exit" tests the succesfull installation *and* # extracts the ctf archive which is necessary if singularity is going to be # used later on, because singularity containers are read-only. # Also, set +x on the entrypoint for non-root container invocations RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/spm12/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip \ && unzip -q /opt/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip -d /opt \ && rm -f /opt/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip \ && /opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit \ && chmod +x /opt/spm${SPM_VERSION}/spm${SPM_VERSION} # Configure entry point ENTRYPOINT ["/opt/spm12/spm12"] CMD ["--help"]