-
Notifications
You must be signed in to change notification settings - Fork 67
Add support for rhel10.0 and rhel10.1 #496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shivakunv
wants to merge
1
commit into
main
Choose a base branch
from
supportrhel10
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| ARG BASE_IMAGE=nvcr.io/nvidia/cuda:13.0.1-base-ubi10 | ||
|
|
||
| FROM ${BASE_IMAGE} as build | ||
|
|
||
| ARG TARGETARCH | ||
| ARG GOLANG_VERSION | ||
|
|
||
| # Arg to indicate if driver type is either of passthrough(baremetal) or vgpu | ||
| ARG DRIVER_TYPE=passthrough | ||
| ENV DRIVER_TYPE=$DRIVER_TYPE | ||
|
|
||
| SHELL ["/bin/bash", "-c"] | ||
|
|
||
| RUN dnf install -y git wget | ||
|
|
||
| # download appropriate binary based on the target architecture for multi-arch builds | ||
| RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \ | ||
| wget -nv -O - https://go.dev/dl/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \ | ||
| | tar -C /usr/local -xz | ||
|
|
||
| ENV PATH /usr/local/go/bin:$PATH | ||
|
|
||
| WORKDIR /work | ||
|
|
||
| RUN if [ "$DRIVER_TYPE" = "vgpu" ]; then \ | ||
| git clone https://github.com/NVIDIA/gpu-driver-container driver && \ | ||
| cd driver/vgpu/src && \ | ||
| go build -o vgpu-util && \ | ||
| mv vgpu-util /work; fi | ||
|
|
||
| FROM ${BASE_IMAGE} | ||
|
|
||
| ARG TARGETARCH | ||
| ENV TARGETARCH=$TARGETARCH | ||
|
|
||
| SHELL ["/bin/bash", "-c"] | ||
|
|
||
| #ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64 | ||
| ARG BASE_URL=https://us.download.nvidia.com/tesla | ||
| ARG DRIVER_VERSION | ||
| ENV DRIVER_VERSION=$DRIVER_VERSION | ||
| ARG DRIVER_BRANCH | ||
| ENV DRIVER_BRANCH=$DRIVER_BRANCH | ||
|
|
||
| # Arg to indicate if driver type is either of passthrough/baremetal or vgpu | ||
| ARG DRIVER_TYPE=passthrough | ||
| ENV DRIVER_TYPE=$DRIVER_TYPE | ||
| ARG VGPU_LICENSE_SERVER_TYPE=NLS | ||
| ENV VGPU_LICENSE_SERVER_TYPE=$VGPU_LICENSE_SERVER_TYPE | ||
| # Enable vGPU version compability check by default | ||
| ARG DISABLE_VGPU_VERSION_CHECK=true | ||
| ENV DISABLE_VGPU_VERSION_CHECK=$DISABLE_VGPU_VERSION_CHECK | ||
| # Avoid dependency of container-toolkit for driver container | ||
| ENV NVIDIA_VISIBLE_DEVICES=void | ||
|
|
||
| ADD install.sh /tmp/ | ||
|
|
||
| RUN NVIDIA_GPGKEY_SUM=afbea87d3b979b3788ef34223aeeb323ade481128e2c133723ae99b8a51368bb && \ | ||
shivakunv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \ | ||
| 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 && \ | ||
| echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict - | ||
|
|
||
| RUN sh /tmp/install.sh depinstall && \ | ||
| sh /tmp/install.sh setup_cuda_repo && \ | ||
| curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \ | ||
| curl -fsSL -o /usr/local/bin/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux && \ | ||
| chmod +x /usr/local/bin/donkey /usr/local/bin/extract-vmlinux && \ | ||
| ln -s /sbin/ldconfig /sbin/ldconfig.real | ||
|
|
||
| ADD drivers drivers/ | ||
|
|
||
| # Fetch the installer, fabricmanager and libnvidia-nscq automatically for passthrough/baremetal types | ||
| RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \ | ||
| cd drivers && \ | ||
| DRIVER_ARCH=${TARGETARCH/amd64/x86_64} && DRIVER_ARCH=${DRIVER_ARCH/arm64/aarch64} && \ | ||
| curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run && \ | ||
| chmod +x NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run; fi | ||
|
|
||
| # Fetch the installer, fabricmanager, libnvidia-nscq, libnvsdm, imex packages | ||
| RUN sh /tmp/install.sh extrapkgsinstall | ||
|
|
||
| COPY nvidia-driver /usr/local/bin | ||
| COPY ocp_dtk_entrypoint /usr/local/bin | ||
| COPY common.sh /usr/local/bin | ||
|
|
||
| COPY --from=build /work/vgpu-util* /usr/local/bin | ||
|
|
||
| WORKDIR /drivers | ||
|
|
||
| ARG PUBLIC_KEY=empty | ||
| COPY ${PUBLIC_KEY} kernel/pubkey.x509 | ||
|
|
||
| ARG PRIVATE_KEY | ||
| ARG KERNEL_VERSION=latest | ||
|
|
||
| LABEL io.k8s.display-name="NVIDIA Driver Container" | ||
| LABEL name="NVIDIA Driver Container" | ||
| LABEL vendor="NVIDIA" | ||
| LABEL version="${DRIVER_VERSION}" | ||
| LABEL release="N/A" | ||
| LABEL summary="Provision the NVIDIA driver through containers" | ||
| LABEL description="See summary" | ||
|
|
||
| # Install / upgrade packages here that are required to resolve CVEs | ||
| ARG CVE_UPDATES | ||
| RUN if [ -n "${CVE_UPDATES}" ]; then \ | ||
| yum update -y ${CVE_UPDATES} && \ | ||
| rm -rf /var/cache/yum/*; \ | ||
| fi | ||
|
|
||
| # Remove cuda repository to avoid GPG errors | ||
| RUN rm -f /etc/yum.repos.d/cuda.repo | ||
|
|
||
| ENTRYPOINT ["nvidia-driver", "init"] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.