-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
154 lines (140 loc) · 3.65 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Download the base image ubuntu with cuda8 and cudnn5
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04
MAINTAINER Gayathri Mahalingam ([email protected])
# Update Ubuntu Software repository
RUN apt-get update && apt-get install -y \
python-scipy \
libprotobuf-dev \
libleveldb-dev \
libsnappy-dev \
protobuf-compiler \
libatlas-base-dev \
libopencv-dev \
libxml2-dev \
libxslt-dev \
libgflags-dev \
libgoogle-glog-dev \
liblmdb-dev \
bc \
build-essential \
cmake \
curl \
g++ \
gfortran \
git \
libffi-dev \
libfreetype6-dev \
libhdf5-dev \
libjpeg-dev \
liblcms2-dev \
libopenblas-dev \
liblapack-dev \
libopenjpeg2 \
libpng12-dev \
libssl-dev \
libtiff5-dev \
libwebp-dev \
libzmq3-dev \
nano \
pkg-config \
python-dev \
software-properties-common \
unzip \
vim \
wget \
zlib1g-dev \
qt5-default \
libvtk6-dev \
zlib1g-dev \
libjpeg-dev \
libwebp-dev \
libpng-dev \
libtiff5-dev \
libjasper-dev \
libopenexr-dev \
libgdal-dev \
libdc1394-22-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libtheora-dev \
libvorbis-dev \
libxvidcore-dev \
libx264-dev \
yasm \
libopencore-amrnb-dev \
libopencore-amrwb-dev \
libv4l-dev \
libxine2-dev \
libtbb-dev \
libeigen3-dev \
python-dev \
python-tk \
python-numpy \
python3-dev \
python3-tk \
python3-numpy \
ant \
default-jdk \
doxygen \
&& \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* && \
update-alternatives --set libblas.so.3 /usr/lib/openblas-base/libblas.so.3
# Install pip
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
# Install useful Python packages using apt-get to avoid version incompatibilities with Tensorflow binary
# especially numpy, scipy, skimage and sklearn (see https://github.com/tensorflow/tensorflow/issues/2034)
RUN apt-get update && apt-get install -y \
python-numpy \
python-scipy \
python-nose \
python-h5py \
python-skimage \
python-matplotlib \
python-pandas \
python-sklearn \
python-sympy \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/*
RUN apt-get install -y --no-install-recommends libboost-all-dev
# create a dir for all code
RUN mkdir /code
RUN cd /code && git clone https://github.com/gayathrimahalingam/CTPN.git
# Install dependencies for Caffe
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
wget \
libatlas-base-dev \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
libhdf5-serial-dev \
libleveldb-dev \
liblmdb-dev \
libopencv-dev \
libprotobuf-dev \
libsnappy-dev \
protobuf-compiler \
python-dev \
python-numpy \
python-pip \
python-setuptools \
python-scipy && \
rm -rf /var/lib/apt/lists/*
ENV CAFFE_ROOT=/code/CTPN/caffe
WORKDIR ${CAFFE_ROOT}
# Copy to Makefile.config
RUN cd ${CAFFE_ROOT} && cp Makefile.config.example Makefile.config
# Edit Makefile.config
RUN cd /opt/caffe/ && \
echo "PYTHON_INCLUDE := /usr/include/python2.7 /usr/lib/python2.7/dist-packages/numpy/core/include" >> Makefile.config && \
echo "WITH_PYTHON_LAYER := 1" >> Makefile.config && \
echo "INCLUDE_DIRS := \$(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial" >> Makefile.config && \
echo "LIBRARY_DIRS := \$(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial" >> Makefile.config