Skip to content

Instantly share code, notes, and snippets.

@joost joost/Dockerfile
Created Jun 28, 2016

What would you like to do?
Dockerfile for OpenCV 3.1.0 with Tesseract on Ubuntu 14.04
FROM phusion/passenger-full
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# ===================
# Install OpenCV
# Also see:
# ===================
RUN apt-get update
RUN apt-get install -y build-essential cmake git pkg-config
RUN apt-get install -y libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
RUN apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
RUN apt-get install -y libgtk2.0-dev
RUN apt-get install -y libatlas-base-dev gfortran
# Tesseract
RUN apt-get install -y tesseract-ocr libtesseract-dev libleptonica-dev
# Install pip
RUN curl -O
RUN python3
RUN apt-get install -y python3.4-dev
RUN pip install numpy
RUN cd ~;git clone;cd opencv;git checkout 3.1.0
RUN cd ~;git clone;cd opencv_contrib;git checkout 3.1.0
RUN cd ~/opencv;mkdir build;cd build;cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D BUILD_opencv_python3=ON \
-D BUILD_EXAMPLES=ON ..;make -j4;make install;ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.