-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-utils
31 lines (23 loc) · 1.3 KB
/
docker-utils
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
26
27
28
# --------------------------------------------------------------------
# BUILD
# --------------------------------------------------------------------
FROM ubuntu:latest
RUN apt-get update && apt-get upgrade -y
RUN apt-get install curl gnupg2 -y
# --------------------------------------------------------------------
# SETUP GPU Drivers
# --------------------------------------------------------------------
RUN curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
RUN dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
RUN rm cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
RUN apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install cuda -y
# --------------------------------------------------------------------
# SETUP GPU Drivers
# --------------------------------------------------------------------
RUN curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
RUN curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu18.04/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list
RUN apt-get update
RUN apt-get install nvidia-container-toolkit -y
# docker run --gpus all 417c3cdfead3 nvidia-smi