Skip to content

Commit

Permalink
Merge pull request #1432 from eap/feature/container-updates
Browse files Browse the repository at this point in the history
This change updates the Intel and GCC containers fixing the intel build and updating both environments to Ubuntu 24.04 to more closely align with our AWS machine images (AMIs). This update focuses on the Intel and GCC images since they are the core of our supported compiler environments,

What about clang? I will submit a similar fix for clang in an immediate followup change. Container images are especially difficult to update due to their longer builds and slightly different (often conflicting) configuration. I have not included clang in this PR in order to speed the delivery of these two containers (our core supported compiler platforms) and reduce the occurance of merge-related rewrites.

What about oneapi-intel? The new llvm-based intel image will be submitted as a new image config outside the scope of this PR.

## Testing
This has been built and tested on an AWS intel instance.

## Applications / Systems affected
Presubmit CI and containers.

## Issue(s) addressed
Fixes: #1383
  • Loading branch information
eap authored Dec 23, 2024
2 parents 10dd0eb + 0d1dfcd commit 7ac2aa5
Show file tree
Hide file tree
Showing 3 changed files with 209 additions and 85 deletions.
61 changes: 28 additions & 33 deletions configs/containers/docker-ubuntu-gcc-openmpi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ spack:

compilers:
- compiler:
spec: gcc@12.3.0
spec: gcc@13.3.0
paths:
cc: /usr/bin/gcc-12
cxx: /usr/bin/g++-12
f77: /usr/bin/gfortran-12
fc: /usr/bin/gfortran-12
cc: /usr/bin/gcc-13
cxx: /usr/bin/g++-13
f77: /usr/bin/gfortran-13
fc: /usr/bin/gfortran-13
flags: {}
operating_system: ubuntu22.04
operating_system: ubuntu24.04
modules: []
environment: {}
extra_rpaths: []
Expand All @@ -29,16 +29,16 @@ spack:
target: [x86_64]
providers:
mpi: [openmpi@5.0.5]
compiler: [gcc@12.3.0]
compiler: [gcc@13.3.0]
gcc:
buildable: false
externals:
- spec: gcc@12.3.0
- spec: gcc@13.3.0
prefix: /usr
gcc-runtime:
buildable: false
externals:
- spec: gcc-runtime@12.3.0
- spec: gcc-runtime@13.3.0
prefix: /usr
diffutils:
buildable: false
Expand All @@ -55,15 +55,15 @@ spack:
externals:
- spec: git-lfs@3.0.2
prefix: /usr
grep:
llvm:
buildable: false
externals:
- spec: grep@3.7
- spec: llvm@14.0.6
prefix: /usr
mysql:
buildable: false
externals:
- spec: mysql@8.0.39
- spec: mysql@8.0.40
prefix: /usr
qt:
buildable: false
Expand All @@ -76,7 +76,6 @@ spack:
externals:
- spec: wget@1.21.2
prefix: /usr
version: [1.21.2]

specs: []

Expand All @@ -98,7 +97,7 @@ spack:
# Sets the base images for the stages where Spack builds the
# software or where the software gets installed after being built..
images:
os: ubuntu:22.04
os: ubuntu:24.04
spack:
url: https://github.com/jcsda/spack
ref: spack-stack-dev
Expand All @@ -111,12 +110,13 @@ spack:
os_packages:
build:
- bc
- cpp-12
- g++-12
- gcc-12
- gfortran-12
- cpp-13
- g++-13
- gcc-13
- gfortran-13
- git
- git-lfs
- llvm-14
- make
- mysql-server
- qtbase5-dev
Expand All @@ -127,12 +127,13 @@ spack:

final:
- bc
- cpp-12
- g++-12
- gcc-12
- gfortran-12
- cpp-13
- g++-13
- gcc-13
- gfortran-13
- git
- git-lfs
- llvm-14
- make
- mysql-server
- qtbase5-dev
Expand All @@ -157,12 +158,9 @@ spack:
# Copy the spack-stack extension repo into the spack code
COPY spack-ext-SPACK_STACK_HASH/repos/spack-stack $SPACK_ROOT/var/spack/repos/spack-stack
# Register spack-stack extension repo
RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults
# Set the GNU 12.x toolchain as the default compilers.
RUN ln -svf /usr/bin/gfortran-12 /usr/bin/gfortran && \
ln -svf /usr/bin/cpp-12 /usr/bin/cpp && \
ln -svf /usr/bin/gcc-12 /usr/bin/gcc && \
ln -svf /usr/bin/g++-12 /usr/bin/g++
RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults && \
# Needed by py-llvmlite
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-14 100
pre_final: |
# Set environment variables for installing tzdata
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -178,18 +176,15 @@ spack:
final: |
# Copy spack find output from builder
COPY --from=builder /root/spack_find.out /root/spack_find.out
# Set the GNU 12.x toolchain as the default compilers.
RUN ln -svf /usr/bin/gfortran-12 /usr/bin/gfortran && \
ln -svf /usr/bin/cpp-12 /usr/bin/cpp && \
ln -svf /usr/bin/gcc-12 /usr/bin/gcc && \
ln -svf /usr/bin/g++-12 /usr/bin/g++
# Make a non-root user:nonroot / group:nonroot for running MPI
RUN useradd -U -k /etc/skel -s /bin/bash -d /home/nonroot -m nonroot --uid 43891 && \
echo "ulimit -s unlimited" >> /home/nonroot/.bashrc && \
echo "ulimit -v unlimited" >> /home/nonroot/.bashrc && \
echo "export CC=gcc" >> /home/nonroot/.bashrc && \
echo "export CXX=g++" >> /home/nonroot/.bashrc && \
echo "export FC=gfortran" >> /home/nonroot/.bashrc && \
# Needed by py-llvmlite
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-14 100 && \
printf "[credential]\n helper = cache --timeout=7200\n" >> /home/nonroot/.gitconfig && \
mkdir /home/nonroot/.pmix && \
echo "rmaps_default_mapping_policy=:oversubscribe" >> /home/nonroot/.pmix/mca-params.conf && \
Expand Down
Loading

0 comments on commit 7ac2aa5

Please sign in to comment.