Skip to content

Commit f09dcae

Browse files
Shiva Kumarshivakunv
authored andcommitted
Add support for rhel10.0 and rhel10.1
Signed-off-by: Shiva Kumar (SW-CLOUD) <[email protected]>
1 parent 67d1da1 commit f09dcae

27 files changed

+3368
-1
lines changed

.common-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ trigger-pipeline:
122122
variables:
123123
DIST: rhel9
124124

125+
.dist-rhel10:
126+
variables:
127+
DIST: rhel10
128+
125129
.dist-fedora36:
126130
variables:
127131
DIST: fedora36
@@ -207,6 +211,14 @@ trigger-pipeline:
207211
rules:
208212
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_TAG == null
209213

214+
.release-rhel10:
215+
# Perform for each DRIVER_VERSION
216+
extends:
217+
- .release-generic
218+
- .driver-versions
219+
rules:
220+
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_TAG == null
221+
210222
.release:
211223
# Perform for each DRIVER_VERSION
212224
extends:
@@ -254,6 +266,15 @@ trigger-pipeline:
254266
OUT_REGISTRY: "${NGC_REGISTRY}"
255267
OUT_IMAGE_NAME: "${NGC_STAGING_REGISTRY}/driver"
256268

269+
.release:staging-rhel10:
270+
extends:
271+
- .release-rhel10
272+
variables:
273+
OUT_REGISTRY_USER: "${NGC_REGISTRY_USER}"
274+
OUT_REGISTRY_TOKEN: "${NGC_REGISTRY_TOKEN}"
275+
OUT_REGISTRY: "${NGC_REGISTRY}"
276+
OUT_IMAGE_NAME: "${NGC_STAGING_REGISTRY}/driver"
277+
257278
# Define an external release step that pushes an image to an external repository.
258279
.release:external:
259280
extends:
@@ -322,6 +343,13 @@ release:staging-rhel9:
322343
needs:
323344
- image-rhel9
324345

346+
release:staging-rhel10:
347+
extends:
348+
- .release:staging
349+
- .dist-rhel10
350+
needs:
351+
- image-rhel10
352+
325353
.release:staging-precompiled:
326354
stage: release
327355
variables:

.github/workflows/image.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ jobs:
3636
- ubuntu24.04
3737
- rhel8
3838
- rhel9
39+
- rhel10
3940
ispr:
4041
- ${{github.event_name == 'pull_request'}}
4142
exclude:
4243
- dist: ubuntu24.04
4344
driver: 535.274.02
45+
- dist: rhel10
46+
driver: 535.274.02
47+
- dist: rhel10
48+
driver: 570.195.03
4449
fail-fast: false
4550
steps:
4651
- uses: actions/checkout@v6
@@ -128,6 +133,10 @@ jobs:
128133
dist: ubuntu24.04
129134
- flavor: azure-fde
130135
dist: ubuntu22.04
136+
- dist: rhel10
137+
driver: 535
138+
- dist: rhel10
139+
driver: 570
131140
steps:
132141
- uses: actions/checkout@v6
133142
name: Check out code

.gitlab-ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ include:
6767
rules:
6868
- if: $CI_PIPELINE_SOURCE != "schedule"
6969

70+
# Define the image build targets
71+
.image-build-rhel10:
72+
# Perform for each DRIVER_VERSION
73+
extends:
74+
- .driver-versions
75+
- .image-build-generic
76+
rules:
77+
- if: $CI_PIPELINE_SOURCE != "schedule"
7078

7179
image-ubuntu20.04:
7280
extends:
@@ -93,6 +101,11 @@ image-rhel9:
93101
- .image-build-rhel9
94102
- .dist-rhel9
95103

104+
image-rhel10:
105+
extends:
106+
- .image-build-rhel10
107+
- .dist-rhel10
108+
96109
image-fedora36:
97110
extends:
98111
- .image-build

.nvidia-ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ image-rhel9:
146146
- .image-pull
147147
- .dist-rhel9
148148

149+
image-rhel10:
150+
extends:
151+
- .image-pull
152+
- .dist-rhel10
153+
149154
# The .scan step forms the base of the image scan operation performed before releasing
150155
# images.
151156
.scan-generic:
@@ -333,6 +338,22 @@ scan-rhel9-arm64:
333338
needs:
334339
- image-rhel9
335340

341+
scan-rhel10-amd64:
342+
extends:
343+
- .scan
344+
- .dist-rhel10
345+
- .platform-amd64
346+
needs:
347+
- image-rhel10
348+
349+
scan-rhel10-arm64:
350+
extends:
351+
- .scan
352+
- .dist-rhel10
353+
- .platform-arm64
354+
needs:
355+
- image-rhel10
356+
336357
.release:ngc-variables:
337358
variables:
338359
OUT_REGISTRY_USER: "${NGC_REGISTRY_USER}"
@@ -451,6 +472,19 @@ release:ngc-rhel9.8:
451472
- .dist-rhel9
452473
variables:
453474
OUT_DIST: "rhel9.8"
475+
release:ngc-rhel10.0:
476+
extends:
477+
- .release:ngc
478+
- .dist-rhel10
479+
variables:
480+
OUT_DIST: "rhel10.0"
481+
482+
release:ngc-rhel10.1:
483+
extends:
484+
- .release:ngc
485+
- .dist-rhel10
486+
variables:
487+
OUT_DIST: "rhel10.1"
454488

455489
generate-build-info:
456490
stage: ngc-publish

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(OUT_DIST)
5454
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)
5555

5656
##### Public rules #####
57-
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 signed_ubuntu24.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
57+
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 signed_ubuntu24.04 rhel8 rhel9 rhel10 flatcar fedora36 sles15.3 precompiled_rhcos
5858
RHCOS_VERSIONS := rhcos4.14 rhcos4.15 rhcos4.16 rhcos4.17 rhcos4.18 rhel9.6
5959
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
6060
BASE_FROM := noble jammy focal

ci/localbuild.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ driver_container_build_rhel()
5959
driver_container_build_simple "rhel7"
6060
driver_container_build_simple "rhel8"
6161
driver_container_build_simple "rhel9"
62+
driver_container_build_simple "rhel10"
6263
}
6364

6465
list_all_containers()

ci/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ done
167167
build "rhel7" "${CONTAINER_VERSION}-rhel7" "$(mk_short_version rhel7)" ""
168168
build "rhel8" "${CONTAINER_VERSION}-rhel8" "$(mk_short_version rhel8)" ""
169169
build "rhel9" "${CONTAINER_VERSION}-rhel9" "$(mk_short_version rhel9)" ""
170+
build "rhel10" "${CONTAINER_VERSION}-rhel10" "$(mk_short_version rhel10)" ""
170171

171172
# Add rhcos tags
172173
docker pull "${REGISTRY}:${CONTAINER_VERSION}-rhel8"

rhel10/Dockerfile

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
ARG BASE_IMAGE=nvcr.io/nvidia/cuda:13.0.1-base-ubi10
2+
3+
FROM ${BASE_IMAGE} as build
4+
5+
ARG TARGETARCH
6+
ARG GOLANG_VERSION
7+
8+
# Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
9+
ARG DRIVER_TYPE=passthrough
10+
ENV DRIVER_TYPE=$DRIVER_TYPE
11+
12+
SHELL ["/bin/bash", "-c"]
13+
14+
RUN dnf install -y git wget
15+
16+
# download appropriate binary based on the target architecture for multi-arch builds
17+
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
18+
wget -nv -O - https://go.dev/dl/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
19+
| tar -C /usr/local -xz
20+
21+
ENV PATH /usr/local/go/bin:$PATH
22+
23+
WORKDIR /work
24+
25+
RUN if [ "$DRIVER_TYPE" = "vgpu" ]; then \
26+
git clone https://github.com/NVIDIA/gpu-driver-container driver && \
27+
cd driver/vgpu/src && \
28+
go build -o vgpu-util && \
29+
mv vgpu-util /work; fi
30+
31+
FROM ${BASE_IMAGE}
32+
33+
ARG TARGETARCH
34+
ENV TARGETARCH=$TARGETARCH
35+
36+
SHELL ["/bin/bash", "-c"]
37+
38+
#ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64
39+
ARG BASE_URL=https://us.download.nvidia.com/tesla
40+
ARG DRIVER_VERSION
41+
ENV DRIVER_VERSION=$DRIVER_VERSION
42+
ARG DRIVER_BRANCH
43+
ENV DRIVER_BRANCH=$DRIVER_BRANCH
44+
45+
# Arg to indicate if driver type is either of passthrough/baremetal or vgpu
46+
ARG DRIVER_TYPE=passthrough
47+
ENV DRIVER_TYPE=$DRIVER_TYPE
48+
ARG VGPU_LICENSE_SERVER_TYPE=NLS
49+
ENV VGPU_LICENSE_SERVER_TYPE=$VGPU_LICENSE_SERVER_TYPE
50+
# Enable vGPU version compability check by default
51+
ARG DISABLE_VGPU_VERSION_CHECK=true
52+
ENV DISABLE_VGPU_VERSION_CHECK=$DISABLE_VGPU_VERSION_CHECK
53+
# Avoid dependency of container-toolkit for driver container
54+
ENV NVIDIA_VISIBLE_DEVICES=void
55+
56+
ADD install.sh /tmp/
57+
58+
RUN NVIDIA_GPGKEY_SUM=afbea87d3b979b3788ef34223aeeb323ade481128e2c133723ae99b8a51368bb && \
59+
OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
60+
curl -fsSL "https://developer.download.nvidia.com/compute/cuda/repos/rhel10/$OS_ARCH/CDF6BA43.pub" | sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
61+
echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
62+
63+
RUN sh /tmp/install.sh depinstall && \
64+
sh /tmp/install.sh setup_cuda_repo && \
65+
curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \
66+
curl -fsSL -o /usr/local/bin/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux && \
67+
chmod +x /usr/local/bin/donkey /usr/local/bin/extract-vmlinux && \
68+
ln -s /sbin/ldconfig /sbin/ldconfig.real
69+
70+
ADD drivers drivers/
71+
72+
# Fetch the installer, fabricmanager and libnvidia-nscq automatically for passthrough/baremetal types
73+
RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
74+
cd drivers && \
75+
DRIVER_ARCH=${TARGETARCH/amd64/x86_64} && DRIVER_ARCH=${DRIVER_ARCH/arm64/aarch64} && \
76+
curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run && \
77+
chmod +x NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run; fi
78+
79+
# Fetch the installer, fabricmanager, libnvidia-nscq, libnvsdm, imex packages
80+
RUN sh /tmp/install.sh extrapkgsinstall
81+
82+
COPY nvidia-driver /usr/local/bin
83+
COPY ocp_dtk_entrypoint /usr/local/bin
84+
COPY common.sh /usr/local/bin
85+
86+
COPY --from=build /work/vgpu-util* /usr/local/bin
87+
88+
WORKDIR /drivers
89+
90+
ARG PUBLIC_KEY=empty
91+
COPY ${PUBLIC_KEY} kernel/pubkey.x509
92+
93+
ARG PRIVATE_KEY
94+
ARG KERNEL_VERSION=latest
95+
96+
LABEL io.k8s.display-name="NVIDIA Driver Container"
97+
LABEL name="NVIDIA Driver Container"
98+
LABEL vendor="NVIDIA"
99+
LABEL version="${DRIVER_VERSION}"
100+
LABEL release="N/A"
101+
LABEL summary="Provision the NVIDIA driver through containers"
102+
LABEL description="See summary"
103+
104+
# Install / upgrade packages here that are required to resolve CVEs
105+
ARG CVE_UPDATES
106+
RUN if [ -n "${CVE_UPDATES}" ]; then \
107+
yum update -y ${CVE_UPDATES} && \
108+
rm -rf /var/cache/yum/*; \
109+
fi
110+
111+
# Remove cuda repository to avoid GPG errors
112+
RUN rm -f /etc/yum.repos.d/cuda.repo
113+
114+
ENTRYPOINT ["nvidia-driver", "init"]

0 commit comments

Comments
 (0)