-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tariq Ibrahim <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,441 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,109 @@ | ||
FROM nvcr.io/nvidia/cuda:12.6.2-base-ubuntu24.04 as build | ||
|
||
ARG TARGETARCH | ||
ARG GOLANG_VERSION | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
|
||
# Remove cuda repository to avoid GPG errors | ||
RUN rm -f /etc/apt/sources.list.d/cuda* | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
git && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
|
||
# 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} && \ | ||
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \ | ||
| tar -C /usr/local -xz | ||
|
||
ENV PATH /usr/local/go/bin:$PATH | ||
|
||
WORKDIR /work | ||
|
||
RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \ | ||
cd driver/vgpu/src && \ | ||
go build -o vgpu-util && \ | ||
mv vgpu-util /work | ||
|
||
FROM nvcr.io/nvidia/cuda:12.6.2-base-ubuntu24.04 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ARG BASE_URL=https://us.download.nvidia.com/tesla | ||
ARG TARGETARCH | ||
ENV TARGETARCH=$TARGETARCH | ||
ARG DRIVER_VERSION | ||
ENV DRIVER_VERSION=$DRIVER_VERSION | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Arg to indicate if driver type is either of passthrough(baremetal) or vgpu | ||
ARG DRIVER_TYPE=passthrough | ||
ENV DRIVER_TYPE=$DRIVER_TYPE | ||
ARG DRIVER_BRANCH=550 | ||
ENV DRIVER_BRANCH=$DRIVER_BRANCH | ||
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 | ||
ENV NVIDIA_VISIBLE_DEVICES=void | ||
|
||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
|
||
RUN echo "TARGETARCH=$TARGETARCH" | ||
|
||
ADD install.sh /tmp | ||
|
||
# Fetch GPG keys for CUDA repo | ||
RUN apt-key del 7fa2af80 && OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \ | ||
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/3bf863cc.pub" | ||
|
||
RUN /tmp/install.sh reposetup && /tmp/install.sh depinstall && \ | ||
curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \ | ||
chmod +x /usr/local/bin/donkey | ||
|
||
COPY nvidia-driver /usr/local/bin | ||
|
||
COPY --from=build /work/vgpu-util /usr/local/bin | ||
|
||
ADD drivers drivers/ | ||
|
||
# Fetch the installer automatically for passthrough/baremetal types | ||
RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \ | ||
cd drivers && \ | ||
/tmp/install.sh download_installer; fi | ||
|
||
# Fabric manager packages are not available for arm64 | ||
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \ | ||
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi | ||
|
||
WORKDIR /drivers | ||
|
||
ARG PUBLIC_KEY=empty | ||
COPY ${PUBLIC_KEY} kernel/pubkey.x509 | ||
|
||
# Install / upgrade packages here that are required to resolve CVEs | ||
ARG CVE_UPDATES | ||
RUN if [ -n "${CVE_UPDATES}" ]; then \ | ||
apt-get update && apt-get upgrade -y ${CVE_UPDATES} && \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
fi | ||
|
||
# Remove cuda repository to avoid GPG errors | ||
RUN rm -f /etc/apt/sources.list.d/cuda* | ||
|
||
# Add NGC DL license from the CUDA image | ||
RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE | ||
|
||
ENTRYPOINT ["nvidia-driver", "init"] |
This file contains 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,3 @@ | ||
# Ubuntu 20.04 [![build status](https://gitlab.com/nvidia/driver/badges/master/build.svg)](https://gitlab.com/nvidia/driver/commits/master) | ||
|
||
See https://github.com/NVIDIA/nvidia-docker/wiki/Driver-containers-(Beta) |
This file contains 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 @@ | ||
# Folder for downloading vGPU drivers and dependent metadata files |
Empty file.
Oops, something went wrong.