diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base index 77950e3a3d..3dec8c48a2 100644 --- a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base @@ -17,6 +17,7 @@ COPY packages.yaml.base /etc/spack/packages.yaml COPY modules.yaml /etc/spack/modules.yaml RUN . /opt/spack/share/spack/setup-env.sh && \ + spack config update modules -y && \ spack compiler find --scope system && \ spack clean -a && \ spack spec zlib diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base index 1a0b7b8d5f..5b74cfacdc 100644 --- a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base @@ -10,4 +10,4 @@ RUN . /opt/spack/share/spack/setup-env.sh && \ spack compiler rm --scope system gcc && \ spack compiler add --scope system && \ spack config --scope system add "packages:all:compiler:[gcc]" && \ - spack external find --scope system cuda + spack external find --scope system --not-buildable cuda diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf index dfbfbb5db1..db73d35a30 100644 --- a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf @@ -35,15 +35,23 @@ RUN . /etc/profile.d/modules.sh && \ # Setup modules RUN . /opt/spack/share/spack/setup-env.sh && \ spack env create --without-view adios2-ci && \ + spack -e adios2-ci config add concretizer:unify:true && \ spack -e adios2-ci add $(spack find --format "/{hash}") && \ + spack -e adios2-ci rm cuda && \ spack -e adios2-ci install && \ spack env activate adios2-ci && \ spack env deactivate && \ rm -rf /root/.spack && \ - spack -e adios2-ci concretize --reuse && \ spack -e adios2-ci env loads +# External CUDA is erroneously treated as a module, in no CUDA builds this is no-op +RUN . /opt/spack/share/spack/setup-env.sh && \ + find $SPACK_ROOT/share/spack/modules -type f -exec sed -i '/module load cuda/d' {} \; + + # Setup default login environment RUN echo 'source /opt/spack/share/spack/setup-env.sh' > /etc/profile.d/zz-adios2-ci-env.sh && \ - echo 'module use ${SPACK_ROOT}/share/spack/modules/linux-almalinux8-haswell' >> /etc/profile.d/zz-adios2-ci-env.sh && \ - echo 'source ${SPACK_ROOT}/var/spack/environments/adios2-ci/loads' >> /etc/profile.d/zz-adios2-ci-env.sh + echo 'eval $(spack env activate --sh adios2-ci)' >> /etc/profile.d/zz-adios2-ci-env.sh && \ + echo 'module use ${SPACK_ROOT}/share/spack/modules/linux-rocky8-haswell' >> /etc/profile.d/zz-adios2-ci-env.sh && \ + echo 'source ${SPACK_ROOT}/var/spack/environments/adios2-ci/loads' >> /etc/profile.d/zz-adios2-ci-env.sh && \ + echo 'export LD_LIBRARY_PATH=/usr/local/cuda/compat/:$LD_LIBRARY_PATH' >> /etc/profile.d/zz-adios2-ci-env.sh