-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
63 lines (58 loc) · 1.61 KB
/
Dockerfile
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
FROM tensorflow/tensorflow:latest-gpu
# #
# Install system dependancy
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
wget \
libgtk2.0-dev \
pkg-config \
libavcodec-dev \
libavformat-dev \
libswscale-dev\
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libdc1394-22-dev \
libatlas-base-dev \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
libhdf5-serial-dev \
libleveldb-dev \
liblmdb-dev \
libprotobuf-dev \
libsnappy-dev \
protobuf-compiler \
python-dev \
python-numpy \
python-pip \
python-tk \
python-scipy \
python-skimage && \
rm -rf /var/lib/apt/lists/*
# Download and install opencv
WORKDIR /opt
RUN git clone https://github.com/Itseez/opencv.git && \
cd opencv && \
git checkout master && \
cd /opt/opencv && \
mkdir release && \
cd release && \
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON /opt/opencv/ && \
make -j"$(nproc)" && \
make install && \
cp /opt/opencv/release/lib/cv2.so /usr/local/lib/python2.7/dist-packages && \
rm -rf /opt/opencv && \
ldconfig
RUN pip install keras
ADD ./requirements.txt .
RUN pip install -r requirements.txt
# fix "Couldn't open CUDA library libcupti.so"
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
WORKDIR /root