Skip to content

Commit 70e3695

Browse files
middelkooptadrianreber
authored andcommitted
Upgrade container to OpenHPC 4.x/Rocky 10
Signed-off-by: Timothy Middelkoop <[email protected]>
1 parent a266dc4 commit 70e3695

File tree

10 files changed

+33
-26
lines changed

10 files changed

+33
-26
lines changed

.github/workflows/build-container.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- 3.x
7+
- 4.x
78
tags:
89
- 'v*'
910
workflow_dispatch:

containers/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# OpenHPC 3.x with Slurm running Rocky9 in a container
1+
# OpenHPC 4.x with Slurm running Rocky10 in a container
22

33
This is a simple single-user container environment for learning and testing
4-
Slurm on OpenHPC 3.x with Rocky9.
4+
Slurm on OpenHPC 4.x with Rocky10.
55

66
The cluster contains a head node, login node, and 8 compute nodes as separate
77
containers with a shared docker network and shared docker storage. The

containers/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ echo "=== setup ${container}"
1010

1111
set -e
1212
echo '=== build openhpc'
13-
"${container}" build -t openhpc/openhpc:3 -f openhpc/Containerfile openhpc \
13+
"${container}" build -t openhpc/openhpc:4 -f openhpc/Containerfile openhpc \
1414
--build-arg USER="${user}" \
1515
--build-arg ARCH="${arch/arm64/aarch64}"
1616

containers/container/Containerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.docker.com/rockylinux/rockylinux:9
1+
FROM registry.docker.com/rockylinux/rockylinux:10
22
## This container is based on ../openhpc/Containerfile and ../node/Containerfile.
33
## The keeps it in a single file for simplicity, please keep containers in sync.
44
## The sections (delimited with a comment) are identical. The scheduler has been removed.
@@ -7,12 +7,12 @@ FROM registry.docker.com/rockylinux/rockylinux:9
77

88
## Base install
99
ARG ARCH=aarch64
10-
RUN dnf install -y http://repos.openhpc.community/OpenHPC/3/EL_9/$ARCH/ohpc-release-3-1.el9.$ARCH.rpm
10+
RUN dnf install -y http://repos.openhpc.community/OpenHPC/4/EL_10/$ARCH/ohpc-release-4-1.el10.$ARCH.rpm
1111

1212
RUN dnf install -y dnf-plugins-core && \
1313
dnf config-manager --set-enabled crb && \
1414
dnf upgrade -y && \
15-
dnf install -y unzip jq procps-ng iproute bind-utils findutils && \
15+
dnf install -y unzip jq yq procps-ng iproute bind-utils findutils && \
1616
dnf install -y ohpc-base
1717

1818
## Common packages
@@ -31,12 +31,12 @@ RUN dnf install -y ohpc-base-compute lmod-ohpc \
3131
git patch file zstd bzip2 xz \
3232
python3 python3-pip \
3333
gcc-c++ gcc-gfortran \
34-
ohpc-gnu14-runtimes gnu14-compilers-ohpc \
35-
openmpi5-pmix-gnu14-ohpc openblas-gnu14-ohpc netcdf-gnu14-openmpi5-ohpc
34+
ohpc-gnu15-runtimes gnu15-compilers-ohpc \
35+
openmpi5-pmix-gnu15-ohpc openblas-gnu15-ohpc netcdf-gnu15-openmpi5-ohpc
3636

3737
## Compilers, runtimes, and libraries.
38-
RUN dnf install -y spack-ohpc ohpc-gnu14-openmpi5-parallel-libs \
39-
ohpc-gnu14-python-libs ohpc-gnu14-runtimes
38+
RUN dnf install -y spack-ohpc ohpc-gnu15-openmpi5-parallel-libs \
39+
ohpc-gnu15-python-libs ohpc-gnu15-runtimes
4040

4141
### Container configuration (unique to this container)
4242

containers/examples/mpi/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
2+
set -e
23

3-
module load gnu13 openmpi5 prun
4+
module load gnu15 openmpi5 prun
45
mpicc mpi.c -o mpi
56
sbatch sbatch.sh

containers/examples/mpi/sbatch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
2-
32
#SBATCH -n 8
43
#SBATCH --tasks-per-node=1
54

6-
module load gnu13 openmpi5 prun
5+
set -e
6+
7+
module load gnu15 openmpi5 prun
78

89
prun ./mpi

containers/head/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openhpc/openhpc:3
1+
FROM openhpc/openhpc:4
22

33
RUN dnf install -y ohpc-slurm-server
44

containers/node/Containerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
FROM openhpc/openhpc:3
1+
FROM openhpc/openhpc:4
22
## Update ../container/Containerfile with any changes made here.
33

44
## Base compute node
55
RUN dnf install -y ohpc-base-compute lmod-ohpc \
66
git patch file zstd bzip2 xz \
77
python3 python3-pip \
88
gcc-c++ gcc-gfortran \
9-
ohpc-gnu14-runtimes gnu14-compilers-ohpc \
10-
openmpi5-pmix-gnu14-ohpc openblas-gnu14-ohpc netcdf-gnu14-openmpi5-ohpc
9+
ohpc-gnu15-runtimes gnu15-compilers-ohpc \
10+
openmpi5-pmix-gnu15-ohpc openblas-gnu15-ohpc netcdf-gnu15-openmpi5-ohpc
1111

1212
## Scheduler
1313
RUN dnf install -y ohpc-slurm-client
1414

1515
## Compilers, runtimes, and libraries.
16-
RUN dnf install -y spack-ohpc ohpc-gnu14-openmpi5-parallel-libs \
17-
ohpc-gnu14-python-libs ohpc-gnu14-runtimes
16+
RUN dnf install -y spack-ohpc ohpc-gnu15-openmpi5-parallel-libs \
17+
ohpc-gnu15-python-libs ohpc-gnu15-runtimes
1818

1919
RUN dnf clean all && \
2020
rm -rf /var/cache/dnf /var/log/dnf.librepo.log /var/log/dnf.rpm.log /var/log/hawkey.log

containers/openhpc/Containerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
FROM registry.docker.com/rockylinux/rockylinux:9
1+
FROM registry.docker.com/rockylinux/rockylinux:10
22
## Update ../container/Containerfile with any changes made here.
33

44
## Base install
55
ARG ARCH=aarch64
6-
RUN dnf install -y http://repos.openhpc.community/OpenHPC/3/EL_9/$ARCH/ohpc-release-3-1.el9.$ARCH.rpm
6+
RUN dnf install -y http://repos.openhpc.community/OpenHPC/4/EL_10/$ARCH/ohpc-release-4-1.el10.$ARCH.rpm
77

88
RUN dnf install -y dnf-plugins-core && \
99
dnf config-manager --set-enabled crb && \
1010
dnf upgrade -y && \
11-
dnf install -y unzip jq procps-ng iproute bind-utils findutils && \
11+
dnf install -y unzip jq yq procps-ng iproute bind-utils findutils && \
1212
dnf install -y ohpc-base
1313

14-
## Configure common image
15-
RUN dnf install -y munge && \
16-
/usr/sbin/create-munge-key
17-
1814
## Common packages
1915
RUN dnf install -y iputils vim rsync unzip git
2016

17+
## Scheduler
18+
RUN dnf install -y munge && \
19+
/usr/sbin/mungekey && \
20+
chown -v munge:munge /etc/munge/munge.key && \
21+
install -v -dp --owner munge --group munge /run/munge
22+
2123
## Create user
2224
ARG USER=auser
2325
RUN useradd --create-home --shell=/bin/bash --user-group $USER && \

containers/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -e
23

34
container=${CONTAINER:-docker}
45
CONTAINER="${container}" ./build.sh
@@ -12,6 +13,7 @@ for I in {0..7}; do
1213
"${container}" run -d --rm "${network}" "${volume}" --name=openhpc-node-"${I}" --hostname=node-"${I}" openhpc/node
1314
done
1415

16+
set +e
1517
echo '=== Login Node (exit to shutdown cluster)'
1618
./ssh.sh
1719

0 commit comments

Comments
 (0)