From ce2207d168c6c4bbca4854e7aba02f8563a90c17 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 24 Jan 2024 16:11:22 -0700 Subject: [PATCH] Update configs/containers/docker-ubuntu-intel-impi.yaml, configs/containers/docker-ubuntu-clang-mpich.yaml, configs/containers/docker-ubuntu-gcc-openmpi.yaml and setup.sh with name of new spack-stack extension repo --- .../containers/docker-ubuntu-clang-mpich.yaml | 13 +++++-------- .../containers/docker-ubuntu-gcc-openmpi.yaml | 17 ++++++++++------- .../containers/docker-ubuntu-intel-impi.yaml | 6 ++++++ setup.sh | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/configs/containers/docker-ubuntu-clang-mpich.yaml b/configs/containers/docker-ubuntu-clang-mpich.yaml index c69bd530e..bf9cf4cde 100644 --- a/configs/containers/docker-ubuntu-clang-mpich.yaml +++ b/configs/containers/docker-ubuntu-clang-mpich.yaml @@ -174,14 +174,11 @@ spack: # Extra instructions extra_instructions: - pre_build: | - # Copy the spack extension repos into the spack code - ADD spack-ext-SPACK_STACK_HASH/repos/* $SPACK_ROOT/var/spack/repos/ - # Register spack extension repos - RUN spack repo add $SPACK_ROOT/var/spack/repos/jcsda-emc --scope defaults \ - spack repo add $SPACK_ROOT/var/spack/repos/jcsda-emc-bundles --scope defaults - + # Copy the spack-stack extension repo into the spack code + COPY spack-ext-SPACK_STACK_HASH/repos/spack-stack $SPACK_ROOT/var/spack/repos/jcsda-emc + # Register spack-stack extension repo + RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults # Create symbolic links for clang compilers RUN cd /usr/bin && \ ln -svf clang-10 clang && \ @@ -213,7 +210,7 @@ spack: spack env activate -d . && \ spack find 2>&1 | tee /root/spack_find.out pre_final: | - #Set environment variables for installing tzdata + # Set environment variables for installing tzdata ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC ENV MPICH_VERSION=4.1.1 diff --git a/configs/containers/docker-ubuntu-gcc-openmpi.yaml b/configs/containers/docker-ubuntu-gcc-openmpi.yaml index 7c2ca47b8..fc4c3ec38 100644 --- a/configs/containers/docker-ubuntu-gcc-openmpi.yaml +++ b/configs/containers/docker-ubuntu-gcc-openmpi.yaml @@ -35,12 +35,11 @@ spack: externals: - spec: gcc@9.4.0 prefix: /usr - # Try this next time, already used for clang/intel - #gmake: - # buildable: false - # externals: - # - spec: gmake@4.2.1 - # prefix: /usr + gmake: + buildable: false + externals: + - spec: gmake@4.2.1 + prefix: /usr diffutils: buildable: false externals: @@ -150,8 +149,12 @@ spack: # Extra instructions extra_instructions: + # Copy the spack-stack extension repo into the spack code + COPY spack-ext-SPACK_STACK_HASH/repos/spack-stack $SPACK_ROOT/var/spack/repos/jcsda-emc + # Register spack-stack extension repo + RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults pre_final: | - #Set environment variables for installing tzdata + # Set environment variables for installing tzdata ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC ENV CC=gcc diff --git a/configs/containers/docker-ubuntu-intel-impi.yaml b/configs/containers/docker-ubuntu-intel-impi.yaml index abc283707..07a4c9ba9 100644 --- a/configs/containers/docker-ubuntu-intel-impi.yaml +++ b/configs/containers/docker-ubuntu-intel-impi.yaml @@ -171,6 +171,11 @@ spack: # Extra instructions extra_instructions: pre_build: | + # Copy the spack-stack extension repo into the spack code + COPY spack-ext-SPACK_STACK_HASH/repos/spack-stack $SPACK_ROOT/var/spack/repos/jcsda-emc + # Register spack-stack extension repo + RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults + # Install Intel compilers and MPI library RUN apt update && apt install apt-utils && \ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \ @@ -189,6 +194,7 @@ spack: spack env activate -d . && \ spack find 2>&1 | tee /root/spack_find.out final: | + # Install Intel compilers and MPI library RUN apt update && apt install apt-utils && \ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \ diff --git a/setup.sh b/setup.sh index bd7050d20..ad4f32ca5 100755 --- a/setup.sh +++ b/setup.sh @@ -24,7 +24,7 @@ fi # Register the jcsda-emc repos msg1="Added repo with namespace" msg2="Repository is already registered with Spack" -for repo in jcsda-emc jcsda-emc-bundles; do +for repo in spack-stack; do repodir=${SPACK_STACK_DIR}/spack-ext/repos/$repo othererrors=$( ( spack repo add $repodir --scope defaults |& grep -v -e "$msg1" -e "$msg2" ) || true ) if [ $(echo "$othererrors" | grep -c .) -ne 0 ]; then