-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
548 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
FROM nvidia/cuda:11.4.3-base-ubuntu18.04 | ||
|
||
ENV NVIDIA_VISIBLE_DEVICES=void | ||
|
||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
|
||
RUN dpkg --add-architecture i386 && \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
apt-utils \ | ||
bc \ | ||
binutils \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg2 \ | ||
jq \ | ||
kmod \ | ||
libc6:i386 \ | ||
libelf-dev \ | ||
libssl-dev \ | ||
module-init-tools \ | ||
software-properties-common && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main" > /etc/apt/sources.list && \ | ||
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-updates main" >> /etc/apt/sources.list && \ | ||
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-security main" >> /etc/apt/sources.list && \ | ||
usermod -o -u 0 -g 0 _apt | ||
|
||
RUN 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 | ||
|
||
ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64 | ||
ARG DRIVER_VERSION=535.154.05 | ||
ENV DRIVER_VERSION=$DRIVER_VERSION | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install the userspace components and copy the kernel module sources. | ||
RUN cd /tmp && \ | ||
curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run && \ | ||
sh NVIDIA-Linux-x86_64-$DRIVER_VERSION.run -x && \ | ||
cd NVIDIA-Linux-x86_64-$DRIVER_VERSION* && \ | ||
./nvidia-installer --silent \ | ||
--no-kernel-module \ | ||
--install-compat32-libs \ | ||
--no-nouveau-check \ | ||
--no-nvidia-modprobe \ | ||
--no-rpms \ | ||
--no-backup \ | ||
--no-check-for-alternate-installs \ | ||
--no-libglx-indirect \ | ||
--no-install-libglvnd \ | ||
--x-prefix=/tmp/null \ | ||
--x-module-path=/tmp/null \ | ||
--x-library-path=/tmp/null \ | ||
--x-sysconfig-path=/tmp/null && \ | ||
mkdir -p /usr/src/nvidia-$DRIVER_VERSION && \ | ||
mv LICENSE mkprecompiled kernel /usr/src/nvidia-$DRIVER_VERSION && \ | ||
sed '9,${/^\(kernel\|LICENSE\)/!d}' .manifest > /usr/src/nvidia-$DRIVER_VERSION/.manifest && \ | ||
rm -rf /tmp/* | ||
|
||
COPY nvidia-driver /usr/local/bin | ||
|
||
WORKDIR /usr/src/nvidia-$DRIVER_VERSION | ||
|
||
ARG PUBLIC_KEY=empty | ||
COPY ${PUBLIC_KEY} kernel/pubkey.x509 | ||
|
||
# Add NGC DL license from the CUDA image | ||
RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE | ||
|
||
ENTRYPOINT ["nvidia-driver"] |
Empty file.
Oops, something went wrong.