Created
August 30, 2020 20:59
-
-
Save shal/6741bcb1a1d1a5821f29de03f4506b0b to your computer and use it in GitHub Desktop.
Dockerfile for OpenALPR 4.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM quay.io/opencars/opencv:4.4-alpine AS openalpr | |
ENV OPENALPR_VERSION=2.3.0 | |
ENV LEPTONICA_VERSION=1.80.0 | |
ENV LOG4CPLUS_VERSION=2.0.5 | |
ARG LD_LIBRARY_PATH=/usr/local/lib | |
ARG MAKEFLAGS="-j2" | |
ARG PKG_CONFIG_PATH="/usr/local/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig" | |
ARG PREFIX=/usr/local | |
ARG LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:/usr/lib64:/usr/lib:/lib64:/lib" | |
RUN buildDeps="tiff zlib libpng libjpeg \ | |
tiff-dev zlib-dev libpng-dev jpeg-dev \ | |
autoconf \ | |
m4 \ | |
linux-headers \ | |
build-base \ | |
gcc \ | |
make \ | |
cmake \ | |
pkgconfig \ | |
automake \ | |
ca-certificates \ | |
g++ \ | |
curl \ | |
git \ | |
curl-dev \ | |
libtool \ | |
tesseract-ocr-dev" && \ | |
apk update && apk upgrade&& \ | |
apk add --no-cache ${buildDeps} | |
RUN DIR=/tmp/leptonica && \ | |
mkdir -p ${DIR} && \ | |
cd ${DIR} && \ | |
curl -sL http://www.leptonica.org/source/leptonica-${LEPTONICA_VERSION}.tar.gz | \ | |
tar -zx --strip-components=1 && \ | |
./autogen.sh && \ | |
./configure --prefix="${PREFIX}" && \ | |
make && \ | |
make install && \ | |
rm -rf ${DIR} | |
RUN DIR=/tmp/openalpr && \ | |
git clone --depth 1 https://github.com/openalpr/openalpr ${DIR} && \ | |
mkdir -p ${DIR}/src/build && \ | |
cd ${DIR}/src/build && \ | |
cmake -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} -DWITH_BINDING_PYTHON=OFF -DWITH_BINDING_JAVA=OFF -DWITH_TESTS=OFF -DWITH_DAEMON=OFF .. && \ | |
make && \ | |
make install && \ | |
rm -rf ${DIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment