From 041fc6d77345878d4ce086e2da67242f0152297a Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:07:45 +0200 Subject: [PATCH] Dockerfile: just use module location from apt (but make writable) --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29e4e9d..d818bc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,6 @@ ENV PYTHONIOENCODING utf8 # so let XDG_DATA_HOME coincide with fixed system location # (can still be overridden by derived stages) ENV XDG_DATA_HOME /usr/local/share -# allow using resmgr data location but still keep internal module location -RUN mkdir -p $XDG_DATA_HOME/ocrd-resources -RUN ln -rs /usr/share/tesseract-ocr/4.00/tessdata $XDG_DATA_HOME/ocrd-resources/ocrd-tesserocr-recognize WORKDIR /build-ocrd COPY setup.py . @@ -32,6 +29,8 @@ RUN make deps-ubuntu && \ && make deps install \ && rm -rf /build-ocrd \ && apt-get -y remove --auto-remove g++ libtesseract-dev make +# PPA tessdata prefix (= ocrd_tesserocr moduledir) is owned by root +RUN sudo chmod go+w `dpkg-query -L tesseract-ocr-eng | sed -n s,/eng.traineddata,,p` RUN ocrd resmgr download ocrd-tesserocr-recognize Fraktur.traineddata RUN ocrd resmgr download ocrd-tesserocr-recognize deu.traineddata