-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.inference.gpu
67 lines (59 loc) · 1.87 KB
/
Dockerfile.inference.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
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM nvidia/cuda:9.0-base-ubuntu16.04
RUN apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:jonathonf/python-3.6 && \
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cuda-command-line-tools-9-0 \
cuda-cublas-9-0 \
cuda-cufft-9-0 \
cuda-curand-9-0 \
cuda-cusolver-9-0 \
cuda-cusparse-9-0 \
libcudnn7=7.0.5.15-1+cuda9.0 \
curl \
libfreetype6-dev \
libhdf5-serial-dev \
libpng-dev \
libzmq3-dev \
pkg-config \
python3.6 \
python3.6-dev \
python3-distutils \
rsync \
software-properties-common \
unzip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
RUN python3.6 -m pip --no-cache-dir install \
Pillow \
h5py \
ipykernel \
jupyter \
matplotlib \
numpy \
pandas \
scipy \
sklearn \
tensorflow-gpu \
&& \
python3.6 -m ipykernel.kernelspec
# TensorBoard
EXPOSE 6006
RUN curl -L https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64.deb --output dump-init.deb && \
dpkg -i dump-init.deb && \
rm -Rf dump-init.deb
# For CUDA profiling, TensorFlow requires CUPTI.
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
WORKDIR /
RUN mkdir /code
RUN mkdir /data
WORKDIR /opt
COPY requirements.txt requirements.txt.bak
RUN cat requirements.txt.bak | grep -v tensorflow > requirements.txt && rm requirements.txt.bak
RUN python3.6 -m pip --no-cache-dir install -r requirements.txt && rm requirements.txt
WORKDIR /code
ENV PYTHONPATH=/code
COPY . .
RUN ["python3.6", "setup.py", "install"]
ENTRYPOINT ["/usr/bin/dumb-init", "--", "python3.6", "-m", "mincall"]