File tree Expand file tree Collapse file tree 4 files changed +16
-44
lines changed Expand file tree Collapse file tree 4 files changed +16
-44
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,19 @@ dependencies:
20
20
- sudo apt-get -y update && sudo apt-get install -y wget bzip2
21
21
22
22
override :
23
- - mkdir -p ~ /docker ~ /examples ~ /scratch/pytest ~ /scratch/logs
23
+ - mkdir -p $HOME /docker $HOME /examples $HOME /scratch/pytest $HOME /scratch/logs
24
24
- 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
25
25
- 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
26
26
- 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
30
32
- docker build -f docker/Dockerfile_py27 -t nipype/nipype_test:py27 . :
31
33
timeout : 1600
32
34
- docker build -f docker/Dockerfile_py35 -t nipype/nipype_test:py35 . :
33
35
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
38
36
39
37
test :
40
38
override :
Original file line number Diff line number Diff line change 26
26
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
27
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
29
- FROM nipype/nipype_test:base-0.0.2
29
+ FROM nipype/nipype:latest
30
30
MAINTAINER The nipype developers https://github.com/nipy/nipype
31
31
32
32
# 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
36
35
37
36
COPY docker/files/run_* /usr/bin/
38
37
RUN chmod +x /usr/bin/run_*
39
38
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
-
46
39
# Re-install nipype
47
40
COPY . /root/src/nipype
48
41
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
Original file line number Diff line number Diff line change 26
26
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
27
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
29
- FROM nipype/nipype_test:base-0.0.2
29
+ FROM nipype/nipype:latest
30
30
MAINTAINER The nipype developers https://github.com/nipy/nipype
31
31
32
32
# Downgrade python to 3.4
33
- RUN conda update -y conda && \
33
+ RUN conda install python=3.4 && \
34
34
conda update --all -y python=3.4
35
35
36
36
COPY docker/files/run_* /usr/bin/
@@ -42,16 +42,10 @@ RUN rm -r ${FSLDIR}/bin/imglob && \
42
42
chmod +x /usr/bin/fsl_imglob.py && \
43
43
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
44
44
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
-
51
45
# Re-install nipype
52
46
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* && \
54
48
cd /root/src/nipype && \
55
49
pip install -e .[all]
56
50
57
- CMD ["/bin/bash"]
51
+ CMD ["/bin/bash"]
Original file line number Diff line number Diff line change 29
29
FROM nipype/nipype_test:base-0.0.2
30
30
MAINTAINER The nipype developers https://github.com/nipy/nipype
31
31
32
- WORKDIR /root
33
-
34
- COPY docker/files/run_* /usr/bin/
35
- RUN chmod +x /usr/bin/run_*
36
-
37
32
# Replace imglob with a Python3 compatible version
38
33
COPY nipype/external/fsl_imglob.py /usr/bin/fsl_imglob.py
39
34
RUN rm -r ${FSLDIR}/bin/imglob && \
40
35
chmod +x /usr/bin/fsl_imglob.py && \
41
36
ln -s /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
37
+ COPY docker/files/run_* /usr/bin/
38
+ RUN chmod +x /usr/bin/run_*
42
39
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
54
41
55
42
CMD ["/bin/bash"]
You can’t perform that action at this time.
0 commit comments