forked from lambdal/lambda-stack-dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.bionic
More file actions
37 lines (33 loc) · 1.41 KB
/
Dockerfile.bionic
File metadata and controls
37 lines (33 loc) · 1.41 KB
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
29
30
31
32
33
34
35
36
37
FROM ubuntu:18.04
WORKDIR /root/
# Add libcuda dummy dependency
ADD control .
RUN apt-get update && \
apt-get install --yes equivs && \
equivs-build control && \
dpkg -i libcuda1-dummy_10.0_all.deb && \
rm control libcuda1-dummy_10.0_all.deb && \
apt-get remove --yes --purge --autoremove equivs && \
rm -rf /var/lib/apt/lists/*
# Setup Lambda repository
ADD lambda.gpg .
RUN apt-get update && \
apt-get install --yes gnupg && \
apt-key add lambda.gpg && \
rm lambda.gpg && \
echo "deb http://archive.lambdalabs.com/ubuntu bionic main" > /etc/apt/sources.list.d/lambda.list && \
echo "Acquire::http::Pipeline-Depth 0;" > /etc/apt/apt.conf.d/99fixbadproxy && \
echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99fixbadproxy && \
echo "Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/99fixbadproxy && \
echo "Package: *" > /etc/apt/preferences.d/lambda && \
echo "Pin: origin archive.lambdalabs.com" >> /etc/apt/preferences.d/lambda && \
echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/lambda && \
echo "cudnn cudnn/license_preseed select ACCEPT" | debconf-set-selections && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends --yes lambda-stack-cuda lambda-server && \
rm -rf /var/lib/apt/lists/*
# Setup for nvidia-docker
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.0"