From a602e5f6666656594fcd5894a4d668e78133ca3d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 26 Feb 2019 16:13:30 +0000 Subject: [PATCH 01/16] update to Ubuntu 18.04 --- docker/Dockerfile | 2 +- docker/docker-compose.yml | 2 +- docker/user_python-ubuntu.sh | 2 +- docker/user_sirf-ubuntu.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 634d64a2..6a20864f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 as base +FROM ubuntu:18.04 as base LABEL \ author.name="Casper da Costa-Luis" \ author.email=imaging@caspersci.uk.to \ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index a8d689d1..254331f1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -29,5 +29,5 @@ services: context: . target: core cache_from: - - ubuntu:16.04 + - ubuntu:18.04 - ccppetmr/sirf:core diff --git a/docker/user_python-ubuntu.sh b/docker/user_python-ubuntu.sh index 2dc0a7d5..9cac918d 100755 --- a/docker/user_python-ubuntu.sh +++ b/docker/user_python-ubuntu.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -ev [ -f .bashrc ] && . .bashrc +set -ev INSTALL_DIR="${1:-/opt/pyvenv}" PYTHON="${2:-miniconda}" diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index 0bd65097..d886e961 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -ev [ -f .bashrc ] && . .bashrc +set -ev # SIRF git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b master /opt/SIRF-SuperBuild pushd /opt/SIRF-SuperBuild From 07221726ad83cdc695b4558bcd9a6bc2b12f00be Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 26 Feb 2019 16:38:52 +0000 Subject: [PATCH 02/16] re-enable travis docker, add ITK and ACE --- .travis.yml | 16 ++++++++-------- docker/Dockerfile | 5 +++-- docker/build_gadgetron-ubuntu.sh | 7 ------- docker/build_system-ubuntu.sh | 10 ++++++++++ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index c9b4919f..66459b1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,12 +65,12 @@ matrix: # +boost +itk -hdf5 +swig env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=ON" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2 # docker - #- os: linux - # # +armadillo +boost +fftw3 +hdf5 +siemens_to_ismrmrd +swig - # env: DOCKER_BUILD=1 - #- os: linux - # # +DEVEL +armadillo +boost +fftw3 +hdf5 +siemens_to_ismrmrd +swig - # env: DOCKER_BUILD=DEVEL + - os: linux + # +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + env: DOCKER_BUILD=1 + - os: linux + # +DEVEL +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + env: DOCKER_BUILD=DEVEL env: global: @@ -231,7 +231,7 @@ before_install: # N.B.: don't put into build matrix to allow caching. - BUILD_FLAGS="$BUILD_FLAGS -DPYVER=$PYMVER" - cmake --version - + install: - | if [[ -n "$DOCKER_BUILD" ]]; then @@ -268,7 +268,7 @@ install: $PY_EXE -m pip install --user --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make + make mv INSTALL/share/gadgetron/config/gadgetron.xml.example INSTALL/share/gadgetron/config/gadgetron.xml ) || travis_terminate 1 source $PWD/INSTALL/bin/env_ccppetmr.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index 6a20864f..54984076 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -76,9 +76,10 @@ COPY user_sirf-ubuntu.sh . COPY devel/.ccache/ /opt/ccache/ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ - -DCMAKE_BUILD_TYPE=Release -DBUILD_STIR_WITH_OPENMP=ON \ + -DCMAKE_BUILD_TYPE=Release -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON \ -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON \ - -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON" + -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON -DBUILD_siemens_to_ismrmrd=ON \ + -DUSE_SYSTEM_SWIG=ON" ARG EXTRA_BUILD_FLAGS="" RUN bash user_sirf-ubuntu.sh RUN rm user_sirf-ubuntu.sh diff --git a/docker/build_gadgetron-ubuntu.sh b/docker/build_gadgetron-ubuntu.sh index ac9de0a1..c9e46fc7 100755 --- a/docker/build_gadgetron-ubuntu.sh +++ b/docker/build_gadgetron-ubuntu.sh @@ -6,11 +6,4 @@ apt-get install -yq --no-install-recommends \ h5utils \ liblapack-dev \ libace-dev -# Not required (yet) by SIRF -# libxml2-dev -# libxslt-dev -# python-h5py -# python-libxml2 -# python-psutil -# libplplot-dev apt-get clean diff --git a/docker/build_system-ubuntu.sh b/docker/build_system-ubuntu.sh index c2c47f53..c9fe45b3 100755 --- a/docker/build_system-ubuntu.sh +++ b/docker/build_system-ubuntu.sh @@ -15,3 +15,13 @@ apt-get install -yq --no-install-recommends \ libxslt-dev \ swig apt-get clean + +# Not required (yet) by SIRF +# libxml2-dev +# libxslt-dev +# python-h5py +# python-libxml2 +# python-psutil +# libplplot-dev +# libopenblas-dev +# libatlas-base-dev From 144e5fcec758f602c14e6099e287540b37d54903 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 26 Feb 2019 18:18:39 +0000 Subject: [PATCH 03/16] silly conda fix https://github.com/conda/conda/issues/6030 --- docker/user_python-ubuntu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/user_python-ubuntu.sh b/docker/user_python-ubuntu.sh index 9cac918d..88bcfabd 100755 --- a/docker/user_python-ubuntu.sh +++ b/docker/user_python-ubuntu.sh @@ -13,8 +13,8 @@ miniconda) rm miniconda.sh source "$INSTALL_DIR"/bin/activate conda config --add channels conda-forge - conda update -c conda-forge -y conda - conda update -c conda-forge -y --all + # https://github.com/conda/conda/issues/6030 + #conda update -c conda-forge -y conda ;; *python*) # virtualenv From 02ff0b3b59f2eb2e913ee8001b78ee4bae566563 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Feb 2019 15:54:53 +0000 Subject: [PATCH 04/16] ensure docker uses ccache https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LAUNCHER.html --- docker/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 54984076..a2e225ab 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -76,10 +76,12 @@ COPY user_sirf-ubuntu.sh . COPY devel/.ccache/ /opt/ccache/ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ - -DCMAKE_BUILD_TYPE=Release -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON \ - -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON \ - -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON -DBUILD_siemens_to_ismrmrd=ON \ - -DUSE_SYSTEM_SWIG=ON" + -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache\ + -DCMAKE_BUILD_TYPE=Release\ + -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON\ + -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON\ + -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON -DBUILD_siemens_to_ismrmrd=ON\ + -DUSE_SYSTEM_SWIG=ON" ARG EXTRA_BUILD_FLAGS="" RUN bash user_sirf-ubuntu.sh RUN rm user_sirf-ubuntu.sh From 0c475a5e1c300f5fcb99d1ce40dd8288dd0b3403 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Feb 2019 16:15:38 +0000 Subject: [PATCH 05/16] update ccache usage assuming cmake>=3.4 --- .travis.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66459b1a..0e64bb34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -219,17 +219,11 @@ before_install: - $PY_EXE --version - $PY_EXE -m pip --version - $PY_EXE -m pip freeze - # ccache compiler override - - ln -s "$(which ccache)" g++ - - ln -s "$(which ccache)" g++-6 - - ln -s "$(which ccache)" g++-7 - - ln -s "$(which ccache)" gcc - - ln -s "$(which ccache)" gcc-6 - - ln -s "$(which ccache)" gcc-7 - export PATH="$PWD:$PATH" - popd # N.B.: don't put into build matrix to allow caching. - BUILD_FLAGS="$BUILD_FLAGS -DPYVER=$PYMVER" + - BUILD_FLAGS="$BUILD_FLAGS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" - cmake --version install: From e09ac1688c67b4c1f44ed1413167358a342a8b0b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Feb 2019 17:44:30 +0000 Subject: [PATCH 06/16] docker: explicitly list build flags --- docker/user_sirf-ubuntu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index d886e961..8c43d262 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -4,6 +4,7 @@ set -ev # SIRF git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b master /opt/SIRF-SuperBuild pushd /opt/SIRF-SuperBuild +echo $BUILD_FLAGS $EXTRA_BUILD_FLAGS cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . make -j 2 From efc2ac8732c2c2b0bb3f09939037c9a2e5025807 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 28 Feb 2019 17:09:31 +0000 Subject: [PATCH 07/16] for testing. TODO: revert when merging into master --- docker/user_sirf-ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index 8c43d262..3c2fa2ef 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -2,7 +2,7 @@ [ -f .bashrc ] && . .bashrc set -ev # SIRF -git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b master /opt/SIRF-SuperBuild +git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b docker /opt/SIRF-SuperBuild pushd /opt/SIRF-SuperBuild echo $BUILD_FLAGS $EXTRA_BUILD_FLAGS cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . From acb0088b93d1fea31ff0fff6e8fb122e18a2339e Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 28 Feb 2019 18:24:10 +0000 Subject: [PATCH 08/16] minor test tidy --- docker/devel/test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/devel/test.sh b/docker/devel/test.sh index 9b081e7e..a227d1d6 100755 --- a/docker/devel/test.sh +++ b/docker/devel/test.sh @@ -19,11 +19,12 @@ GCONFIG=./INSTALL/share/gadgetron/config/gadgetron.xml [ -f "$GCONFIG" ] || cp "$GCONFIG".example "$GCONFIG" ./INSTALL/bin/gadgetron >& gadgetron.log& -# print for debugging -[ "$DEBUG" != 0 ] && cat builds/SIRF/build/CMakeCache.txt ctest -VV ret=$? +kill -n 15 $(pidof gadgetron) + # print for debugging +[ "$DEBUG" != 0 ] && cat builds/SIRF/build/CMakeCache.txt [ "$DEBUG" != 0 ] && cat builds/SIRF/build/Testing/Temporary/LastTest.log # may exceed 4MB travis log limit [ "$DEBUG" != 0 ] && cat gadgetron.log From 6563e5ee60963b71370a41210c535ef50fb8fd45 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 01:05:48 +0000 Subject: [PATCH 09/16] fix gadgetron from source --- docker/build_gadgetron-ubuntu.sh | 20 +++++++++++++++++--- docker/build_system-ubuntu.sh | 14 -------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docker/build_gadgetron-ubuntu.sh b/docker/build_gadgetron-ubuntu.sh index c9e46fc7..a57281d5 100755 --- a/docker/build_gadgetron-ubuntu.sh +++ b/docker/build_gadgetron-ubuntu.sh @@ -1,9 +1,23 @@ #!/usr/bin/env bash set -ev # Gadgetron +# from https://github.com/gadgetron/gadgetron/blob/master/docker/base/ubuntu_1804/Dockerfile#L8 apt-get update -qq apt-get install -yq --no-install-recommends \ - h5utils \ - liblapack-dev \ - libace-dev + libhdf5-serial-dev \ + libboost-all-dev \ + libfftw3-dev \ + h5utils \ + jq \ + hdf5-tools \ + libatlas-base-dev \ + libxml2-dev \ + libfreetype6-dev \ + libxslt-dev \ + libarmadillo-dev \ + libace-dev \ + liblapack-dev \ + liblapacke-dev \ + libplplot-dev \ + libdcmtk-dev apt-get clean diff --git a/docker/build_system-ubuntu.sh b/docker/build_system-ubuntu.sh index c9fe45b3..0bb70995 100755 --- a/docker/build_system-ubuntu.sh +++ b/docker/build_system-ubuntu.sh @@ -3,25 +3,11 @@ set -ev # SIRF external dependencies apt-get update -qq apt-get install -yq --no-install-recommends \ - hdf5-tools \ hdfview \ - libarmadillo-dev \ libboost-all-dev \ - libfftw3-dev \ libgtest-dev \ - libhdf5-serial-dev \ - libplplot-dev \ - libxml2-dev \ - libxslt-dev \ swig apt-get clean # Not required (yet) by SIRF -# libxml2-dev -# libxslt-dev -# python-h5py -# python-libxml2 -# python-psutil -# libplplot-dev # libopenblas-dev -# libatlas-base-dev From 12262d9be9969dcc98944396e489ee835c7c1bb2 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 12:42:41 +0000 Subject: [PATCH 10/16] Revert "update ccache usage assuming cmake>=3.4" This reverts commit 0c475a5e1c300f5fcb99d1ce40dd8288dd0b3403. --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e64bb34..66459b1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -219,11 +219,17 @@ before_install: - $PY_EXE --version - $PY_EXE -m pip --version - $PY_EXE -m pip freeze + # ccache compiler override + - ln -s "$(which ccache)" g++ + - ln -s "$(which ccache)" g++-6 + - ln -s "$(which ccache)" g++-7 + - ln -s "$(which ccache)" gcc + - ln -s "$(which ccache)" gcc-6 + - ln -s "$(which ccache)" gcc-7 - export PATH="$PWD:$PATH" - popd # N.B.: don't put into build matrix to allow caching. - BUILD_FLAGS="$BUILD_FLAGS -DPYVER=$PYMVER" - - BUILD_FLAGS="$BUILD_FLAGS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" - cmake --version install: From f2141dd15a303ece4aea4e4755fc0d38041785ad Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 12:59:29 +0000 Subject: [PATCH 11/16] update cmake patch v3.13.1 -> v3.13.4, use ccache in docker --- .travis.yml | 9 ++++----- docker/Dockerfile | 1 - docker/build_essential-ubuntu.sh | 26 +++++++++++++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66459b1a..acf2766e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -184,7 +184,7 @@ before_install: brew install curl #brew install cmake # already present # alternative: get our own - #curl -L -O https://cmake.org/files/v3.8/cmake-3.8.0-Darwin-x86_64.tar.gz + #curl -L -O https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Darwin-x86_64.tar.gz #tar xzf cmake-*.tar.gz #mv cmake-*/CMake.app/Contents/* cmake #export PATH="$PWD/cmake/bin:$PATH" @@ -192,10 +192,9 @@ before_install: elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then PY_EXE=python$PYMVER if [[ -z "$DOCKER_BUILD" ]]; then - curl -L -O https://github.com/Kitware/CMake/releases/download/v3.13.1/cmake-3.13.1-Linux-x86_64.tar.gz - ls -l cmake-* - tar xzf cmake-*.tar.gz - mv cmake-*x86_64 cmake + curl -o cmake.tgz -L https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.tar.gz + tar xzf cmake.tgz && rm cmake.tgz + ln -s cmake-*x86_64 cmake export PATH="$PWD/cmake/bin:$PATH" fi fi diff --git a/docker/Dockerfile b/docker/Dockerfile index a2e225ab..47679f55 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -76,7 +76,6 @@ COPY user_sirf-ubuntu.sh . COPY devel/.ccache/ /opt/ccache/ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ - -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache\ -DCMAKE_BUILD_TYPE=Release\ -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON\ -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON\ diff --git a/docker/build_essential-ubuntu.sh b/docker/build_essential-ubuntu.sh index 6dd4dc41..6b068b3a 100755 --- a/docker/build_essential-ubuntu.sh +++ b/docker/build_essential-ubuntu.sh @@ -14,9 +14,25 @@ apt-get install -yq --no-install-recommends \ sudo apt-get clean +pushd /opt + # CMake -mkdir /opt/cmake -curl https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh > cmake.sh -echo y | bash cmake.sh --prefix=/opt/cmake --exclude-subdir -export PATH="/opt/cmake/bin:$PATH" -rm cmake.sh +curl -o cmake.tgz -L https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.tar.gz +tar xzf cmake.tgz && rm cmake.tgz +ln -s cmake-*x86_64 cmake +export PATH="$PWD/cmake/bin:$PATH" + +# ccache +mkdir -p bin +pushd bin +# ccache compiler override +ln -s "$(which ccache)" g++ +ln -s "$(which ccache)" g++-6 +ln -s "$(which ccache)" g++-7 +ln -s "$(which ccache)" gcc +ln -s "$(which ccache)" gcc-6 +ln -s "$(which ccache)" gcc-7 +export PATH="$PWD:$PATH" +popd + +popd From 3fff29474f05338e7b265e947363ceebe6da0e6d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 13:01:08 +0000 Subject: [PATCH 12/16] prepare for possibly external gadgetron --- docker/devel/test.sh | 6 +++--- docker/docker-compose.yml | 9 +++++++++ docker/user_sirf-ubuntu.sh | 3 +++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docker/devel/test.sh b/docker/devel/test.sh index a227d1d6..33c783da 100755 --- a/docker/devel/test.sh +++ b/docker/devel/test.sh @@ -17,17 +17,17 @@ pushd $SIRF_PATH/../.. # start gadgetron GCONFIG=./INSTALL/share/gadgetron/config/gadgetron.xml [ -f "$GCONFIG" ] || cp "$GCONFIG".example "$GCONFIG" -./INSTALL/bin/gadgetron >& gadgetron.log& +[ -f ./INSTALL/bin/gadgetron ] && ./INSTALL/bin/gadgetron >& gadgetron.log& ctest -VV ret=$? -kill -n 15 $(pidof gadgetron) +[ -n "$(pidof gadgetron)" ] && kill -n 15 $(pidof gadgetron) # print for debugging [ "$DEBUG" != 0 ] && cat builds/SIRF/build/CMakeCache.txt [ "$DEBUG" != 0 ] && cat builds/SIRF/build/Testing/Temporary/LastTest.log # may exceed 4MB travis log limit -[ "$DEBUG" != 0 ] && cat gadgetron.log +[ "$DEBUG" != 0 ] && [ -f gadgetron.log ] && cat gadgetron.log popd diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 254331f1..f310e6b1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -31,3 +31,12 @@ services: cache_from: - ubuntu:18.04 - ccppetmr/sirf:core + gadgetron: + container_name: gadgetron + image: gadgetron/ubuntu_1804_no_cuda:latest + environment: + GADGETRON_RELAY_HOST: sirf + ports: + - "9002:9002" # supervisord web interface + - "9080:9080" # ReST API + - "8002:8002" # CloudBus relay diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index 3c2fa2ef..927b4a86 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -4,11 +4,14 @@ set -ev # SIRF git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b docker /opt/SIRF-SuperBuild pushd /opt/SIRF-SuperBuild + echo $BUILD_FLAGS $EXTRA_BUILD_FLAGS cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . make -j 2 [ -f INSTALL/share/gadgetron/config/gadgetron.xml ] || \ +[ -f INSTALL/share/gadgetron/config/gadgetron.xml.example ] && \ mv INSTALL/share/gadgetron/config/gadgetron.xml.example \ INSTALL/share/gadgetron/config/gadgetron.xml + popd From 5dd4b9334f10ed8f6299e9ab2187468513835337 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 17:15:28 +0000 Subject: [PATCH 13/16] minor external gadgetron tweaks required for #206 --- docker/docker-compose.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f310e6b1..131229c9 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -18,9 +18,12 @@ services: - ccppetmr/sirf:latest stdin_open: true tty: true - cap_add: - - NET_ADMIN - network_mode: "bridge" + # cap_add: + # - NET_ADMIN + #TODO: uncomment for external gadgetron + # network_mode: "host" # host only works on linux: https://docs.docker.com/network/host/ + # depends_on: + # - gadgetron volumes: - ./devel:/devel core: @@ -34,9 +37,15 @@ services: gadgetron: container_name: gadgetron image: gadgetron/ubuntu_1804_no_cuda:latest + restart: unless-stopped environment: - GADGETRON_RELAY_HOST: sirf + GADGETRON_RELAY_HOST: 0.0.0.0 ports: - - "9002:9002" # supervisord web interface + - "9002:9002" # gadgetron - "9080:9080" # ReST API - "8002:8002" # CloudBus relay + - "9888:8888" # ? https://github.com/gadgetron/gadgetron/wiki/How-to-set-up-Gadgetron-cloud-in-the-LAN-environment + - "18002:18002" # ReST API + - "9001:9001" # supervisord web interface + volumes: + - ./devel/gadgetron_data:/tmp/gadgetron_data From e6863633c747b6b77a54d2b03e534e13f0ffca48 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 23:40:22 +0000 Subject: [PATCH 14/16] re-add SIRF essentials --- docker/build_system-ubuntu.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/build_system-ubuntu.sh b/docker/build_system-ubuntu.sh index 0bb70995..9a36fa24 100755 --- a/docker/build_system-ubuntu.sh +++ b/docker/build_system-ubuntu.sh @@ -3,11 +3,8 @@ set -ev # SIRF external dependencies apt-get update -qq apt-get install -yq --no-install-recommends \ - hdfview \ libboost-all-dev \ - libgtest-dev \ + libfftw3-dev \ + libhdf5-serial-dev \ swig apt-get clean - -# Not required (yet) by SIRF -# libopenblas-dev From c357d17414c7d84a69306d4a7b6e803cb1974fd9 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 1 Mar 2019 23:47:24 +0000 Subject: [PATCH 15/16] expose install directory in bash helpers --- docker/build_essential-ubuntu.sh | 3 ++- docker/user_sirf-ubuntu.sh | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/build_essential-ubuntu.sh b/docker/build_essential-ubuntu.sh index 6b068b3a..49724544 100755 --- a/docker/build_essential-ubuntu.sh +++ b/docker/build_essential-ubuntu.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -ev +INSTALL_DIR="${1:-/opt}" # Essential apt-get update -qq apt-get install -yq curl @@ -14,7 +15,7 @@ apt-get install -yq --no-install-recommends \ sudo apt-get clean -pushd /opt +pushd $INSTALL_DIR # CMake curl -o cmake.tgz -L https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.tar.gz diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index 927b4a86..8f7957f5 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash [ -f .bashrc ] && . .bashrc set -ev +INSTALL_DIR="${1:-/opt}" # SIRF -git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b docker /opt/SIRF-SuperBuild -pushd /opt/SIRF-SuperBuild +git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b docker $INSTALL_DIR/SIRF-SuperBuild +pushd $INSTALL_DIR/SIRF-SuperBuild echo $BUILD_FLAGS $EXTRA_BUILD_FLAGS cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . From dbc65af445350713684b92ecbb5a69e2bc9ff7e9 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sat, 2 Mar 2019 02:11:22 +0000 Subject: [PATCH 16/16] add siemens_to_ismrmrd essentials --- docker/build_system-ubuntu.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/build_system-ubuntu.sh b/docker/build_system-ubuntu.sh index 9a36fa24..00baf3ba 100755 --- a/docker/build_system-ubuntu.sh +++ b/docker/build_system-ubuntu.sh @@ -7,4 +7,9 @@ apt-get install -yq --no-install-recommends \ libfftw3-dev \ libhdf5-serial-dev \ swig + +# siemens_to_ismrmrd external dependencies +apt-get install -yq --no-install-recommends \ + libxml2-dev \ + libxslt-dev apt-get clean