forked from bids-apps/SPM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (35 loc) · 1.76 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM bids/base_validator
MAINTAINER Guillaume Flandin <g.flandin@ucl.ac.uk>
# Update system
RUN apt-get -qq update && apt-get -qq install -y \
unzip \
xorg \
wget && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install MATLAB MCR
ENV MATLAB_VERSION R2017b
RUN mkdir /opt/mcr_install && \
mkdir /opt/mcr && \
wget -P /opt/mcr_install http://www.mathworks.com/supportfiles/downloads/${MATLAB_VERSION}/deployment_files/${MATLAB_VERSION}/installers/glnxa64/MCR_${MATLAB_VERSION}_glnxa64_installer.zip && \
unzip -q /opt/mcr_install/MCR_${MATLAB_VERSION}_glnxa64_installer.zip -d /opt/mcr_install && \
/opt/mcr_install/install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \
rm -rf /opt/mcr_install /tmp/*
# Configure environment
ENV MCR_VERSION v93
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
ENV MCR_INHIBIT_CTF_LOCK 1
# Install SPM Standalone
ENV SPM_VERSION 12
ENV SPM_REVISION r7244
ENV SPM_DIR /opt/spm${SPM_VERSION}
ENV SPM_EXEC ${SPM_DIR}/spm${SPM_VERSION}
RUN wget -P /opt http://www.fil.ion.ucl.ac.uk/spm/download/restricted/bids/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 && \
${SPM_EXEC} function exit
# Configure SPM BIDS App entry point
COPY run.sh spm_BIDS_App.m pipeline_participant.m pipeline_group.m /opt/spm${SPM_VERSION}/
RUN chmod +x /opt/spm${SPM_VERSION}/run.sh
COPY version /version
ENTRYPOINT ["/opt/spm12/run.sh"]
#ENTRYPOINT ["/opt/spm12/spm12","script","/opt/spm12/spm_BIDS_App.m"]