Skip to content

Commit 33b47ef

Browse files
committed
base all test images in main docker image
1 parent 2958961 commit 33b47ef

File tree

4 files changed

+16
-44
lines changed

4 files changed

+16
-44
lines changed

circle.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,19 @@ dependencies:
2020
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
2121

2222
override:
23-
- mkdir -p ~/docker ~/examples ~/scratch/pytest ~/scratch/logs
23+
- mkdir -p $HOME/docker $HOME/examples $HOME/scratch/pytest $HOME/scratch/logs
2424
- if [[ ! -d ~/examples/nipype-tutorial ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-tutorial.tar.bz2 "${DATA_NIPYPE_TUTORIAL_URL}" && tar xjf nipype-tutorial.tar.bz2 -C ~/examples/; fi
2525
- if [[ ! -d ~/examples/nipype-fsl_course_data ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O nipype-fsl_course_data.tar.gz "${DATA_NIPYPE_FSL_COURSE}" && tar xzf nipype-fsl_course_data.tar.gz -C ~/examples/; fi
2626
- if [[ ! -d ~/examples/feeds ]]; then wget --retry-connrefused --waitretry=5 --read-timeout=20 --timeout=15 -t 0 -q -O fsl-5.0.9-feeds.tar.gz "${DATA_NIPYPE_FSL_FEEDS}" && tar xzf fsl-5.0.9-feeds.tar.gz -C ~/examples/; fi
27-
- if [[ -e ~/docker/image.tar ]]; then mv -n ~/docker/image.tar ~/docker/image_27.tar; fi
28-
- if [[ -e ~/docker/image_27.tar ]]; then docker load -i ~/docker/image_27.tar; fi
29-
- if [[ -e ~/docker/image_35.tar ]]; then docker load -i ~/docker/image_35.tar; fi
27+
- if [[ -e $HOME/docker/image.tar ]]; then docker load -i $HOME/docker/image.tar; fi
28+
- sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py
29+
- e=1 && for i in {1..5}; do docker build -t nipype/nipype:latest --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
30+
timeout: 21600
31+
- docker save nipype/nipype:latest > $HOME/docker/image.tar
3032
- docker build -f docker/Dockerfile_py27 -t nipype/nipype_test:py27 . :
3133
timeout: 1600
3234
- docker build -f docker/Dockerfile_py35 -t nipype/nipype_test:py35 . :
3335
timeout: 1600
34-
- docker save nipype/nipype_test:py27 > ~/docker/image_27.tar :
35-
timeout: 1600
36-
- docker save nipype/nipype_test:py35 > ~/docker/image_35.tar :
37-
timeout: 1600
3836

3937
test:
4038
override:

docker/Dockerfile_py27

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,16 @@
2626
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
FROM nipype/nipype_test:base-0.0.2
29+
FROM nipype/nipype:latest
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
3131

3232
# Downgrade python to 2.7
33-
RUN conda update -y conda && \
34-
conda update --all -y python=2.7 && \
35-
pip install configparser
33+
RUN conda install python=2.7 && \
34+
conda update --all -y python=2.7
3635

3736
COPY docker/files/run_* /usr/bin/
3837
RUN chmod +x /usr/bin/run_*
3938

40-
# Speed up building
41-
RUN mkdir -p /root/src/nipype
42-
COPY requirements.txt /root/src/nipype/requirements.txt
43-
RUN pip install -r /root/src/nipype/requirements.txt && \
44-
sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc
45-
4639
# Re-install nipype
4740
COPY . /root/src/nipype
4841
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \

docker/Dockerfile_py34

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
FROM nipype/nipype_test:base-0.0.2
29+
FROM nipype/nipype:latest
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
3131

3232
# Downgrade python to 3.4
33-
RUN conda update -y conda && \
33+
RUN conda install python=3.4 && \
3434
conda update --all -y python=3.4
3535

3636
COPY docker/files/run_* /usr/bin/
@@ -42,16 +42,10 @@ RUN rm -r ${FSLDIR}/bin/imglob && \
4242
chmod +x /usr/bin/fsl_imglob.py && \
4343
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
4444

45-
# Speed up building
46-
RUN mkdir -p /root/src/nipype
47-
COPY requirements.txt /root/src/nipype/requirements.txt
48-
RUN pip install -r /root/src/nipype/requirements.txt && \
49-
sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python3.4/site-packages/matplotlib/mpl-data/matplotlibrc
50-
5145
# Re-install nipype
5246
COPY . /root/src/nipype
53-
RUN rm -r /usr/local/miniconda/lib/python3.4/site-packages/nipype* && \
47+
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
5448
cd /root/src/nipype && \
5549
pip install -e .[all]
5650

57-
CMD ["/bin/bash"]
51+
CMD ["/bin/bash"]

docker/Dockerfile_py35

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,14 @@
2929
FROM nipype/nipype_test:base-0.0.2
3030
MAINTAINER The nipype developers https://github.com/nipy/nipype
3131

32-
WORKDIR /root
33-
34-
COPY docker/files/run_* /usr/bin/
35-
RUN chmod +x /usr/bin/run_*
36-
3732
# Replace imglob with a Python3 compatible version
3833
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
3934
RUN rm -r ${FSLDIR}/bin/imglob && \
4035
chmod +x /usr/bin/fsl_imglob.py && \
4136
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
37+
COPY docker/files/run_* /usr/bin/
38+
RUN chmod +x /usr/bin/run_*
4239

43-
# Speed up building
44-
RUN mkdir -p /root/src/nipype
45-
COPY requirements.txt /root/src/nipype/requirements.txt
46-
RUN pip install -r /root/src/nipype/requirements.txt && \
47-
sed -i 's/\(backend *: \).*$/\1Agg/g' /usr/local/miniconda/lib/python3.5/site-packages/matplotlib/mpl-data/matplotlibrc
48-
49-
# Re-install nipype
50-
COPY . /root/src/nipype
51-
RUN rm -r /usr/local/miniconda/lib/python3.5/site-packages/nipype* && \
52-
cd /root/src/nipype && \
53-
pip install -e .[all]
40+
WORKDIR /root
5441

5542
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)