├── README.md └── Dockerfile /README.md: -------------------------------------------------------------------------------- 1 | # Image processing with python3, tesseract and image magick 2 | 3 | This dockerFile install python3, imagemagick with some presets and tesseracct 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | RUN apt-get update -y && \ 4 | apt-get install -y --force-yes curl 5 | #PYTHON 3 6 | # remove several traces of installed python 7 | RUN apt-get -y --force-yes install python3 python3-setuptools python3-pip python3-matplotlib cython3 zlib1g-dev make libncurses5-dev r-base libxml2-dev 8 | RUN alias python=python3 9 | 10 | #IMAGE_MAGICK 11 | RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 8277377A 12 | 13 | ENV MAGICK_VERSION 6.9.3-1 14 | 15 | RUN apt-get install -y --no-install-recommends \ 16 | libpng-dev libjpeg-dev libtiff-dev libopenjpeg-dev git \ 17 | && apt-get remove -y imagemagick 18 | 19 | RUN cd /tmp 20 | RUN curl -SLO "http://imagemagick.org/download/releases/ImageMagick-${MAGICK_VERSION}.tar.xz" \ 21 | && curl -SLO "http://imagemagick.org/download/releases/ImageMagick-${MAGICK_VERSION}.tar.xz.asc" \ 22 | && gpg --verify "ImageMagick-${MAGICK_VERSION}.tar.xz.asc" "ImageMagick-${MAGICK_VERSION}.tar.xz" \ 23 | && tar xf "ImageMagick-${MAGICK_VERSION}.tar.xz" 24 | 25 | 26 | # http://www.imagemagick.org/script/advanced-unix-installation.php#configure 27 | RUN cd "ImageMagick-${MAGICK_VERSION}" \ 28 | && ./configure \ 29 | --disable-static \ 30 | --enable-shared \ 31 | 32 | --with-jpeg \ 33 | --with-jp2 \ 34 | --with-openjp2 \ 35 | --with-png \ 36 | --with-tiff \ 37 | --with-quantum-depth=8 \ 38 | 39 | --without-magick-plus-plus \ 40 | # disable BZLIB support 41 | --without-bzlib \ 42 | # disable ZLIB support 43 | --without-zlib \ 44 | # disable Display Postscript support 45 | --without-dps \ 46 | # disable FFTW support 47 | --without-fftw \ 48 | # disable FlashPIX support 49 | --without-fpx \ 50 | # disable DjVu support 51 | --without-djvu \ 52 | # disable fontconfig support 53 | --without-fontconfig \ 54 | # disable Freetype support 55 | --without-freetype \ 56 | # disable JBIG support 57 | --without-jbig \ 58 | # disable lcms (v1.1X) support 59 | --without-lcms \ 60 | # disable lcms (v2.X) support 61 | --without-lcms2 \ 62 | # disable Liquid Rescale support 63 | --without-lqr \ 64 | # disable LZMA support 65 | --without-lzma \ 66 | # disable OpenEXR support 67 | --without-openexr \ 68 | # disable PANGO support 69 | --without-pango \ 70 | # disable WebP support 71 | --without-webp \ 72 | # disable XML support 73 | --without-xml \ 74 | && make \ 75 | && make install \ 76 | && ldconfig /usr/local/lib 77 | 78 | RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 79 | 80 | ##Tesseract 81 | 82 | RUN apt-get install -y --force-yes tesseract-ocr tesseract-ocr-eng tesseract-ocr-por --------------------------------------------------------------------------------