Add opencv-dlib-torch.Dockerfile

This commit is contained in:
Brandon Amos 2016-01-12 13:43:05 -05:00
parent 8e29377952
commit 12612b098a
1 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,63 @@
FROM ubuntu:14.04
MAINTAINER Brandon Amos <brandon.amos.cs@gmail.com>
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
gfortran \
git \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libboost-all-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python-dev \
python-numpy \
python-protobuf\
wget \
zip \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash -e
RUN git clone https://github.com/torch/distro.git ~/torch --recursive
RUN cd ~/torch && ./install.sh && \
cd install/bin && \
./luarocks install nn && \
./luarocks install dpnn && \
./luarocks install image && \
./luarocks install optim && \
./luarocks install csvigo
RUN cd ~ && \
mkdir -p src && \
cd src && \
curl -L https://github.com/Itseez/opencv/archive/2.4.11.zip -o ocv.zip && \
unzip ocv.zip && \
cd opencv-2.4.11 && \
mkdir release && \
cd release && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D BUILD_PYTHON_SUPPORT=ON \
.. && \
make -j8 && \
make install
RUN cd ~ && \
mkdir -p src && \
cd src && \
curl -L \
https://github.com/davisking/dlib/releases/download/v18.16/dlib-18.16.tar.bz2 \
-o dlib.tar.bz2 && \
tar xf dlib.tar.bz2 && \
cd dlib-18.16/python_examples && \
mkdir build && \
cd build && \
cmake ../../tools/python && \
cmake --build . --config Release && \
cp dlib.so /usr/local/lib/python2.7/dist-packages