Skip to content

Commit 13dba72

Browse files
committed
Create test image tags for docker #1536
1 parent 3ed411b commit 13dba72

File tree

5 files changed

+302
-54
lines changed

5 files changed

+302
-54
lines changed

docker/nipype_test_base/Dockerfile

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Copyright (c) 2016, The developers of nipype
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# * Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# * Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# * Neither the name of crn_base nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
FROM neurodebian:latest
30+
MAINTAINER Nipype developers
31+
32+
# Preparations
33+
RUN ln -snf /bin/bash /bin/sh
34+
ARG DEBIAN_FRONTEND=noninteractive
35+
36+
RUN sed -i -e 's,main$,main contrib non-free,g' /etc/apt/sources.list.d/neurodebian.sources.list && \
37+
apt-get -y update && \
38+
apt-get install -y curl \
39+
git \
40+
xvfb \
41+
bzip2 \
42+
unzip \
43+
apt-utils \
44+
fusefat \
45+
graphviz \
46+
fsl-core && \
47+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
48+
echo ". /etc/fsl/fsl.sh" >> /etc/bash.bashrc
49+
50+
ENV FSLDIR=/usr/share/fsl/5.0
51+
ENV FSLOUTPUTTYPE=NIFTI_GZ
52+
ENV PATH=/usr/lib/fsl/5.0:$PATH
53+
ENV FSLMULTIFILEQUIT=TRUE
54+
ENV POSSUMDIR=/usr/share/fsl/5.0
55+
ENV LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH
56+
ENV FSLTCLSH=/usr/bin/tclsh
57+
ENV FSLWISH=/usr/bin/wish
58+
59+
# Install Matlab: from the good old install_spm_mcr.sh of @chrisfilo
60+
WORKDIR /opt
61+
62+
RUN echo "destinationFolder=/opt/mcr" > mcr_options.txt && \
63+
echo "agreeToLicense=yes" >> mcr_options.txt && \
64+
echo "outputFile=/tmp/matlabinstall_log" >> mcr_options.txt && \
65+
echo "mode=silent" >> mcr_options.txt && \
66+
mkdir -p matlab_installer && \
67+
curl -sSL http://www.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015a/installers/glnxa64/MCR_R2015a_glnxa64_installer.zip \
68+
-o matlab_installer/installer.zip && \
69+
unzip matlab_installer/installer.zip -d matlab_installer/ && \
70+
matlab_installer/install -inputFile mcr_options.txt && \
71+
rm -rf matlab_installer mcr_options.txt
72+
73+
ENV SPMMCRCMD "/opt/spm12/run_spm12.sh /opt/mcr/v85/ script"
74+
ENV FORCE_SPMMCR 1
75+
76+
# Install SPM
77+
RUN curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_r6472_Linux_R2015a.zip -o spm12.zip && \
78+
unzip spm12.zip && \
79+
rm -rf spm12.zip
80+
81+
CMD ["/bin/bash"]
82+

docker/nipype_test_py27/Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright (c) 2016, The developers of nipype
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# * Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# * Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# * Neither the name of crn_base nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
FROM nipype/nipype_test:base
30+
MAINTAINER Stanford Center for Reproducible Neuroscience <[email protected]>
31+
32+
# Preparations
33+
RUN ln -snf /bin/bash /bin/sh
34+
WORKDIR /root
35+
36+
# Install miniconda
37+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
38+
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
39+
rm Miniconda-latest-Linux-x86_64.sh
40+
41+
ENV PATH /usr/local/miniconda/bin:$PATH
42+
43+
# http://bugs.python.org/issue19846
44+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
45+
ENV LANG C.UTF-8
46+
47+
# Add conda-forge channel in conda
48+
RUN conda config --add channels conda-forge
49+
50+
# Create conda environment
51+
RUN conda install -y lockfile nipype
52+
53+
CMD ["/bin/bash"]

docker/nipype_test_py34/Dockerfile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Copyright (c) 2016, The developers of the Stanford CRN
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# * Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# * Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# * Neither the name of crn_base nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
FROM nipype/testbase:latest
30+
MAINTAINER Stanford Center for Reproducible Neuroscience <[email protected]>
31+
32+
# Preparations
33+
RUN ln -snf /bin/bash /bin/sh
34+
WORKDIR /root
35+
36+
# Install miniconda
37+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
38+
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
39+
rm Miniconda-latest-Linux-x86_64.sh && \
40+
echo '#!/bin/bash' >> /etc/profile.d/nipype.sh && \
41+
echo 'export PATH=/usr/local/miniconda/bin:$PATH' >> /etc/profile.d/nipype.sh
42+
43+
ENV PATH /usr/local/miniconda/bin:$PATH
44+
45+
# http://bugs.python.org/issue19846
46+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
47+
ENV LANG C.UTF-8
48+
49+
# Add conda-forge channel in conda
50+
RUN conda config --add channels conda-forge
51+
52+
# Create conda environment
53+
RUN conda create -y -n nipypetests-2.7 lockfile nipype && \
54+
echo '#!/bin/bash' >> /etc/profile.d/nipype.sh && \
55+
echo '#!/bin/bash' >> /etc/bashrc && \
56+
echo 'source activate nipypetests-2.7' >> /etc/profile.d/nipype.sh
57+
58+
# Create conda environment
59+
RUN conda create -y -n nipypetests-3.4 lockfile nipype python=3.4
60+
61+
# Create conda environment
62+
RUN conda create -y -n nipypetests-3.5 lockfile nipype python=3.5
63+
64+
# Install dipy
65+
RUN source activate nipypetests-2.7 && \
66+
pip install dipy && \
67+
source activate nipypetests-3.4 && \
68+
pip install dipy && \
69+
source activate nipypetests-3.5 && \
70+
pip install dipy
71+
72+
RUN echo "source /etc/profile.d/nipype.sh" >> /etc/bash.bashrc
73+
CMD ["/bin/bash"]

docker/nipype_test_py35/Dockerfile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Copyright (c) 2016, The developers of the Stanford CRN
2+
# All rights reserved.
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# * Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# * Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# * Neither the name of crn_base nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
FROM nipype/testbase:latest
30+
MAINTAINER Stanford Center for Reproducible Neuroscience <[email protected]>
31+
32+
# Preparations
33+
RUN ln -snf /bin/bash /bin/sh
34+
WORKDIR /root
35+
36+
# Install miniconda
37+
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh && \
38+
/bin/bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/miniconda && \
39+
rm Miniconda-latest-Linux-x86_64.sh && \
40+
echo '#!/bin/bash' >> /etc/profile.d/nipype.sh && \
41+
echo 'export PATH=/usr/local/miniconda/bin:$PATH' >> /etc/profile.d/nipype.sh
42+
43+
ENV PATH /usr/local/miniconda/bin:$PATH
44+
45+
# http://bugs.python.org/issue19846
46+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
47+
ENV LANG C.UTF-8
48+
49+
# Add conda-forge channel in conda
50+
RUN conda config --add channels conda-forge
51+
52+
# Create conda environment
53+
RUN conda create -y -n nipypetests-2.7 lockfile nipype && \
54+
echo '#!/bin/bash' >> /etc/profile.d/nipype.sh && \
55+
echo '#!/bin/bash' >> /etc/bashrc && \
56+
echo 'source activate nipypetests-2.7' >> /etc/profile.d/nipype.sh
57+
58+
# Create conda environment
59+
RUN conda create -y -n nipypetests-3.4 lockfile nipype python=3.4
60+
61+
# Create conda environment
62+
RUN conda create -y -n nipypetests-3.5 lockfile nipype python=3.5
63+
64+
# Install dipy
65+
RUN source activate nipypetests-2.7 && \
66+
pip install dipy && \
67+
source activate nipypetests-3.4 && \
68+
pip install dipy && \
69+
source activate nipypetests-3.5 && \
70+
pip install dipy
71+
72+
RUN echo "source /etc/profile.d/nipype.sh" >> /etc/bash.bashrc
73+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)