Skip to content

Commit acc9a34

Browse files
authored
Merge pull request #650 from cgwalters/workaround-link
Workaround hardlinked /etc changes
2 parents 5875d90 + 0b5b374 commit acc9a34

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

training/common/driver-toolkit/Containerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ARG ENABLE_RT=''
77

88
USER root
99

10+
# TODO: rework this monstrosity into a build.sh (or even not shell script)
11+
# The need for the `cp /etc/dnf/dnf.conf` is a workaround for https://github.com/containers/bootc/issues/637
1012
RUN dnf -y update --exclude kernel* \
1113
&& dnf info --installed kernel > /dev/null || dnf install -y kernel-core \
1214
&& if [ "${KERNEL_VERSION}" == "" ]; then \
@@ -16,6 +18,7 @@ RUN dnf -y update --exclude kernel* \
1618
fi \
1719
&& echo "${KERNEL_VERSION}" \
1820
&& dnf -y install dnf-plugin-config-manager \
21+
&& cp -a /etc/dnf/dnf.conf{,.tmp} && mv /etc/dnf/dnf.conf{.tmp,} \
1922
&& dnf config-manager --best --nodocs --setopt=install_weak_deps=False --save \
2023
&& dnf -y install \
2124
kernel-devel-${KERNEL_VERSION} \

training/nvidia-bootc/Containerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ COPY --from=builder --chmod=444 /home/builder/yum-packaging-precompiled-kmod/tmp
9999
# Temporary workaround until the permanent fix for libdnf is merged
100100
COPY nvidia-toolkit-firstboot.service /usr/lib/systemd/system/nvidia-toolkit-firstboot.service
101101

102+
# TODO: rework this monstrosity into a build.sh (or even not shell script)
103+
# The need for the `cp /etc/dnf/dnf.conf` is a workaround for https://github.com/containers/bootc/issues/637
102104
RUN mv /etc/selinux /etc/selinux.tmp \
103105
&& dnf install -y /rpms/kmod-nvidia-*.rpm \
104106
&& if [ "${TARGET_ARCH}" == "" ]; then \
@@ -113,6 +115,7 @@ RUN mv /etc/selinux /etc/selinux.tmp \
113115
CUDA_DASHED_VERSION=${CUDA_VERSION_ARRAY[0]}-${CUDA_VERSION_ARRAY[1]} \
114116
CUDA_REPO_ARCH=${TARGET_ARCH} \
115117
&& if [ "${TARGET_ARCH}" == "aarch64" ]; then CUDA_REPO_ARCH="sbsa"; fi \
118+
&& cp -a /etc/dnf/dnf.conf{,.tmp} && mv /etc/dnf/dnf.conf{.tmp,} \
116119
&& dnf config-manager --best --nodocs --setopt=install_weak_deps=False --save \
117120
&& dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel${OS_VERSION_MAJOR}/${CUDA_REPO_ARCH}/cuda-rhel${OS_VERSION_MAJOR}.repo \
118121
&& dnf -y module enable nvidia-driver:${DRIVER_STREAM}/default \

0 commit comments

Comments
 (0)