Skip to content

Commit aad5cf0

Browse files
authored
Merge pull request #456 from NVIDIA/changes-for-hbi
[rhel9] changes required to use HBI base image
2 parents d49ed12 + 360b952 commit aad5cf0

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

rhel9/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM nvcr.io/nvidia/cuda:13.0.1-base-ubi9 as build
1+
ARG BASE_IMAGE=nvcr.io/nvidia/cuda:13.0.1-base-ubi9
2+
3+
FROM ${BASE_IMAGE} as build
24

35
ARG TARGETARCH
46
ARG GOLANG_VERSION
@@ -54,6 +56,7 @@ RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3
5456
echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
5557

5658
RUN sh /tmp/install.sh depinstall && \
59+
sh /tmp/install.sh setup_cuda_repo && \
5760
curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \
5861
curl -fsSL -o /usr/local/bin/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux && \
5962
chmod +x /usr/local/bin/donkey /usr/local/bin/extract-vmlinux && \
@@ -93,9 +96,6 @@ LABEL release="N/A"
9396
LABEL summary="Provision the NVIDIA driver through containers"
9497
LABEL description="See summary"
9598

96-
# Add NGC DL license from the CUDA image
97-
RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE
98-
9999
# Install / upgrade packages here that are required to resolve CVEs
100100
ARG CVE_UPDATES
101101
RUN if [ -n "${CVE_UPDATES}" ]; then \

rhel9/install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ dep_installer () {
4141

4242
# Download unzboot as kernel images are compressed in the zboot format on RHEL 9 arm64
4343
# unzboot is only available on the EPEL RPM repo
44+
rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9
4445
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
4546
dnf config-manager --enable epel
4647
dnf install -y unzboot
@@ -153,12 +154,19 @@ extra_pkgs_install() {
153154
fi
154155
}
155156

157+
setup_cuda_repo() {
158+
OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa};
159+
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/${OS_ARCH}/cuda-rhel9.repo
160+
}
161+
156162
if [ "$1" = "nvinstall" ]; then
157163
nvidia_installer
158164
elif [ "$1" = "depinstall" ]; then
159165
dep_installer
160166
elif [ "$1" = "extrapkgsinstall" ]; then
161167
extra_pkgs_install
168+
elif [ "$1" = "setup_cuda_repo" ]; then
169+
setup_cuda_repo
162170
else
163171
echo "Unknown function: $1"
164172
fi

rhel9/ocp_dtk_entrypoint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ nv-ctr-run-with-dtk() {
2828
/usr/local/bin/vgpu-util \
2929
/usr/bin/unzboot \
3030
/drivers \
31-
/licenses \
3231
"$DRIVER_TOOLKIT_SHARED_DIR/"
3332

3433
env | sed 's/=/="/' | sed 's/$/"/' > "$DRIVER_TOOLKIT_SHARED_DIR/env"

0 commit comments

Comments
 (0)