From ecc996862aceacb674b754e3670ea638f54f974b Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 20 Jun 2024 14:47:27 -0700 Subject: [PATCH] Test one build with local spack configs --- .github/workflows/docker_build_tpls.yml | 120 ++++++++++++------------ docker/tpl-ubuntu-gcc.Dockerfile | 22 +++-- scripts/docker-build-and-push.sh | 3 + 3 files changed, 76 insertions(+), 69 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 504ae0b0..71bf0e28 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -20,71 +20,71 @@ jobs: matrix: include: - - name: Pangea 2 (centos 7.6, gcc 8.3.0, open-mpi 2.1.5, mkl 2019.3) - DOCKER_REPOSITORY: geosx/pangea2-gcc8.3.0-openmpi2.1.5-mkl2019.3 - DOCKERFILE: docker/TotalEnergies/Dockerfile - DOCKER_ROOT_IMAGE: totogaz/pangea2-gcc8.3.0-openmpi2.1.5-mkl2019.3-no-geosx:0.0.1 - INSTALL_DIR_ROOT: /workrd/SCR/GEOSX/install/gcc8 - SPEC: "%gcc@8.3.0~pygeosx~openmp" - - name: Pecan GPU (centos 7.7, gcc 8.2.0, open-mpi 4.0.1, mkl 2019.5, cuda 11.5.119) - DOCKER_REPOSITORY: geosx/pecan-gpu-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119 - DOCKERFILE: docker/TotalEnergies/Dockerfile - DOCKER_ROOT_IMAGE: totogaz/pecan-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119-no-geosx:0.0.1 - HOST_CONFIG: docker/TotalEnergies/pecan-GPU.cmake - INSTALL_DIR_ROOT: /shared/data1/Users/j0436735/travis-deployments/GPU - SPEC: "%gcc@8.2.0+cuda~pygeosx cuda_arch=70 ^cuda@11.5.1+allow-unsupported-compilers" - - name: Pecan CPU (centos 7.7, gcc 8.2.0, open-mpi 4.0.1, mkl 2019.5) - DOCKER_REPOSITORY: geosx/pecan-cpu-gcc8.2.0-openmpi4.0.1-mkl2019.5 - DOCKERFILE: docker/TotalEnergies/Dockerfile - DOCKER_ROOT_IMAGE: totogaz/pecan-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119-no-geosx:0.0.1 - HOST_CONFIG: docker/TotalEnergies/pecan-CPU.cmake - INSTALL_DIR_ROOT: /shared/data1/Users/j0436735/travis-deployments/CPU - SPEC: "%gcc@8.2.0~pygeosx" - - name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10, zlib 1.2.11) - DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 - DOCKERFILE: docker/Stanford/Dockerfile - DOCKER_ROOT_IMAGE: matteofrigo5/sherlock-gcc10.1.0-openmpi4.1.2-cuda11.7.1-openblas0.3.10-zlib1.2.11-no-geosx:0.0.2 - HOST_CONFIG: docker/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10.cmake - INSTALL_DIR_ROOT: /oak/stanford/groups/tchelepi/geos-sherlock/CPU - SPEC: "%gcc@10.1.0~pygeosx" - - name: Sherlock GPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, cuda 11.7.1, openblas 0.3.10, zlib 1.2.11) - DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-cuda11.7.1-openblas0.3.10-zlib1.2.11 - DOCKERFILE: docker/Stanford/Dockerfile - DOCKER_ROOT_IMAGE: matteofrigo5/sherlock-gcc10.1.0-openmpi4.1.2-cuda11.7.1-openblas0.3.10-zlib1.2.11-no-geosx:0.0.2 - HOST_CONFIG: docker/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10-cuda11.7.1-sm70.cmake - INSTALL_DIR_ROOT: /oak/stanford/groups/tchelepi/geos-sherlock/GPU - SPEC: "%gcc@10.1.0~pygeosx cuda_arch=70 ^cuda@11.7.1+allow-unsupported-compilers" + #- name: Pangea 2 (centos 7.6, gcc 8.3.0, open-mpi 2.1.5, mkl 2019.3) + # DOCKER_REPOSITORY: geosx/pangea2-gcc8.3.0-openmpi2.1.5-mkl2019.3 + # DOCKERFILE: docker/TotalEnergies/Dockerfile + # DOCKER_ROOT_IMAGE: totogaz/pangea2-gcc8.3.0-openmpi2.1.5-mkl2019.3-no-geosx:0.0.1 + # INSTALL_DIR_ROOT: /workrd/SCR/GEOSX/install/gcc8 + # SPEC: "%gcc@8.3.0~pygeosx~openmp" + #- name: Pecan GPU (centos 7.7, gcc 8.2.0, open-mpi 4.0.1, mkl 2019.5, cuda 11.5.119) + # DOCKER_REPOSITORY: geosx/pecan-gpu-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119 + # DOCKERFILE: docker/TotalEnergies/Dockerfile + # DOCKER_ROOT_IMAGE: totogaz/pecan-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119-no-geosx:0.0.1 + # HOST_CONFIG: docker/TotalEnergies/pecan-GPU.cmake + # INSTALL_DIR_ROOT: /shared/data1/Users/j0436735/travis-deployments/GPU + # SPEC: "%gcc@8.2.0+cuda~pygeosx cuda_arch=70 ^cuda@11.5.1+allow-unsupported-compilers" + #- name: Pecan CPU (centos 7.7, gcc 8.2.0, open-mpi 4.0.1, mkl 2019.5) + # DOCKER_REPOSITORY: geosx/pecan-cpu-gcc8.2.0-openmpi4.0.1-mkl2019.5 + # DOCKERFILE: docker/TotalEnergies/Dockerfile + # DOCKER_ROOT_IMAGE: totogaz/pecan-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119-no-geosx:0.0.1 + # HOST_CONFIG: docker/TotalEnergies/pecan-CPU.cmake + # INSTALL_DIR_ROOT: /shared/data1/Users/j0436735/travis-deployments/CPU + # SPEC: "%gcc@8.2.0~pygeosx" + #- name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10, zlib 1.2.11) + # DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 + # DOCKERFILE: docker/Stanford/Dockerfile + # DOCKER_ROOT_IMAGE: matteofrigo5/sherlock-gcc10.1.0-openmpi4.1.2-cuda11.7.1-openblas0.3.10-zlib1.2.11-no-geosx:0.0.2 + # HOST_CONFIG: docker/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10.cmake + # INSTALL_DIR_ROOT: /oak/stanford/groups/tchelepi/geos-sherlock/CPU + # SPEC: "%gcc@10.1.0~pygeosx" + #- name: Sherlock GPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, cuda 11.7.1, openblas 0.3.10, zlib 1.2.11) + # DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-cuda11.7.1-openblas0.3.10-zlib1.2.11 + # DOCKERFILE: docker/Stanford/Dockerfile + # DOCKER_ROOT_IMAGE: matteofrigo5/sherlock-gcc10.1.0-openmpi4.1.2-cuda11.7.1-openblas0.3.10-zlib1.2.11-no-geosx:0.0.2 + # HOST_CONFIG: docker/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10-cuda11.7.1-sm70.cmake + # INSTALL_DIR_ROOT: /oak/stanford/groups/tchelepi/geos-sherlock/GPU + # SPEC: "%gcc@10.1.0~pygeosx cuda_arch=70 ^cuda@11.7.1+allow-unsupported-compilers" - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile DOCKER_ROOT_IMAGE: ubuntu:20.04 DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=9" - - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_ROOT_IMAGE: mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04 - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=10" - - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 - DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=11" - - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 - DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=12" - - name: Ubuntu (22.04, clang 15.0.7 + gcc 11.4.0, open-mpi 4.1.2) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-clang15 - DOCKERFILE: docker/tpl-ubuntu-clang.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg CLANG_MAJOR_VERSION=15 --build-arg GCC_MAJOR_VERSION=11" - - name: Ubuntu (20.04, clang 10.0.0 + gcc 9.4.0, open-mpi 4.0.3, cuda-11.8.89) - DOCKER_REPOSITORY: geosx/ubuntu20.04-clang10.0.0-cuda11.8.89 - DOCKERFILE: docker/tpl-ubuntu-clang-cuda.Dockerfile - - name: Centos (7.7, gcc 8.3.1, open-mpi 1.10.7, cuda 11.8.89) - DOCKER_REPOSITORY: geosx/centos7.7-gcc8.3.1-cuda11.8.89 - DOCKERFILE: docker/tpl-centos-gcc-cuda.Dockerfile + #- name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + # DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile + # DOCKER_ROOT_IMAGE: mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04 + # DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=10" + #- name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) + # DOCKER_ROOT_IMAGE: ubuntu:22.04 + # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 + # DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile + # DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=11" + #- name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) + # DOCKER_ROOT_IMAGE: ubuntu:22.04 + # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 + # DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile + # DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=12" + #- name: Ubuntu (22.04, clang 15.0.7 + gcc 11.4.0, open-mpi 4.1.2) + # DOCKER_ROOT_IMAGE: ubuntu:22.04 + # DOCKER_REPOSITORY: geosx/ubuntu22.04-clang15 + # DOCKERFILE: docker/tpl-ubuntu-clang.Dockerfile + # DOCKER_COMPILER_BUILD_ARG: "--build-arg CLANG_MAJOR_VERSION=15 --build-arg GCC_MAJOR_VERSION=11" + #- name: Ubuntu (20.04, clang 10.0.0 + gcc 9.4.0, open-mpi 4.0.3, cuda-11.8.89) + # DOCKER_REPOSITORY: geosx/ubuntu20.04-clang10.0.0-cuda11.8.89 + # DOCKERFILE: docker/tpl-ubuntu-clang-cuda.Dockerfile + #- name: Centos (7.7, gcc 8.3.1, open-mpi 1.10.7, cuda 11.8.89) + # DOCKER_REPOSITORY: geosx/centos7.7-gcc8.3.1-cuda11.8.89 + # DOCKERFILE: docker/tpl-centos-gcc-cuda.Dockerfile steps: - name: Checkout diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile index f24a5dc6..c0867c83 100644 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ b/docker/tpl-ubuntu-gcc.Dockerfile @@ -68,7 +68,9 @@ RUN python3 -m pip install --upgrade pip && \ python3 -m pip install clingo RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - +# Temporary workaround for building newer cmake on local computer connected to lab network +#COPY cmake-3.23.1-linux-x86_64.tar.gz / +#RUN tar --directory=/usr/local --strip-components=1 -xzf cmake-3.23.1-linux-x86_64.tar.gz # This stage is dedicated to TPLs uniquely. # A multi-stage build patern will allow to extract what we need for the GEOSX build. @@ -97,23 +99,25 @@ RUN apt-get install -y --no-install-recommends \ # Clone branch with spack configs # TODO decide landing place of spack recipes -RUN git clone --branch feature/han12/spack_cleanup_recipes \ - --depth 1 \ - --single-branch \ - https://github.com/GEOS-DEV/GEOS.git +#RUN git clone --branch feature/han12/spack_cleanup_recipes \ +# --depth 1 \ +# --single-branch \ +# https://github.com/GEOS-DEV/GEOS.git # Run uberenv # Have to create install directory first for uberenv # -k flag is to ignore SSL errors -RUN --mount=src=.,dst=$SRC_DIR cd GEOS && \ +#RUN --mount=src=.,dst=$SRC_DIR cd GEOS && \ +# mkdir -p ${GEOSX_TPL_DIR} && \ +RUN --mount=src=.,dst=$SRC_DIR cd ${SRC_DIR} && \ mkdir -p ${GEOSX_TPL_DIR} && \ - git submodule init scripts/uberenv && \ - git submodule update && \ +# git submodule init scripts/uberenv && \ +# git submodule update && \ ./scripts/uberenv/uberenv.py \ --spec "%gcc@${GCC_MAJOR_VERSION} +docs" \ --spack-env-file=${SRC_DIR}/docker/spack.yaml \ - --project-json=.uberenv_config.json \ + --project-json=${SRC_DIR}/.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ -k && \ # Remove host-config generated for LvArray diff --git a/scripts/docker-build-and-push.sh b/scripts/docker-build-and-push.sh index ba0f15a2..cac81046 100644 --- a/scripts/docker-build-and-push.sh +++ b/scripts/docker-build-and-push.sh @@ -1,6 +1,9 @@ #!/bin/bash env +# Setup uberenv +git submodule update --init scripts/uberenv + # We save memory for the docker context echo .git > .dockerignore # This script will build and push a DOCKER_REPOSITORY:DOCKER_TAG image build from DOCKERFILE