Created
March 15, 2024 04:04
-
-
Save moycat/e15a7190101de9fecaf38116ab45211f to your computer and use it in GitHub Desktop.
Dockerfile for moycat/nvidia-dind
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
FROM ubuntu:22.04 | |
ARG VERSION=5:25.0.4-1~ubuntu.22.04~jammy | |
RUN apt update \ | |
&& apt install -y ca-certificates curl gpg \ | |
&& install -m 0755 -d /etc/apt/keyrings \ | |
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \ | |
&& chmod a+r /etc/apt/keyrings/docker.asc \ | |
&& echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | |
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" > \ | |
/etc/apt/sources.list.d/docker.list \ | |
&& curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ | |
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ | |
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' > \ | |
/etc/apt/sources.list.d/nvidia-container-toolkit.list \ | |
&& apt update \ | |
&& apt install -y docker-ce=$VERSION docker-ce-cli=$VERSION containerd.io nvidia-container-toolkit \ | |
&& nvidia-ctk runtime configure --runtime=docker \ | |
&& apt clean && rm -rf /var/lib/apt/lists/* | |
ENTRYPOINT /usr/bin/docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment