Skip to content

Commit

Permalink
Dockerfile: just use module location from apt (but make writable)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky authored Aug 18, 2023
1 parent bc55c2a commit 041fc6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand All @@ -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

Expand Down

0 comments on commit 041fc6d

Please sign in to comment.