You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
795 B
Plaintext
32 lines
795 B
Plaintext
ARG GIT_COMMIT="latest"
|
|
FROM quratorspk/ocrd-galley-core:$GIT_COMMIT
|
|
|
|
ARG PIP_INSTALL="pip install --no-cache-dir"
|
|
ARG TESSDATA_BEST_VERSION="4.0.0"
|
|
ARG OCRD_TESSEROCR_VERSION="0.17.0"
|
|
ENV TESSDATA_PREFIX /usr/local/share/tessdata
|
|
|
|
|
|
# Install Leptonica and Tesseract.
|
|
# TODO: Review if alex-p's repo is still necessary on jammy (jammy has 4.1.1,
|
|
# alex-p has 4.1.3, but not for jammy.)
|
|
# RUN add-apt-repository ppa:alex-p/tesseract-ocr && \
|
|
RUN apt-get update && \
|
|
apt-get install -y \
|
|
tesseract-ocr \
|
|
libtesseract-dev \
|
|
&& \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
# Build pip installable stuff
|
|
RUN ${PIP_INSTALL} \
|
|
"ocrd_tesserocr == ${OCRD_TESSEROCR_VERSION}"
|
|
|
|
# Check pip dependencies
|
|
RUN pip check
|
|
|
|
|
|
# Default command
|
|
CMD ["ocrd-tesserocr-recognize"]
|