File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 11.git
22/shared- *
3+ release-v * /**
Original file line number Diff line number Diff line change @@ -53,6 +53,32 @@ ARG VERSION="N/A"
5353ARG GIT_COMMIT="unknown"
5454RUN make PREFIX=/artifacts/bin cmd-nvidia-ctk-installer
5555
56+ #
57+ FROM nvcr.io/nvidia/cuda:13.0.1-base-ubi9 AS rpmdigests
58+
59+ ARG ARTIFACTS_ROOT
60+ COPY ${ARTIFACTS_ROOT} /artifacts/packages/
61+
62+ WORKDIR /artifacts
63+
64+ RUN dnf install -y rubygems \
65+ ruby-devel \
66+ yum-utils \
67+ rpm-build \
68+ && gem install --no-document fpm
69+
70+ WORKDIR /artifacts/packages
71+
72+ RUN mv centos7 centos7-src; mkdir -p centos7; cd centos7-src; \
73+ for arch in $(ls); do \
74+ mkdir -p /artifacts/packages/centos7/$arch; \
75+ cd /artifacts/packages/centos7/$arch; \
76+ for p in $(ls /artifacts/packages/centos7-src/$arch/*.rpm); do \
77+ fpm -s rpm -t rpm $p; \
78+ done; \
79+ done; \
80+ rm -rf /artifacts/packages/centos7-src
81+
5682# The packaging stage collects the deb and rpm packages built for
5783# supported architectures.
5884FROM nvcr.io/nvidia/distroless/go:v3.2.0-dev AS packaging
@@ -61,10 +87,8 @@ USER 0:0
6187SHELL ["/busybox/sh" , "-c" ]
6288RUN ln -s /busybox/sh /bin/sh
6389
64- ARG ARTIFACTS_ROOT
65- COPY ${ARTIFACTS_ROOT} /artifacts/packages/
66-
6790WORKDIR /artifacts
91+ COPY --from=rpmdigests /artifacts/packages/ packages
6892
6993# build-args are added to the manifest.txt file below.
7094ARG PACKAGE_VERSION
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ WORKDIR $DIST_DIR/..
7373COPY packaging/rpm .
7474COPY deployments/systemd/ ${DIST_DIR}/
7575
76- CMD arch=$(uname -m) && \
76+ RUN arch=$(uname -m) && \
7777 rpmbuild --clean --target=$arch -bb \
7878 -D "_topdir $PWD" \
7979 -D "release_date $(date +'%a %b %d %Y')" \
@@ -82,3 +82,4 @@ CMD arch=$(uname -m) && \
8282 -D "release ${PKG_REV}" \
8383 SPECS/nvidia-container-toolkit.spec && \
8484 mv RPMS/$arch/*.rpm /dist
85+
You can’t perform that action at this time.
0 commit comments