From c2d5a34dbbfbe3504138b9d3bb500a72fc78bf81 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Wed, 20 Jan 2021 22:32:00 +0100 Subject: [PATCH 1/2] MAINT: Docker - Update base Ubuntu image & ANTs, makefile --- .circleci/config.yml | 10 +++++----- Dockerfile | 7 ++++--- Makefile | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 Makefile diff --git a/.circleci/config.yml b/.circleci/config.yml index cd36c4d4f0..840144df7c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -156,7 +156,7 @@ jobs: build_n_pytest: machine: - image: circleci/classic:201808-01 + image: ubuntu-2004:202010-01 working_directory: /tmp/tests environment: TZ: "/usr/share/zoneinfo/America/Los_Angeles" @@ -183,14 +183,14 @@ jobs: set -e if [[ "$success" = "0" ]]; then echo "Pulling from local registry" - docker tag localhost:5000/ubuntu ubuntu:xenial-20191010 + docker tag localhost:5000/ubuntu ubuntu:xenial-20201030 docker pull localhost:5000/sdcflows docker tag localhost:5000/sdcflows nipreps/sdcflows:latest docker tag localhost:5000/sdcflows nipreps/sdcflows else echo "Pulling from Docker Hub" - docker pull ubuntu:xenial-20191010 - docker tag ubuntu:xenial-20191010 localhost:5000/ubuntu + docker pull ubuntu:xenial-20201030 + docker tag ubuntu:xenial-20201030 localhost:5000/ubuntu docker push localhost:5000/ubuntu docker pull nipreps/sdcflows:latest fi @@ -390,7 +390,7 @@ jobs: deploy_docker: machine: - image: circleci/classic:201711-01 + image: ubuntu-2004:202010-01 working_directory: /tmp/src/ steps: - restore_cache: diff --git a/Dockerfile b/Dockerfile index 2304c943f3..07401da422 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use Ubuntu 16.04 LTS -FROM ubuntu:xenial-20191010 +FROM ubuntu:xenial-20201030 # Pre-cache neurodebian key COPY .docker/files/neurodebian.gpg /usr/local/etc/neurodebian.gpg @@ -60,10 +60,11 @@ ENV FSLDIR="/usr/share/fsl/5.0" \ AFNI_PLUGINPATH="/usr/lib/afni/plugins" ENV PATH="/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH" -# Installing ANTs 2.2.0 (NeuroDocker build) +# Installing ANTs 2.3.3 (NeuroDocker build) +# Note: the URL says 2.3.4 but it is actually 2.3.3 ENV ANTSPATH=/usr/lib/ants RUN mkdir -p $ANTSPATH && \ - curl -sSL "https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz" \ + curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" \ | tar -xzC $ANTSPATH --strip-components 1 ENV PATH=$ANTSPATH:$PATH diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..dc77974d4a --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +.PHONY: help docker +.DEFAULT: help + +tag="latest" + +help: + @echo "Premade recipes" + @echo + @echo "make docker [tag=TAG]" + @echo "\tBuilds a docker image from source. Defaults to 'latest' tag." + + +docker: + docker build --rm -t nipreps/sdcflows:$(tag) \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VERSION=`python setup.py --version` . + From 2998635d5f48d88f9ebad077ebcd4ca3a8a3be5f Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Wed, 20 Jan 2021 22:56:36 +0100 Subject: [PATCH 2/2] fix: new machine images do not have python 3.7.0, autoselect --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 840144df7c..9c8ad95880 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -201,7 +201,9 @@ jobs: no_output_timeout: 60m command: | cd /tmp/src/sdcflows - pyenv local 3.7.0 + export PY3=$(pyenv versions | grep '3\.' | + sed -e 's/.* 3\./3./' -e 's/ .*//') + pyenv local $PY3 python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1" # Get version, update files. @@ -320,7 +322,9 @@ jobs: - run: name: Submit unit test coverage command: | - pyenv local 3.7.0 + export PY3=$(pyenv versions | grep '3\.' | + sed -e 's/.* 3\./3./' -e 's/ .*//') + pyenv local $PY3 python3 -m pip install codecov cd /tmp/src/sdcflows python3 -m codecov --file /tmp/tests/unittests.xml \