From 2ea11b08e8fd3e72dcb0a7ff9af4620c4d98afb0 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 1 Mar 2024 17:45:37 +0600 Subject: [PATCH 01/11] uwuw_unit_tests failing --- CI/Dockerfile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 2d19dd9e6..de613ba9c 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -30,9 +30,11 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Install Build Dependencies RUN apt-get update --yes && \ - apt-get install --yes \ + apt-get install --yes --no-install-recommends \ git \ wget \ + ca-certificates \ + make \ autoconf \ clang \ cmake \ @@ -40,18 +42,8 @@ RUN apt-get update --yes && \ gcc \ gfortran \ libtool \ - libeigen3-dev\ - python3 \ - python3-pip \ - python3-numpy \ - python3-setuptools \ - python3-dev \ - libpython3-dev \ - software-properties-common && \ - apt-get clean && rm -rf /var/lib/apt/lists/* && \ - update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && \ - update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10 && \ - pip install "cython<3"; + libeigen3-dev && \ + apt-get clean && rm -rf /var/lib/apt/lists/*; ARG build_dir ARG install_dir @@ -144,7 +136,7 @@ ENV hdf5_install_dir=${install_dir}/hdf5 RUN mkdir -p ${hdf5_build_dir}/build && \ cd ${hdf5_build_dir} && \ - export HDF5_VERSION_major=`python -c "print('.'.join('${HDF5_VERSION}'.split('.')[:-1]))"` && \ + export HDF5_VERSION_major=$(echo "$HDF5_VERSION" | cut -d. -f1-2) && \ wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION_major}/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz && \ tar -xzf hdf5-${HDF5_VERSION}.tar.gz && \ cd build && \ @@ -174,6 +166,14 @@ ARG DOUBLE_DOWN_VERSION ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab +RUN apt-get update --yes && \ + apt-get install --yes --no-install-recommends \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-numpy \ + cython3 && \ + apt-get clean && rm -rf /var/lib/apt/lists/*; RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ From ff7ed493d433ffa6b99a7c3632c261267503634d Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 1 Mar 2024 22:16:56 +0600 Subject: [PATCH 02/11] streamline dependencies --- CI/Dockerfile | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index de613ba9c..a94b533b9 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -6,18 +6,19 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.14.3 -ARG EMBREE_VERSION=v4.0.1 +ARG MOAB_VERSION=5.5.1 # Setting GEANT4_VERSION=off will disable GEANT4 build ARG GEANT4_VERSION=11.1.2 -ARG MOAB_VERSION=5.5.1 # Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build ARG DOUBLE_DOWN_VERSION=v1.1.0 -ARG CI_JOBS=4 +# Setting DOUBLE_DOWN_VERSION=off will disable EMBREE build +ARG EMBREE_VERSION=v4.0.1 ARG build_dir=/root/build_dir -ARG install_dir=/root/opt +ARG install_dir=/opt ARG COMPILER=gcc +ARG CI_JOBS=4 FROM ubuntu:${UBUNTU_VERSION} AS base @@ -41,7 +42,8 @@ RUN apt-get update --yes && \ g++ \ gcc \ gfortran \ - libtool \ + python3 \ + libpython3-dev \ libeigen3-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/*; @@ -166,15 +168,6 @@ ARG DOUBLE_DOWN_VERSION ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab -RUN apt-get update --yes && \ - apt-get install --yes --no-install-recommends \ - python3-dev \ - python3-pip \ - python3-setuptools \ - python3-numpy \ - cython3 && \ - apt-get clean && rm -rf /var/lib/apt/lists/*; - RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ git clone -b ${MOAB_VERSION} --depth 1 https://bitbucket.org/fathomteam/moab && \ @@ -189,7 +182,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DENABLE_BLASLAPACK=OFF \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ - -DENABLE_PYMOAB=ON && \ + -DENABLE_PYMOAB=OFF && \ make -j${CI_JOBS} && \ make install && \ cd && \ From 986c7d2f80481761c0422c59da4457d97b1aa54b Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 1 Mar 2024 23:46:46 +0600 Subject: [PATCH 03/11] remove wget --- CI/Dockerfile | 163 ++++++++++++++++++++++++-------------------------- 1 file changed, 78 insertions(+), 85 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index a94b533b9..336cf927c 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -5,20 +5,20 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 -ARG HDF5_VERSION=1.14.3 +ARG HDF5_VERSION=hdf5_1_14_3 ARG MOAB_VERSION=5.5.1 # Setting GEANT4_VERSION=off will disable GEANT4 build -ARG GEANT4_VERSION=11.1.2 +ARG GEANT4_VERSION=v11.1.2 # Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build ARG DOUBLE_DOWN_VERSION=v1.1.0 # Setting DOUBLE_DOWN_VERSION=off will disable EMBREE build ARG EMBREE_VERSION=v4.0.1 -ARG build_dir=/root/build_dir -ARG install_dir=/opt +ARG BUILD_DIR=/root/build +ARG INSTALL_DIR=/opt ARG COMPILER=gcc -ARG CI_JOBS=4 +ARG CI_JOBS=6 FROM ubuntu:${UBUNTU_VERSION} AS base @@ -33,25 +33,23 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update --yes && \ apt-get install --yes --no-install-recommends \ git \ - wget \ ca-certificates \ - make \ autoconf \ - clang \ + make \ cmake \ g++ \ - gcc \ + clang \ gfortran \ python3 \ libpython3-dev \ libeigen3-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/*; -ARG build_dir -ARG install_dir +ARG BUILD_DIR +ARG INSTALL_DIR -ENV build_dir=${build_dir} -ENV install_dir=${install_dir} +ENV BUILD_DIR=${BUILD_DIR} +ENV INSTALL_DIR=${INSTALL_DIR} FROM base as compiler-gcc @@ -66,8 +64,8 @@ ENV CXX=clang++ FROM compiler-${COMPILER} as external_deps # accessing gloabl ARGs in build stage -ARG install_dir -ARG build_dir +ARG INSTALL_DIR +ARG BUILD_DIR ARG CI_JOBS ARG CXX ARG CC @@ -75,17 +73,17 @@ ARG DOUBLE_DOWN_VERSION ARG EMBREE_VERSION ARG GEANT4_VERSION -ENV embree_install_dir=${install_dir}/embree -ENV embree_build_dir=${build_dir}/embree +ENV EMBREE_INSTALL_DIR=${INSTALL_DIR}/Embree +ENV EMBREE_BUILD_DIR=${BUILD_DIR}/Embree # Clone and install Embree RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ - mkdir -p ${embree_build_dir}/build && \ - cd ${embree_build_dir} && \ - git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ + mkdir -p ${EMBREE_BUILD_DIR}/build && \ + cd ${EMBREE_BUILD_DIR} && \ + git clone -b ${EMBREE_VERSION} --depth 1 https://github.com/embree/embree.git && \ cd build && \ cmake ../embree \ - -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ + -DCMAKE_INSTALL_PREFIX=${EMBREE_INSTALL_DIR} \ -DEMBREE_TASKING_SYSTEM=INTERNAL \ -DEMBREE_ISPC_SUPPORT=OFF \ -DEMBREE_TUTORIALS=OFF \ @@ -93,24 +91,21 @@ RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ make -j${CI_JOBS} && \ make -j${CI_JOBS} install && \ cd && \ - rm -rf ${embree_build_dir}; \ + rm -rf ${EMBREE_BUILD_DIR}; \ fi -ENV geant4_basename=geant4-v${GEANT4_VERSION} -ENV geant4_tarball=${geant4_basename}.tar.gz -ENV geant4_build_dir=${build_dir}/geant4 -ENV geant4_install_dir=${install_dir}/geant4 +ENV GEANT4_BUILD_DIR=${BUILD_DIR}/geant4 +ENV GEANT4_INSTALL_DIR=${INSTALL_DIR}/geant4 RUN if [ "${GEANT4_VERSION}" != "off" ]; then \ - mkdir -p ${geant4_build_dir}/build && \ - cd ${geant4_build_dir} && \ - wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${GEANT4_VERSION}/${geant4_tarball} --no-check-certificate && \ - tar -xzf ${geant4_tarball} && \ + mkdir -p ${GEANT4_BUILD_DIR}/build && \ + cd ${GEANT4_BUILD_DIR} && \ + git clone -b ${GEANT4_VERSION} --depth 1 https://gitlab.cern.ch/geant4/geant4.git && \ cd build && \ - cmake ../${geant4_basename} \ - -DCMAKE_INSTALL_RPATH=${geant4_install_dir}/lib \ - -DCMAKE_INSTALL_PREFIX=${geant4_install_dir} \ + cmake ../geant4 \ + -DCMAKE_INSTALL_RPATH=${GEANT4_INSTALL_DIR}/lib \ + -DCMAKE_INSTALL_PREFIX=${GEANT4_INSTALL_DIR} \ -DGEANT4_USE_SYSTEM_EXPAT=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_COMPILER=${CXX} \ @@ -119,44 +114,42 @@ RUN if [ "${GEANT4_VERSION}" != "off" ]; then \ make -j${CI_JOBS} && \ make install && \ cd && \ - rm -rf ${geant4_build_dir}; \ + rm -rf ${GEANT4_BUILD_DIR}; \ fi FROM external_deps AS hdf5 # accessing gloabl ARGs in build stage -ARG install_dir -ARG build_dir +ARG INSTALL_DIR +ARG BUILD_DIR ARG CI_JOBS ARG CXX ARG CC ARG HDF5_VERSION -ENV hdf5_build_dir=${build_dir}/hdf5 -ENV hdf5_install_dir=${install_dir}/hdf5 +ENV HDF5_BUILD_DIR=${BUILD_DIR}/hdf5 +ENV HDF5_INSTALL_DIR=${INSTALL_DIR}/hdf5 -RUN mkdir -p ${hdf5_build_dir}/build && \ - cd ${hdf5_build_dir} && \ - export HDF5_VERSION_major=$(echo "$HDF5_VERSION" | cut -d. -f1-2) && \ - wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION_major}/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz && \ - tar -xzf hdf5-${HDF5_VERSION}.tar.gz && \ +RUN mkdir -p ${HDF5_BUILD_DIR}/build && \ + cd ${HDF5_BUILD_DIR} && \ + git clone -b ${HDF5_VERSION} --depth 1 https://github.com/HDFGroup/hdf5.git && \ cd build && \ - ../hdf5-${HDF5_VERSION}/configure --enable-shared \ - --prefix=${hdf5_install_dir} \ + ../hdf5/configure --enable-shared \ + --prefix=${HDF5_INSTALL_DIR} \ CXX=${CXX} \ CC=${CC} && \ make -j${CI_JOBS} && \ make install && \ cd && \ - rm -rf ${hdf5_build_dir} + rm -rf ${HDF5_BUILD_DIR} FROM hdf5 AS moab # accessing gloabl ARGs in build stage -ARG install_dir -ARG build_dir +ARG INSTALL_DIR +ARG BUILD_DIR ARG CI_JOBS ARG CXX ARG CC @@ -165,18 +158,19 @@ ARG DOUBLE_DOWN_VERSION # Set MOAB env variable -ENV moab_build_dir=${build_dir}/moab -ENV moab_install_dir=${install_dir}/moab +ENV MOAB_BUILD_DIR=${BUILD_DIR}/moab +ENV MOAB_INSTALL_DIR=${INSTALL_DIR}/moab -RUN mkdir -p ${moab_build_dir}/build && \ - cd ${moab_build_dir} && \ - git clone -b ${MOAB_VERSION} --depth 1 https://bitbucket.org/fathomteam/moab && \ +RUN mkdir -p ${MOAB_BUILD_DIR}/build && \ + cd ${MOAB_BUILD_DIR} && \ + git clone -b ${MOAB_VERSION} --depth 1 https://bitbucket.org/fathomteam/moab.git && \ cd build && \ cmake ../moab \ - -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib \ + -DCMAKE_INSTALL_RPATH=${HDF5_INSTALL_DIR}/lib:${MOAB_INSTALL_DIR}/lib \ -DCMAKE_BUILD_TYPE=Release \ - -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ - -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ + -DENABLE_HDF5=ON \ + -DHDF5_ROOT=${HDF5_INSTALL_DIR} \ + -DCMAKE_INSTALL_PREFIX=${MOAB_INSTALL_DIR} \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_C_COMPILER=${CC} \ -DENABLE_BLASLAPACK=OFF \ @@ -186,55 +180,54 @@ RUN mkdir -p ${moab_build_dir}/build && \ make -j${CI_JOBS} && \ make install && \ cd && \ - rm -rf ${moab_build_dir} + rm -rf ${MOAB_BUILD_DIR} -ENV double_down_build_dir=${build_dir}/double-down -ENV double_down_install_dir=${install_dir}/double-down +ENV DOUBLE_DOWN_BUILD_DIR=${BUILD_DIR}/double-down +ENV DOUBLE_DOWN_INSTALL_DIR=${INSTALL_DIR}/double-down # Clone and install Double-Down # Performed after moab and embree install as double-down requires moab and embree RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ - mkdir -p ${double_down_build_dir}/build && \ - cd ${double_down_build_dir} && \ + mkdir -p ${DOUBLE_DOWN_BUILD_DIR}/build && \ + cd ${DOUBLE_DOWN_BUILD_DIR} && \ git clone -b ${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ cd build && \ cmake ../double-down \ - -DMOAB_DIR=${moab_install_dir} \ - -DCMAKE_INSTALL_PREFIX=${double_down_install_dir} \ - -DEMBREE_DIR=${embree_install_dir} && \ + -DMOAB_DIR=${MOAB_INSTALL_DIR} \ + -DCMAKE_INSTALL_PREFIX=${DOUBLE_DOWN_INSTALL_DIR} \ + -DEMBREE_DIR=${EMBREE_INSTALL_DIR} && \ make -j${CI_JOBS} && \ make -j${CI_JOBS} install && \ cd && \ - rm -rf ${double_down_build_dir}; \ + rm -rf ${DOUBLE_DOWN_BUILD_DIR}; \ fi FROM moab as dagmc # accessing gloabl ARGs in build stage -ARG install_dir -ARG build_dir +ARG INSTALL_DIR +ARG BUILD_DIR ARG CXX ARG CC ARG GEANT4_VERSION ARG DOUBLE_DOWN_VERSION -ENV dagmc_build_dir=${build_dir}/dagmc -ENV dagmc_install_dir=${install_dir}/dagmc +ENV DAGMC_BUILD_DIR=${BUILD_DIR}/dagmc +ENV DAGMC_INSTALL_DIR=${INSTALL_DIR}/dagmc # copies the enitre git repo into the dockerfile to ensure the submodules can also be found -RUN mkdir -p ${dagmc_build_dir}/build -COPY . ${dagmc_build_dir} -RUN cd ${dagmc_build_dir} && git submodule update --init +COPY . ${DAGMC_BUILD_DIR} -RUN mkdir -p ${dagmc_build_dir}/build && \ - cd ${dagmc_build_dir} && \ +RUN mkdir -p ${DAGMC_BUILD_DIR}/build && \ + cd ${DAGMC_BUILD_DIR} && \ + git submodule update --init && \ cd build && \ cmake ../ \ - -DMOAB_DIR=${moab_install_dir} \ + -DMOAB_DIR=${MOAB_INSTALL_DIR} \ -DBUILD_GEANT4=$([ "${GEANT4_VERSION}" != "off" ] && echo "ON" || echo "OFF") \ - -DGEANT4_DIR=${geant4_install_dir} \ + -DGEANT4_DIR=${GEANT4_INSTALL_DIR} \ -DBUILD_CI_TESTS=ON \ # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 -DBUILD_MW_REG_TESTS=OFF \ @@ -243,28 +236,28 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_C_COMPILER=${CC} \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ - -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ + -DCMAKE_INSTALL_PREFIX=${DAGMC_INSTALL_DIR} \ -DDOUBLE_DOWN=$([ "${DOUBLE_DOWN_VERSION}" != "off" ] && echo "ON" || echo "OFF") \ - -Ddd_ROOT=${double_down_install_dir} && \ + -Ddd_ROOT=${DOUBLE_DOWN_INSTALL_DIR} && \ make -j${CI_JOBS} && \ make install FROM dagmc as dagmc_test -ENV dagmc_build_dir=${build_dir}/dagmc -ENV dagmc_install_dir=${install_dir}/dagmc +ENV DAGMC_BUILD_DIR=${BUILD_DIR}/dagmc +ENV DAGMC_INSTALL_DIR=${INSTALL_DIR}/dagmc # Test DAGMC executables -RUN cd ${dagmc_build_dir}/build && \ - PATH=${dagmc_install_dir}/bin:$PATH CTEST_OUTPUT_ON_FAILURE=1 make test +RUN cd ${DAGMC_BUILD_DIR}/build && \ + PATH=${DAGMC_INSTALL_DIR}/bin:$PATH CTEST_OUTPUT_ON_FAILURE=1 make test # clean out config test directory for next build -RUN cd ${dagmc_build_dir} && \ +RUN cd ${DAGMC_BUILD_DIR} && \ git clean -dxf . # Test DAGMC CMake configuration file -RUN cd ${dagmc_build_dir}/cmake/test_config && \ - cmake . -DDAGMC_ROOT=${dagmc_install_dir} && \ +RUN cd ${DAGMC_BUILD_DIR}/cmake/test_config && \ + cmake . -DDAGMC_ROOT=${DAGMC_INSTALL_DIR} && \ CTEST_OUTPUT_ON_FAILURE=1 make all test From 3b90d4c8ea52b30f9728165f4350148ff137ec91 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 00:29:51 +0600 Subject: [PATCH 04/11] streamline dependencies --- .github/actions/upstream-test/action.yml | 2 +- .github/workflows/docker_publish.yml | 12 ++++---- .../workflows/linux_upstream_test_geant4.yml | 4 +-- .../workflows/linux_upstream_test_hdf5.yml | 4 +-- CI/Dockerfile | 30 ++++++++++++++----- 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 26802f269..76e251b43 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -20,7 +20,7 @@ inputs: hdf5_version: description: Version of HDF5 required: false - default: 1.14.3 + default: hdf5_1_14_3 moab_version: description: Version of MOAB required: false diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 2a23b7c4a..155f710ac 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -23,7 +23,7 @@ jobs: clang, ] hdf5_version : [ - 1.14.3, + hdf5_1_14_3, ] moab_version : [ 5.4.1, @@ -31,8 +31,8 @@ jobs: ] geant4_version : [ off, - 10.7.4, - 11.1.2 + v10.7.4, + v11.1.2 ] double_down_version : [ off, @@ -105,7 +105,7 @@ jobs: clang, ] hdf5_version : [ - 1.14.3, + hdf5_1_14_3, ] moab_version : [ 5.4.1, @@ -113,8 +113,8 @@ jobs: ] geant4_version : [ off, - 10.7.4, - 11.1.2 + v10.7.4, + v11.1.2 ] double_down_version : [ off, diff --git a/.github/workflows/linux_upstream_test_geant4.yml b/.github/workflows/linux_upstream_test_geant4.yml index 514351067..ddc252bc9 100644 --- a/.github/workflows/linux_upstream_test_geant4.yml +++ b/.github/workflows/linux_upstream_test_geant4.yml @@ -1,4 +1,4 @@ -name: Test against newer Geant4 on PR merge +name: Test against Geant4 development branch (master) on PR merge on: # allows us to run workflows manually @@ -27,4 +27,4 @@ jobs: uses: ./.github/actions/upstream-test with: token: ${{ secrets.GITHUB_TOKEN }} - geant_version: 11.1.2 + geant_version: master diff --git a/.github/workflows/linux_upstream_test_hdf5.yml b/.github/workflows/linux_upstream_test_hdf5.yml index d31707d3d..af0a9eca4 100644 --- a/.github/workflows/linux_upstream_test_hdf5.yml +++ b/.github/workflows/linux_upstream_test_hdf5.yml @@ -1,4 +1,4 @@ -name: Test against newer hdf5 on PR merge +name: Test against HDF5 development branch on PR merge on: # allows us to run workflows manually @@ -28,4 +28,4 @@ jobs: uses: ./.github/actions/upstream-test with: token: ${{ secrets.GITHUB_TOKEN }} - hdf5_version: 1.14.3 + hdf5_version: develop diff --git a/CI/Dockerfile b/CI/Dockerfile index 336cf927c..72c6aa844 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -8,9 +8,9 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=hdf5_1_14_3 ARG MOAB_VERSION=5.5.1 # Setting GEANT4_VERSION=off will disable GEANT4 build -ARG GEANT4_VERSION=v11.1.2 +ARG GEANT4_VERSION=off # Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build -ARG DOUBLE_DOWN_VERSION=v1.1.0 +ARG DOUBLE_DOWN_VERSION=off # Setting DOUBLE_DOWN_VERSION=off will disable EMBREE build ARG EMBREE_VERSION=v4.0.1 @@ -51,17 +51,17 @@ ARG INSTALL_DIR ENV BUILD_DIR=${BUILD_DIR} ENV INSTALL_DIR=${INSTALL_DIR} -FROM base as compiler-gcc +FROM base AS compiler-gcc ENV CC=gcc ENV CXX=g++ -FROM base as compiler-clang +FROM base AS compiler-clang ENV CC=clang ENV CXX=clang++ -FROM compiler-${COMPILER} as external_deps +FROM compiler-${COMPILER} AS external_deps # accessing gloabl ARGs in build stage ARG INSTALL_DIR @@ -204,7 +204,7 @@ RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ fi -FROM moab as dagmc +FROM moab AS dagmc # accessing gloabl ARGs in build stage ARG INSTALL_DIR @@ -243,7 +243,7 @@ RUN mkdir -p ${DAGMC_BUILD_DIR}/build && \ make install -FROM dagmc as dagmc_test +FROM dagmc AS dagmc_test ENV DAGMC_BUILD_DIR=${BUILD_DIR}/dagmc ENV DAGMC_INSTALL_DIR=${INSTALL_DIR}/dagmc @@ -261,3 +261,19 @@ RUN cd ${DAGMC_BUILD_DIR}/cmake/test_config && \ cmake . -DDAGMC_ROOT=${DAGMC_INSTALL_DIR} && \ CTEST_OUTPUT_ON_FAILURE=1 make all test +FROM scratch AS binaries + +ARG INSTALL_DIR + +COPY --from=dagmc_test ${INSTALL_DIR} ${INSTALL_DIR} + +ENV PATH=${DAGMC_INSTALL_DIR}/bin:$PATH +ENV PATH=${MOAB_INSTALL_DIR}/bin:$PATH +ENV PATH=${EMBREE_INSTALL_DIR}/bin:$PATH +ENV PATH=${DOUBLE_DOWN_INSTALL_DIR}/bin:$PATH +ENV PATH=${HDF5_INSTALL_DIR}/bin:$PATH +ENV PATH=${GEANT4_INSTALL_DIR}/bin:$PATH + +WORKDIR ${INSTALL_DIR} + +ENTRYPOINT ["/bin/bash"] From 5777b076d3520fc21ec081fb44926274bea2c61e Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 00:31:00 +0600 Subject: [PATCH 05/11] enable geant4 and double down --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 72c6aa844..eb127ead0 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -8,9 +8,9 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=hdf5_1_14_3 ARG MOAB_VERSION=5.5.1 # Setting GEANT4_VERSION=off will disable GEANT4 build -ARG GEANT4_VERSION=off +ARG GEANT4_VERSION=v11.1.2 # Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build -ARG DOUBLE_DOWN_VERSION=off +ARG DOUBLE_DOWN_VERSION=v1.1.0 # Setting DOUBLE_DOWN_VERSION=off will disable EMBREE build ARG EMBREE_VERSION=v4.0.1 From b77bb77773f4cac684e867c30d0c067e89b9b13a Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 01:06:09 +0600 Subject: [PATCH 06/11] add gcc --- CI/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/CI/Dockerfile b/CI/Dockerfile index eb127ead0..19ecf736f 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update --yes && \ autoconf \ make \ cmake \ + gcc \ g++ \ clang \ gfortran \ From d491acf799fa3f3bba2e53e92aa55c29babb8044 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 01:13:02 +0600 Subject: [PATCH 07/11] only over 22 --- .github/workflows/docker_publish.yml | 1 - CI/Dockerfile | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 155f710ac..45f4eeeee 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: ubuntu_version : [ - 20.04, 22.04, ] compiler : [ diff --git a/CI/Dockerfile b/CI/Dockerfile index 19ecf736f..eb127ead0 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -37,7 +37,6 @@ RUN apt-get update --yes && \ autoconf \ make \ cmake \ - gcc \ g++ \ clang \ gfortran \ From 0944001060a6b701f4970d6309b410b525d9a8c6 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 01:13:23 +0600 Subject: [PATCH 08/11] only over 22 --- .github/workflows/docker_publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 45f4eeeee..3b93b808d 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -96,7 +96,6 @@ jobs: strategy: matrix: ubuntu_version : [ - 20.04, 22.04, ] compiler : [ From 05fcbfaf988f77b309775c1ece33071837e37859 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 10:12:11 +0600 Subject: [PATCH 09/11] Add zlib1g-dev for ubuntu 20.04 --- CI/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index eb127ead0..38060c260 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -8,7 +8,7 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=hdf5_1_14_3 ARG MOAB_VERSION=5.5.1 # Setting GEANT4_VERSION=off will disable GEANT4 build -ARG GEANT4_VERSION=v11.1.2 +ARG GEANT4_VERSION=v11.2.1 # Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build ARG DOUBLE_DOWN_VERSION=v1.1.0 # Setting DOUBLE_DOWN_VERSION=off will disable EMBREE build @@ -18,7 +18,7 @@ ARG BUILD_DIR=/root/build ARG INSTALL_DIR=/opt ARG COMPILER=gcc -ARG CI_JOBS=6 +ARG CI_JOBS=4 FROM ubuntu:${UBUNTU_VERSION} AS base @@ -42,6 +42,7 @@ RUN apt-get update --yes && \ gfortran \ python3 \ libpython3-dev \ + zlib1g-dev \ libeigen3-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/*; From a715e9ca477cf100b2c1bed6bbb829c46a562bb6 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 10:12:25 +0600 Subject: [PATCH 10/11] geant4 11.2.1 --- .github/workflows/docker_publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 3b93b808d..39baed063 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -15,6 +15,7 @@ jobs: strategy: matrix: ubuntu_version : [ + 20.04, 22.04, ] compiler : [ @@ -31,7 +32,7 @@ jobs: geant4_version : [ off, v10.7.4, - v11.1.2 + v11.2.1, ] double_down_version : [ off, @@ -96,6 +97,7 @@ jobs: strategy: matrix: ubuntu_version : [ + 20.04, 22.04, ] compiler : [ @@ -112,7 +114,7 @@ jobs: geant4_version : [ off, v10.7.4, - v11.1.2 + v11.2.1, ] double_down_version : [ off, From cf6363ccc1f44ba41880a4658b85591560567f3f Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 2 Mar 2024 13:06:24 +0600 Subject: [PATCH 11/11] Streamline dependencies of docker CI images --- doc/CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index ab2d8cf1d..d2689aaff 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -16,6 +16,7 @@ Next version * Simplify Housekeeping Process for DAGMC (#943) * Allow Double Down v1.1.0 Installation in Dockerfile (#929 #944 #949) * Inline documentation improvements (#945) + * Streamline dependencies of docker CI images (#951) v3.2.3 ====================