-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (20 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Base image: https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ubuntu
FROM unumam/vscode-cpp20
ENV DEBIAN_FRONTEND=noninteractive
# Install the latest version of CUDA 11.1
# https://askubuntu.com/a/1282104
# https://hub.docker.com/r/nvidia/cuda
# https://gitlab.com/nvidia/container-images/cuda/blob/master/dist/11.1/ubuntu20.04-x86_64/runtime/Dockerfile
RUN apt-get update
RUN apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
RUN add-apt-repository ppa:graphics-drivers/ppa
RUN bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
RUN bash -c 'echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda_learn.list'
RUN apt update && apt install -f -y cuda-11-2 && apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Once ready, set your path to point to CUDA binaries:
RUN echo 'export PATH=/usr/local/cuda-11.2/bin${PATH:+:${PATH}}' >> $HOME/.bashrc
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
LABEL org.opencontainers.image.source https://github.com/unumam/docker