Skip to content

Commit a564ae3

Browse files
committed
de-skim nipype test docker image
1 parent da1f544 commit a564ae3

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

docker/nipype_test_base/Dockerfile

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ MAINTAINER Nipype developers
3131

3232
# Preparations
3333
RUN ln -snf /bin/bash /bin/sh
34-
ARG DEBIAN_FRONTEND=noninteractive
34+
ENV SHELL /bin/bash
3535

36+
ARG DEBIAN_FRONTEND=noninteractive
3637
RUN sed -i -e 's,main$,main contrib non-free,g' /etc/apt/sources.list.d/neurodebian.sources.list && \
3738
apt-get -y update && \
3839
apt-get install -y curl \
@@ -48,14 +49,14 @@ RUN sed -i -e 's,main$,main contrib non-free,g' /etc/apt/sources.list.d/neurodeb
4849
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
4950
echo ". /etc/fsl/fsl.sh" >> /etc/bash.bashrc
5051

51-
ENV FSLDIR=/usr/share/fsl/5.0
52-
ENV FSLOUTPUTTYPE=NIFTI_GZ
53-
ENV PATH=/usr/lib/fsl/5.0:$PATH
54-
ENV FSLMULTIFILEQUIT=TRUE
55-
ENV POSSUMDIR=/usr/share/fsl/5.0
56-
ENV LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH
57-
ENV FSLTCLSH=/usr/bin/tclsh
58-
ENV FSLWISH=/usr/bin/wish
52+
ENV FSLDIR=/usr/share/fsl/5.0 \
53+
FSLOUTPUTTYPE=NIFTI_GZ \
54+
PATH=/usr/lib/fsl/5.0:$PATH \
55+
FSLMULTIFILEQUIT=TRUE \
56+
POSSUMDIR=/usr/share/fsl/5.0 \
57+
LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \
58+
FSLTCLSH=/usr/bin/tclsh \
59+
FSLWISH=/usr/bin/wish
5960

6061
# Install Matlab: from the good old install_spm_mcr.sh of @chrisfilo
6162
WORKDIR /opt
@@ -79,5 +80,25 @@ RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/sp
7980
unzip spm12.zip && \
8081
rm -rf spm12.zip
8182

83+
WORKDIR /root
84+
# Install miniconda
85+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
86+
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
87+
rm Miniconda-latest-Linux-x86_64.sh
88+
89+
ENV PATH /usr/local/miniconda/bin:$PATH
90+
91+
# http://bugs.python.org/issue19846
92+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
93+
ENV LANG C.UTF-8
94+
95+
# Add conda-forge channel in conda
96+
RUN conda config --add channels conda-forge && \
97+
conda install -y lockfile nipype matplotlib sphinx boto coverage dipy
98+
99+
# Install run scripts
100+
COPY docker/circleci/run_* /usr/bin/
101+
RUN chmod +x /usr/bin/run_*
102+
82103
CMD ["/bin/bash"]
83104

docker/nipype_test_py27/Dockerfile

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,14 @@
2828

2929
FROM nipype/nipype_test:base
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
31-
# Preparations
32-
RUN ln -snf /bin/bash /bin/sh
33-
WORKDIR /root
3431

35-
# Install miniconda
36-
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
37-
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
38-
rm Miniconda-latest-Linux-x86_64.sh
32+
# Pre-check that requirements are installed
33+
WORKDIR /root/src/nipype
34+
COPY requirements.txt /root/src/nipype/requirements.txt
35+
RUN pip install -r requirements.txt
3936

40-
ENV PATH /usr/local/miniconda/bin:$PATH
41-
42-
# http://bugs.python.org/issue19846
43-
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
44-
ENV LANG C.UTF-8
45-
46-
# Add conda-forge channel in conda
47-
RUN conda config --add channels conda-forge && \
48-
conda install -y lockfile nipype matplotlib sphinx boto coverage
49-
50-
RUN mkdir -p /root/src/nipype
5137
COPY . /root/src/nipype
52-
53-
RUN cd /root/src/nipype && \
54-
pip install dipy && \
55-
pip install -r requirements.txt && \
38+
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
5639
pip install -e .
5740

58-
59-
COPY docker/circleci/run_* /usr/bin/
60-
RUN chmod +x /usr/bin/run_*
61-
ENV SHELL /bin/bash
62-
6341
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)