Skip to content

Commit

Permalink
fixup! fixup! CI: adds CUDA build
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jul 13, 2022
1 parent 0d5b1d5 commit c326350
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/ci/images-v2/Dockerfile.ci-spack-el8-base
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 11 additions & 3 deletions scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c326350

Please sign in to comment.