-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.gpu
102 lines (88 loc) · 2.89 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
FROM nvidia/cuda:9.0-base-ubuntu16.04
RUN apt-get update && \
apt-get install -y software-properties-common apt-utils && \
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-dev-9-0 \
cuda-cudart-dev-9-0 \
cuda-cufft-dev-9-0 \
cuda-curand-dev-9-0 \
cuda-cusolver-dev-9-0 \
cuda-cusparse-dev-9-0 \
libcudnn7=7.0.5.15-1+cuda9.0 \
curl \
libfreetype6-dev \
libhdf5-serial-dev \
libpng-dev \
libzmq3-dev \
zlib1g-dev \
pkg-config \
rsync \
software-properties-common \
unzip \
wget \
cmake \
python3.6 \
python3.6-dev \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV WARP_CTC_PATH=/opt/warp-ctc/build
ENV CUDA_HOME=/usr/local/cuda
WORKDIR /opt
RUN wget --quiet http://github.com/tensorflow/tensorflow/archive/v1.8.0.zip -O tf_v1.8.0.zip && \
unzip -q tf_v1.8.0.zip -d /opt && \
rm tf_v1.8.0.zip
ENV TENSORFLOW_SRC_PATH=/opt/tensorflow-1.8.0
RUN ls $TENSORFLOW_SRC_PATH
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==1.8.0 \
&& \
python3.6 -m ipykernel.kernelspec
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
WORKDIR /opt
RUN wget --quiet http://github.com/nmiculinic/warp-ctc/archive/master.zip -O warp_ctc.zip && \
unzip -q warp_ctc.zip -d /opt && \
mv warp-ctc-master warp-ctc && \
rm warp_ctc.zip && \
ls
WORKDIR /opt/warp-ctc
RUN mkdir build
WORKDIR /opt/warp-ctc/build
RUN cmake .. && make
ENV WARP_CTC_PATH=/opt/warp-ctc/build
# TensorBoard
EXPOSE 6006
# For CUDA profiling, TensorFlow requires CUPTI.
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
WORKDIR /opt/warp-ctc/tensorflow_binding
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
RUN LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH python3.6 setup.py install
RUN rm /usr/local/cuda/lib64/stubs/libcuda.so.1
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"]