@@ -39,6 +39,7 @@ RUN apt-get update && \
39
39
git \
40
40
xvfb \
41
41
bzip2 \
42
+ unzip \
42
43
apt-utils \
43
44
gfortran \
44
45
fusefat \
@@ -73,21 +74,18 @@ RUN curl -sSL http://neuro.debian.net/lists/vivid.de-m.full | tee /etc/apt/sourc
73
74
apt-get update && \
74
75
apt-get install -y fsl-core afni
75
76
76
- RUN echo '#!/bin/bash' > /etc/profile.d/crn_neuro.sh && \
77
- echo 'export ANTSPATH=/opt/ants' >> /etc/profile.d/crn_neuro.sh && \
78
- echo 'export PATH=$ANTSPATH:$PATH' >> /etc/profile.d/crn_neuro.sh && \
79
- echo 'source /etc/fsl/fsl.sh' >> /etc/profile.d/crn_neuro.sh && \
80
- echo 'source /etc/afni/afni.sh' >> /etc/profile.d/crn_neuro.sh && \
81
- echo 'export ANTSPATH=/opt/ants' >> /etc/bash.bashrc && \
82
- echo 'export PATH=$ANTSPATH:$PATH' >> /etc/bash.bashrc && \
83
- echo 'source /etc/fsl/fsl.sh' >> /etc/bash.bashrc && \
84
- echo 'source /etc/afni/afni.sh' >> /etc/bash.bashrc
85
-
77
+ RUN echo '#!/bin/bash' > /etc/profile.d/nipype.sh && \
78
+ echo 'export ANTSPATH=/opt/ants' >> /etc/profile.d/nipype.sh && \
79
+ echo 'export PATH=$ANTSPATH:$PATH' >> /etc/profile.d/nipype.sh && \
80
+ echo 'source /etc/fsl/fsl.sh' >> /etc/profile.d/nipype.sh && \
81
+ echo 'source /etc/afni/afni.sh' >> /etc/profile.d/nipype.sh
82
+
86
83
# Clear apt cache to reduce image size
87
84
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
88
85
89
86
# Install Matlab: from the good old install_spm_mcr.sh of @chrisfilo
90
87
WORKDIR /root
88
+
91
89
RUN echo "destinationFolder=/root/mcr" > mcr_options.txt && \
92
90
echo "agreeToLicense=yes" >> mcr_options.txt && \
93
91
echo "outputFile=/tmp/matlabinstall_log" >> mcr_options.txt && \
@@ -97,13 +95,21 @@ RUN echo "destinationFolder=/root/mcr" > mcr_options.txt && \
97
95
-o matlab_installer/installer.zip && \
98
96
unzip matlab_installer/installer.zip -d matlab_installer/ && \
99
97
matlab_installer/install -inputFile mcr_options.txt && \
100
- rm -rf matlab_installer mcr_options.txt
98
+ rm -rf matlab_installer mcr_options.txt && \
99
+ echo 'export LD_LIBRARY_PATH=/root/mcr/v85/runtime/glnxa64:/root/mcr/v85/bin/glnxa64:/root/mcr/v85/sys/os/glnxa64:$LD_LIBRARY_PATH' >> /etc/profile.d/nipype.sh && \
100
+ echo 'export SPMMCRCMD="/root/spm12/run_spm12.sh /root/mcr/v85/ script"' >> /etc/profile.d/nipype.sh && \
101
+ echo 'export FORCE_SPMMCR=1' >> /etc/profile.d/nipype.sh
102
+
103
+ ENV LD_LIBRARY_PATH "/root/mcr/v85/runtime/glnxa64:/root/mcr/v85/bin/glnxa64:/root/mcr/v85/sys/os/glnxa64:$LD_LIBRARY_PATH"
104
+ ENV SPMMCRCMD "/root/spm12/run_spm12.sh /root/mcr/v85/ script"
105
+ ENV FORCE_SPMMCR 1
101
106
102
107
# Install SPM
103
108
RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_r6472_Linux_R2015a.zip -o spm12.zip && \
104
109
unzip spm12.zip && \
105
110
rm -rf spm12.zip
106
111
112
+ RUN echo "source /etc/profile.d/nipype.sh" >> /etc/bash.bashrc
107
113
108
114
CMD ["/bin/bash" ]
109
115
0 commit comments