@@ -53,6 +53,35 @@ ARG VERSION="N/A"
5353ARG GIT_COMMIT="unknown"
5454RUN make PREFIX=/artifacts/bin cmd-nvidia-ctk-installer
5555
56+ # The rpmdigests stage updates the existing rpm packages to have 256bit digests.
57+ # This is done using fpm.
58+ FROM nvcr.io/nvidia/cuda:13.0.1-base-ubi9 AS rpmdigests
59+
60+ RUN dnf install -y \
61+ rubygems \
62+ ruby-devel \
63+ yum-utils \
64+ rpm-build \
65+ && gem install --no-document fpm
66+
67+ ARG ARTIFACTS_ROOT
68+ COPY ${ARTIFACTS_ROOT}/centos7 /artifacts/packages/centos7-src
69+
70+ WORKDIR /artifacts/packages/centos7
71+
72+ # For each architecture from the source we find all packages and update the
73+ # digests.
74+ RUN for arch in $(ls /artifacts/packages/centos7-src/); do \
75+ mkdir -p /artifacts/packages/centos7/${arch}; \
76+ cd /artifacts/packages/centos7/${arch}; \
77+ # For each package in the source folder we recreate a package to update
78+ # the digests to 256-bit since we're running in a ubi9 container.
79+ for src_package in $(ls /artifacts/packages/centos7-src/${arch}/*.rpm); do \
80+ fpm -s rpm -t rpm ${src_package}; \
81+ done; \
82+ done; \
83+ rm -rf /artifacts/packages/centos7-src
84+
5685# The packaging stage collects the deb and rpm packages built for
5786# supported architectures.
5887FROM nvcr.io/nvidia/distroless/go:v3.2.0-dev AS packaging
@@ -62,9 +91,8 @@ SHELL ["/busybox/sh", "-c"]
6291RUN ln -s /busybox/sh /bin/sh
6392
6493ARG ARTIFACTS_ROOT
65- COPY ${ARTIFACTS_ROOT} /artifacts/packages/
66-
67- WORKDIR /artifacts
94+ COPY ${ARTIFACTS_ROOT}/ubuntu18.04 /artifacts/packages/ubuntu18.04
95+ COPY --from=rpmdigests /artifacts/packages/centos7 /artifacts/packages/centos7
6896
6997# build-args are added to the manifest.txt file below.
7098ARG PACKAGE_VERSION
0 commit comments