Adding opencv with ffmpeg
This is still broke, committing it for collaboration
@@ -19,14 +19,32 @@ FROM ubuntu
MAINTAINER Thamme Gowda <thammegowda@apache.org> and Kranthi Kiran GV <kkranthi@student.nitw.ac.in>
# Install anaconda
-FROM continuumio/anaconda
-EXPOSE 5000
+FROM continuumio/miniconda
# Install missing part of ubuntu core + python stuff
RUN apt-get update && \
- apt-get install -y python-pip python-dev wget libtcmalloc-minimal4 git unzip
+ apt-get install -y python-pip python-dev wget libtcmalloc-minimal4 git unzip software-properties-common
-RUN conda install opencv
+#Install ffmpeg for video support
+RUN conda install -c menpo ffmpeg=3.1.3
+
+# build opencv with ffmpeg
+WORKDIR /opt
+RUN conda install conda-build
+RUN conda install cmake
+RUN git clone https://github.com/menpo/conda-opencv3
+WORKDIR conda-opencv3
+RUN conda config --add channels menpo
+# Enable ffmpeg
+RUN sed s/DWITH_FFMPEG=0/DWITH_FFMPEG=1/ < conda/build.sh > conda/build.sh_
+RUN mv conda/build.sh_ conda/build.sh
+# Remove cmake dependency as it's downloaded
+RUN sed -i.bak '/cmake/d' conda/meta.yaml
+RUN conda build conda/
+RUN conda install /opt/conda/conda-bld/linux-64/opencv3-3.1.0-py27_0.tar.bz2
+
+#changing workdir to what it was before opencv
+WORKDIR /
RUN conda update setuptools
@@ -43,7 +61,7 @@ RUN unzip c15fada28113eca32dc98d6e3bec4755d0d5b4c2.zip
RUN \
wget https://raw.githubusercontent.com/smadha/tika/TIKA-2322/tika-parsers/src/main/resources/org/apache/tika/parser/recognition/tf/inceptionapi.py -O /usr/bin/inceptionapi.py && \
- wget https://raw.githubusercontent.com/smadha/tika/TIKA-2322/tika-parsers/src/main/resources/org/apache/tika/parser/recognition/tf/video_util.py -O /usr/bin/video_util.py && \
+ wget https://raw.githubusercontent.com/smadha/smadha.github.io/master/video_util.py?ver=5 -O /usr/bin/video_util.py && \
chmod +x /usr/bin/inceptionapi.py && \
chmod +x /usr/bin/video_util.py
