forked from lambdal/lambda-stack-dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.bionic
40 lines (36 loc) · 1.25 KB
/
Dockerfile.bionic
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
38
39
40
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_11.8_all.deb && \
rm control libcuda1-dummy_11.8* && \
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 "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 \
--yes \
--no-install-recommends \
--option "Acquire::http::No-Cache=true" \
--option "Acquire::http::Pipeline-Depth=0" \
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"