Skip to content

Commit f5e2350

Browse files
committed
finished adding SPM #1536
1 parent 6da82b2 commit f5e2350

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

docker/test-image-base/Dockerfile

+17-11
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ RUN apt-get update && \
3939
git \
4040
xvfb \
4141
bzip2 \
42+
unzip \
4243
apt-utils \
4344
gfortran \
4445
fusefat \
@@ -73,21 +74,18 @@ RUN curl -sSL http://neuro.debian.net/lists/vivid.de-m.full | tee /etc/apt/sourc
7374
apt-get update && \
7475
apt-get install -y fsl-core afni
7576

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+
8683
# Clear apt cache to reduce image size
8784
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8885

8986
# Install Matlab: from the good old install_spm_mcr.sh of @chrisfilo
9087
WORKDIR /root
88+
9189
RUN echo "destinationFolder=/root/mcr" > mcr_options.txt && \
9290
echo "agreeToLicense=yes" >> mcr_options.txt && \
9391
echo "outputFile=/tmp/matlabinstall_log" >> mcr_options.txt && \
@@ -97,13 +95,21 @@ RUN echo "destinationFolder=/root/mcr" > mcr_options.txt && \
9795
-o matlab_installer/installer.zip && \
9896
unzip matlab_installer/installer.zip -d matlab_installer/ && \
9997
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
101106

102107
# Install SPM
103108
RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_r6472_Linux_R2015a.zip -o spm12.zip && \
104109
unzip spm12.zip && \
105110
rm -rf spm12.zip
106111

112+
RUN echo "source /etc/profile.d/nipype.sh" >> /etc/bash.bashrc
107113

108114
CMD ["/bin/bash"]
109115

0 commit comments

Comments
 (0)