Commit 81487a97 authored by Robert Sachunsky's avatar Robert Sachunsky
Browse files

avoid system resdir as long as it's defined as VOLUME; ensure minimal tessdata...

avoid system resdir as long as it's defined as VOLUME; ensure minimal tessdata files are in new default location
parent b42fc01e
......@@ -9,7 +9,8 @@ MAINTAINER sachunsky@informatik.uni-leipzig.de
# but export them for COPY etc
ENV PREFIX=$PREFIX
ENV VIRTUAL_ENV=$VIRTUAL_ENV
ENV RESDIR=/usr/local/share/ocrd-resources
ENV XDG_DATA_HOME=/usr/share/
ENV RESDIR=/usr/share/ocrd-resources
# make apt run non-interactive during build
ENV DEBIAN_FRONTEND noninteractive
......@@ -22,9 +23,7 @@ RUN apt-get update && \
WORKDIR /build
RUN ln /usr/bin/python3 /usr/bin/python
ENV TESSDATA=${RESDIR}/ocrd-tesserocr-recognize
RUN mkdir -p $RESDIR $TESSDATA $TESSDATA/script
RUN wget -P $TESSDATA http://github.com/tesseract-ocr/tessdata_best/raw/master/deu.traineddata
RUN ocrd resmgr download ocrd-tesserocr-recognize deu.traineddata
# replace Tesseract Docker build with version from PPA (with OpenMP):
RUN make -W tesseract install-tesseract TESSERACT_CONFIG='CXXFLAGS="-g -O2 -fPIC"'
ENV LD_LIBRARY_PATH $PREFIX/lib
......@@ -62,6 +61,8 @@ COPY *.h5 $MRCNNDATA/
# configure writing to ocrd.log for profiling
COPY ocrd_logging.conf /etc
ENV DEBIAN_FRONTEND teletype
# fix ocrd_all#240
RUN ln -s $VIRTUAL_ENV/share/tessdata/* $RESDIR/ocrd-tesserocr-recognize/
WORKDIR /data
VOLUME /data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment