Skip to content

Commit 57bf3cc

Browse files
committed
organize profile settings #1536
1 parent f5e2350 commit 57bf3cc

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

docker/test-image-base/Dockerfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ RUN curl -sSL http://neuro.debian.net/lists/vivid.de-m.full | tee /etc/apt/sourc
7474
apt-get update && \
7575
apt-get install -y fsl-core afni
7676

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
77+
RUN echo '#!/bin/bash' > /etc/profile.d/nipype_deps.sh && \
78+
echo 'export ANTSPATH=/opt/ants' >> /etc/profile.d/nipype_deps.sh && \
79+
echo 'export PATH=$ANTSPATH:$PATH' >> /etc/profile.d/nipype_deps.sh && \
80+
echo 'source /etc/fsl/fsl.sh' >> /etc/profile.d/nipype_deps.sh && \
81+
echo 'source /etc/afni/afni.sh' >> /etc/profile.d/nipype_deps.sh
8282

8383
# Clear apt cache to reduce image size
8484
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -96,9 +96,9 @@ RUN echo "destinationFolder=/root/mcr" > mcr_options.txt && \
9696
unzip matlab_installer/installer.zip -d matlab_installer/ && \
9797
matlab_installer/install -inputFile mcr_options.txt && \
9898
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
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_deps.sh && \
100+
echo 'export SPMMCRCMD="/root/spm12/run_spm12.sh /root/mcr/v85/ script"' >> /etc/profile.d/nipype_deps.sh && \
101+
echo 'export FORCE_SPMMCR=1' >> /etc/profile.d/nipype_deps.sh
102102

103103
ENV LD_LIBRARY_PATH "/root/mcr/v85/runtime/glnxa64:/root/mcr/v85/bin/glnxa64:/root/mcr/v85/sys/os/glnxa64:$LD_LIBRARY_PATH"
104104
ENV SPMMCRCMD "/root/spm12/run_spm12.sh /root/mcr/v85/ script"
@@ -109,7 +109,7 @@ RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/sp
109109
unzip spm12.zip && \
110110
rm -rf spm12.zip
111111

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

114114
CMD ["/bin/bash"]
115115

docker/test-image-nipype/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ WORKDIR /root
3737
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
3838
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
3939
rm Miniconda-latest-Linux-x86_64.sh && \
40-
echo '#!/bin/bash' >> /etc/profile.d/anaconda.sh && \
41-
echo 'export PATH=/usr/local/miniconda/bin:$PATH' >> /etc/profile.d/anaconda.sh
40+
echo '#!/bin/bash' >> /etc/profile.d/nipype.sh && \
41+
echo 'export PATH=/usr/local/miniconda/bin:$PATH' >> /etc/profile.d/nipype.sh
4242

4343
ENV PATH /usr/local/miniconda/bin:$PATH
4444

@@ -66,6 +66,5 @@ RUN conda create -y -n nipypetests-3.5 lockfile nipype python=3.5
6666
# RUN source activate nipypetests-2.7 && \
6767
# pip install --upgrade pip && \
6868

69-
70-
69+
RUN echo "source /etc/profile.d/nipype.sh" >> /etc/bash.bashrc
7170
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)