Skip to content

Commit e0709dc

Browse files
committed
[TST] Docker use tags #1558. Close #1552
1 parent 13dba72 commit e0709dc

File tree

5 files changed

+36
-29
lines changed

5 files changed

+36
-29
lines changed

circle.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,42 @@ machine:
55
dependencies:
66
cache_directories:
77
- "~/docker"
8+
- "~/examples"
89

910
pre:
1011
- mkdir -p "~/scratch/nose"
1112

1213
override:
1314
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
14-
- docker build -t nipype/testbench:latest . :
15+
- docker build -f docker/nipype_test_py27/Dockerfile -t nipype/nipype_test:py27 . :
1516
timeout: 1600
16-
- mkdir -p ~/docker; docker save nipype/testbench:latest > ~/docker/image.tar :
17+
- mkdir -p ~/docker; docker save nipype/nipype_test:py27 > ~/docker/image.tar :
1718
timeout: 1600
19+
- if [[ ! -d ~/examples/data ]]; then \
20+
wget -O nipype-tutorial.tar.bz2 https://googledrive.com/host/0BxI12kyv2olZR05SU1lPampNcVE && \
21+
tar jxvf nipype-tutorial.tar.bz2 && \
22+
mv nipype-tutorial/* ~/examples/; fi
23+
- if [[ ! -d ~/examples/feeds ]]; then \
24+
wget -O fsl-feeds.tar.gz https://googledrive.com/host/0BxI12kyv2olZNXBONlJKV0Y1Tm8 && \
25+
tar xzf fsl-feeds.tar.gz && \
26+
mv feeds ~/examples/; fi
1827

1928
test:
2029
override:
21-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_builddocs.sh" nipype/testbench
22-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench test_spm Linear /root/examples/ workflow3d :
30+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_builddocs.sh
31+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow3d :
2332
timeout: 1600
24-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench test_spm Linear /root/examples/ workflow4d :
33+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow4d :
2534
timeout: 1600
26-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_feeds Linear /root/examples/ l1pipeline
27-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_dartel Linear /root/examples/ level1 :
35+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_fsl_feeds Linear /root/examples/ l1pipeline
36+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_dartel Linear /root/examples/ level1 :
2837
timeout: 1600
29-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_dartel Linear /root/examples/ l2pipeline :
38+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_dartel Linear /root/examples/ l2pipeline :
3039
timeout: 1600
31-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_fsl_reuse Linear /root/examples/ level1_workflow
32-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear /root/examples/ level1
33-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch nipype/testbench fmri_spm_nested Linear /root/examples/ l2pipeline
34-
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_nosetests.sh" nipype/testbench :
40+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_fsl_reuse Linear /root/examples/ level1_workflow
41+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested Linear /root/examples/ level1
42+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested Linear /root/examples/ l2pipeline
43+
- docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v $(pwd)/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_nosetests.sh :
3544
timeout: 2600
3645
post:
3746
- bash docker/circleci/teardown.sh

docker/circleci/run_builddocs.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
#!/bin/bash
2-
for i in /etc/profile.d/*.sh; do
3-
source $i
4-
done
5-
source activate nipypetests-2.7
62

73
mkdir -p /scratch/docs
84
set -o pipefail && cd /root/src/nipype/doc && make html 2>&1 | tee /scratch/builddocs.log

docker/circleci/run_examples.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/bin/bash
2-
for i in /etc/profile.d/*.sh; do
3-
source $i
4-
done
52

63
mkdir -p /root/.nipype
74
echo '[logging]' > /root/.nipype/nipype.cfg
85
echo 'workflow_level = DEBUG' >> /root/.nipype/nipype.cfg
96
echo 'interface_level = DEBUG' >> /root/.nipype/nipype.cfg
107
echo 'filemanip_level = DEBUG' >> /root/.nipype/nipype.cfg
118

12-
source activate nipypetests-2.7
139
python /root/src/nipype/tools/run_examples.py $@

docker/circleci/run_nosetests.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash
2-
for i in /etc/profile.d/*.sh; do
3-
source $i
4-
done
5-
source activate nipypetests-2.7
2+
63
cd /root/src/nipype
74
mkdir -p /scratch/nose
85
nosetests -c /root/src/nipype/.noserc --xunit-file="/scratch/nosetests.xml" --cover-xml-file="/scratch/coverage.xml"

docker/nipype_test_py27/Dockerfile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

2929
FROM nipype/nipype_test:base
30-
MAINTAINER Stanford Center for Reproducible Neuroscience <[email protected]>
31-
30+
MAINTAINER The nipype developers https://github.com/nipy/nipype
3231
# Preparations
3332
RUN ln -snf /bin/bash /bin/sh
3433
WORKDIR /root
@@ -45,9 +44,19 @@ ENV PATH /usr/local/miniconda/bin:$PATH
4544
ENV LANG C.UTF-8
4645

4746
# Add conda-forge channel in conda
48-
RUN conda config --add channels conda-forge
47+
RUN conda config --add channels conda-forge && \
48+
conda install -y lockfile nipype
49+
50+
RUN mkdir -p /root/src/nipype
51+
COPY . /root/src/nipype
52+
53+
RUN cd /root/src/nipype && \
54+
pip install -r requirements.txt && \
55+
pip install -e .
56+
4957

50-
# Create conda environment
51-
RUN conda install -y lockfile nipype
58+
COPY docker/circleci/run_* /usr/bin/
59+
RUN chmod +x /usr/bin/run_*
60+
ENV SHELL /bin/bash
5261

5362
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)