Skip to content

Commit 8aa945d

Browse files
sutaakarclaude
andcommitted
fix: add RPM prefetch for Konflux hermetic builds of MPI images
Konflux hermetic builds inject cachi2 which disables remote dnf repos, causing openssh-server and RDMA package installs to fail. Add rpms.in.yaml and repo configs for RPM prefetching via cachi2. CUDA: only openssh-server needed (RDMA packages already in base image). ROCm: openssh-server, rdma-core, infiniband-diags needed. Lock file must be generated on an entitled RHEL system. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3d7cf81 commit 8aa945d

8 files changed

Lines changed: 795 additions & 23 deletions

File tree

images/runtime/training/py312-cuda130-torch210-openmpi41/Dockerfile.konflux

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,6 @@ RUN sed -i "s/#\(StrictModes \).*/\1no/g" /etc/ssh/sshd_config \
4848
&& echo "StrictModes no" >> /etc/ssh/sshd_config \
4949
&& echo "Port ${SSH_PORT}" >> /etc/ssh/sshd_config
5050

51-
# Install InfiniBand and Mellanox RDMA user-space libraries.
52-
# libibverbs/librdmacm: base RDMA verbs and connection management.
53-
# libibumad: user MAD library required by some OpenMPI components.
54-
# libmlx5: Mellanox ConnectX-4/5/6/7 provider; activates rc_mlx5/dc_mlx5 UCX transports.
55-
# infiniband-diags: diagnostic tools (ibstat, ibstatus, iblinkinfo) for debugging IB connectivity.
56-
RUN dnf install -y \
57-
rdma-core \
58-
libibverbs \
59-
librdmacm \
60-
libibumad \
61-
libmlx5 \
62-
infiniband-diags \
63-
&& dnf clean all
64-
6551
# User-level sshd config for running as non-root
6652
# OpenMPI MCA params file: read by every OpenMPI process regardless of environment variables,
6753
# so this reliably applies to orted and worker processes launched via SSH.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[ubi-9-for-$basearch-baseos-rpms]
2+
name = Red Hat Universal Base Image 9 (RPMs) - BaseOS
3+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/baseos/os
4+
enabled = 1
5+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
6+
gpgcheck = 1
7+
8+
[ubi-9-for-$basearch-baseos-debug-rpms]
9+
name = Red Hat Universal Base Image 9 (Debug RPMs) - BaseOS
10+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/baseos/debug
11+
enabled = 0
12+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
13+
gpgcheck = 1
14+
15+
[ubi-9-for-$basearch-baseos-source-rpms]
16+
name = Red Hat Universal Base Image 9 (Source RPMs) - BaseOS
17+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/baseos/source/SRPMS
18+
enabled = 0
19+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
20+
gpgcheck = 1
21+
22+
[ubi-9-for-$basearch-appstream-rpms]
23+
name = Red Hat Universal Base Image 9 (RPMs) - AppStream
24+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/appstream/os
25+
enabled = 1
26+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
27+
gpgcheck = 1
28+
29+
[ubi-9-for-$basearch-appstream-debug-rpms]
30+
name = Red Hat Universal Base Image 9 (Debug RPMs) - AppStream
31+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/appstream/debug
32+
enabled = 0
33+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
34+
gpgcheck = 1
35+
36+
[ubi-9-for-$basearch-appstream-source-rpms]
37+
name = Red Hat Universal Base Image 9 (Source RPMs) - AppStream
38+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/appstream/source/SRPMS
39+
enabled = 0
40+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
41+
gpgcheck = 1
42+
43+
[ubi-9-for-$basearch-codeready-builder-rpms]
44+
name = Red Hat Universal Base Image 9 (RPMs) - CodeReady Builder
45+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/codeready-builder/os
46+
enabled = 1
47+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
48+
gpgcheck = 1
49+
50+
[ubi-9-for-$basearch-codeready-builder-debug-rpms]
51+
name = Red Hat Universal Base Image 9 (Debug RPMs) - CodeReady Builder
52+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/codeready-builder/debug
53+
enabled = 0
54+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
55+
gpgcheck = 1
56+
57+
[ubi-9-for-$basearch-codeready-builder-source-rpms]
58+
name = Red Hat Universal Base Image 9 (Source RPMs) - CodeReady Builder
59+
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/codeready-builder/source/SRPMS
60+
enabled = 0
61+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
62+
gpgcheck = 1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
contentOrigin:
2+
repofiles:
3+
- ./rpm-repos/ubi.repo
4+
5+
packages:
6+
- openssh-server
7+
8+
arches:
9+
- x86_64
10+
11+
context:
12+
containerfile: Dockerfile.konflux

0 commit comments

Comments
 (0)