Skip to content

Commit

Permalink
Merge pull request #3484 from vicentebolea/update-almalinux-images
Browse files Browse the repository at this point in the history
ci: migrate to almalinux, cuda base image
  • Loading branch information
vicentebolea committed Feb 14, 2023
2 parents 68b40e7 + 45fd1a7 commit 865f74c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/ci/images-v2/Dockerfile.ci-spack-el8-base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=almalinux/almalinux:8
ARG BASE_IMAGE=almalinux:8
FROM $BASE_IMAGE

RUN dnf upgrade -y && \
Expand Down
14 changes: 14 additions & 0 deletions scripts/ci/images-v2/Dockerfile.ci-spack-el8-cuda-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG BASE_IMAGE=ornladios/adios2:ci-spack-el8-base
FROM $BASE_IMAGE

RUN yum config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo

# Install the gcc fortran compiler missing from the base image
RUN dnf install -y gcc-gfortran cuda && \
dnf clean all

# Add the compilers to spack
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]"
2 changes: 1 addition & 1 deletion scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=dockerfile
ARG COMPILER_IMG_BASE

FROM almalinux/almalinux:8 AS builder
FROM almalinux:8 AS builder
ARG COMPILER_IMG_BASE

WORKDIR /root
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/images-v2/build-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "${BASE_DIR}/build-functions.sh"

message1 "Building ci-spack-el8 base image"
if ! build_squash \
almalinux/almalinux:8 \
almalinux:8 \
ornladios/adios2:ci-spack-el8-base \
Dockerfile.ci-spack-el8-base
then
Expand Down
14 changes: 12 additions & 2 deletions scripts/ci/images-v2/build-cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ set -ex
BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE}))
source "${BASE_DIR}/build-functions.sh"

message1 "Building cuda base image"
if ! build_squash \
ornladios/adios2:ci-spack-el8-base \
ornladios/adios2:ci-spack-el8-cuda-base \
Dockerfile.ci-spack-el8-cuda-base
then
echo "Error: Failed to build cuda base image"
exit 3
fi

message1 "Building ci-spack-el8 leaf image"
build_conf=gcc8
build_conf=cuda
if ! build_squash \
ornladios/adios2:ci-spack-el8-gcc8-base \
ornladios/adios2:ci-spack-el8-cuda-base \
ornladios/adios2:ci-spack-el8-cuda-serial \
Dockerfile.ci-spack-el8-leaf \
"--build-arg=COMPILER_IMG_BASE=${build_conf}
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/images-v2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if [ $enable_base -eq 1 ]
then
message1 "Building ci base image"
if ! build_squash \
almalinux/almalinux:8 \
almalinux:8 \
ornladios/adios2:ci-spack-el8-base \
Dockerfile.ci-spack-el8-base
then
Expand Down

0 comments on commit 865f74c

Please sign in to comment.