Skip to content

Commit 723eede

Browse files
author
Sai Soundararaj
authored
Merge pull request floydhub#42 from anooprh/master
Including OpenCV in docker image
2 parents 51b89ec + 376f4eb commit 723eede

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

Dockerfile.cpu

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,40 @@ RUN apt-get update && apt-get install -y \
4040
vim \
4141
wget \
4242
zlib1g-dev \
43+
qt5-default \
44+
libvtk6-dev \
45+
zlib1g-dev \
46+
libjpeg-dev \
47+
libwebp-dev \
48+
libpng-dev \
49+
libtiff5-dev \
50+
libjasper-dev \
51+
libopenexr-dev \
52+
libgdal-dev \
53+
libdc1394-22-dev \
54+
libavcodec-dev \
55+
libavformat-dev \
56+
libswscale-dev \
57+
libtheora-dev \
58+
libvorbis-dev \
59+
libxvidcore-dev \
60+
libx264-dev \
61+
yasm \
62+
libopencore-amrnb-dev \
63+
libopencore-amrwb-dev \
64+
libv4l-dev \
65+
libxine2-dev \
66+
libtbb-dev \
67+
libeigen3-dev \
68+
python-dev \
69+
python-tk \
70+
python-numpy \
71+
python3-dev \
72+
python3-tk \
73+
python3-numpy \
74+
ant \
75+
default-jdk \
76+
doxygen \
4377
&& \
4478
apt-get clean && \
4579
apt-get autoremove && \
@@ -173,6 +207,17 @@ RUN luarocks install nn && \
173207
cd iTorch && \
174208
luarocks make
175209

210+
# Install OpenCV
211+
RUN git clone --depth 1 https://github.com/opencv/opencv.git /root/opencv && \
212+
cd /root/opencv && \
213+
mkdir build && \
214+
cd build && \
215+
cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON .. && \
216+
make -j"$(nproc)" && \
217+
make install && \
218+
ldconfig && \
219+
echo 'ln /dev/null /dev/raw1394' >> ~/.bashrc
220+
176221

177222
# Set up notebook config
178223
COPY jupyter_notebook_config.py /root/.jupyter/

Dockerfile.gpu

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,40 @@ RUN apt-get update && apt-get install -y \
4646
vim \
4747
wget \
4848
zlib1g-dev \
49+
qt5-default \
50+
libvtk6-dev \
51+
zlib1g-dev \
52+
libjpeg-dev \
53+
libwebp-dev \
54+
libpng-dev \
55+
libtiff5-dev \
56+
libjasper-dev \
57+
libopenexr-dev \
58+
libgdal-dev \
59+
libdc1394-22-dev \
60+
libavcodec-dev \
61+
libavformat-dev \
62+
libswscale-dev \
63+
libtheora-dev \
64+
libvorbis-dev \
65+
libxvidcore-dev \
66+
libx264-dev \
67+
yasm \
68+
libopencore-amrnb-dev \
69+
libopencore-amrwb-dev \
70+
libv4l-dev \
71+
libxine2-dev \
72+
libtbb-dev \
73+
libeigen3-dev \
74+
python-dev \
75+
python-tk \
76+
python-numpy \
77+
python3-dev \
78+
python3-tk \
79+
python3-numpy \
80+
ant \
81+
default-jdk \
82+
doxygen \
4983
&& \
5084
apt-get clean && \
5185
apt-get autoremove && \
@@ -185,6 +219,16 @@ RUN luarocks install nn && \
185219
cd iTorch && \
186220
luarocks make
187221

222+
# Install OpenCV
223+
RUN git clone --depth 1 https://github.com/opencv/opencv.git /root/opencv && \
224+
cd /root/opencv && \
225+
mkdir build && \
226+
cd build && \
227+
cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON .. && \
228+
make -j"$(nproc)" && \
229+
make install && \
230+
ldconfig && \
231+
echo 'ln /dev/null /dev/raw1394' >> ~/.bashrc
188232

189233
# Set up notebook config
190234
COPY jupyter_notebook_config.py /root/.jupyter/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This is what you get out of the box when you create a container with the provide
1919
* [Torch](http://torch.ch/) (includes nn, cutorch, cunn and cuDNN bindings)
2020
* [iPython/Jupyter Notebook](http://jupyter.org/) (including iTorch kernel)
2121
* [Numpy](http://www.numpy.org/), [SciPy](https://www.scipy.org/), [Pandas](http://pandas.pydata.org/), [Scikit Learn](http://scikit-learn.org/), [Matplotlib](http://matplotlib.org/)
22+
* [OpenCV](http://opencv.org/)
2223
* A few common libraries used for deep learning
2324

2425
## Setup

0 commit comments

Comments
 (0)