-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-gpu
53 lines (45 loc) · 1.7 KB
/
Dockerfile-gpu
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
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM ubuntu:16.04
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV BASH_ENV /etc/profile
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
--no-install-recommends \
libcuda1-384 \
build-essential \
unzip \
file \
git \
ca-certificates \
rsync && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY _deps/cuda_9.1.85_387.26_linux .
COPY _deps/cuda_9.1.85.1_linux .
COPY _deps/cuda_9.1.85.2_linux .
COPY _deps/cuda_9.1.85.3_linux .
COPY _deps/cudnn-9.1-linux-x64-v7.1.tgz .
RUN ./cuda_9.1.85_387.26_linux --silent --toolkit --override && \
./cuda_9.1.85.1_linux --silent --accept-eula && \
./cuda_9.1.85.2_linux --silent --accept-eula && \
./cuda_9.1.85.3_linux --silent --accept-eula && \
tar zxf cudnn-9.1-linux-x64-v7.1.tgz -C /usr/local/cuda-9.1 --strip-components=1 && \
rm cuda_9.1.85_387.26_linux cuda_9.1.85.*_linux cudnn-9.1-linux-x64-v7.1.tgz
COPY _deps/bazel-0.11.0-installer-linux-x86_64.sh .
RUN bash bazel-0.11.0-installer-linux-x86_64.sh --prefix=/opt/bazel-0.11.0 && \
echo 'export PATH=$PATH:/opt/bazel-0.11.0/bin' > /etc/profile.d/bazel.sh && \
rm bazel-0.11.0-installer-linux-x86_64.sh
COPY _deps/Miniconda3-4.5.1-Linux-x86_64.sh .
RUN bash Miniconda3-4.5.1-Linux-x86_64.sh -b -f -p /opt/conda && \
echo 'export PATH=$PATH:/opt/conda/bin' > /etc/profile.d/conda.sh && \
/opt/conda/bin/conda update -q -y -n base conda && \
/opt/conda/bin/conda install -q -y numpy && \
rm Miniconda3-4.5.1-Linux-x86_64.sh
RUN useradd -m tensorflow && \
passwd -d tensorflow
USER tensorflow
WORKDIR /home/tensorflow
CMD ["/bin/bash"]