-
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.
- Loading branch information
Showing
15 changed files
with
1,269 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
ARG CUDA_VERSION=latest | ||
|
||
FROM nvcr.io/nvidia/cuda:${CUDA_VERSION}-base-amzn2023 AS build | ||
FROM amazonlinux:amzn2023 | ||
|
||
ARG TARGETARCH | ||
ARG CUDA_VERSION | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Remove cuda repository to avoid GPG errors | ||
RUN rm -f /etc/yum.repos.d/cuda* | ||
|
||
RUN yum update -y && yum install -y yum-utils && \ | ||
yum install -y \ | ||
gcc \ | ||
gcc-c++ \ | ||
make \ | ||
ca-certificates \ | ||
kernel-headers \ | ||
git -y && \ | ||
yum clean all \ | ||
rm -rf /var/cache/yum/* | ||
|
||
ENV GOLANG_VERSION=1.23.1 | ||
|
||
# download appropriate binary based on the target architecture for multi-arch builds | ||
RUN OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/aarch64} && \ | ||
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \ | ||
| tar -C /usr/local -xz | ||
|
||
ENV PATH /usr/local/bin:$PATH | ||
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 | ||
COPY --from=build /work/vgpu-util /usr/local/bin | ||
|
||
FROM nvcr.io/nvidia/cuda:${CUDA_VERSION}-base-amzn2023 | ||
|
||
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 | ||
|
||
# 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 "TARGETARCH=$TARGETARCH" | ||
|
||
ADD install.sh /tmp | ||
|
||
RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3b80c87 && \ | ||
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/amzn2023/x86_64/D42D0685.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 - && \ | ||
curl -fsSL -o /etc/yum.repos.d/cuda-amzn2023.repo https://developer.download.nvidia.com/compute/cuda/repos/amzn2023/x86_64/cuda-amzn2023.repo | ||
|
||
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 | ||
|
||
RUN curl -fsSL -o /usr/local/bin/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux && \ | ||
chmod +x /usr/local/bin/extract-vmlinux | ||
|
||
COPY nvidia-driver /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 | ||
|
||
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \ | ||
yum update -y && \ | ||
yum install -y \ | ||
coreutils-single \ | ||
nvidia-fabric-manager-${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 \ | ||
yum update -y && yum install -y yum-utils && \ | ||
yum install -y \ | ||
${CVE_UPDATES} && \ | ||
yum clean all; fi | ||
|
||
# Remove cuda repository to avoid GPG errors | ||
RUN rm -f /etc/yum.repos.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 @@ | ||
# AmazonLinux2 [![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.