Skip to content

Commit

Permalink
Merge pull request #218 from OCR-D/update-docker-2.67
Browse files Browse the repository at this point in the history
adapt dockerfile for core 2.67.2 and clean /tmp files
  • Loading branch information
bertsky authored Jul 29, 2024
2 parents d23992b + 5783ce2 commit c11999f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ocrd/core:v2.62.0 AS base
FROM docker.io/ocrd/core:v2.67.2 AS base
# set proper locales
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
Expand Down Expand Up @@ -31,7 +31,7 @@ ENV XDG_DATA_HOME /usr/local/share
ENV XDG_CONFIG_HOME /usr/local/share/ocrd-resources
ENV TESSDATA_PREFIX $XDG_DATA_HOME/tessdata

WORKDIR /build
WORKDIR /build/ocrd_tesserocr
COPY setup.py .
COPY ocrd_tesserocr/ocrd-tool.json .
COPY README.md .
Expand All @@ -42,11 +42,13 @@ COPY repo/tesserocr ./repo/tesserocr
COPY repo/tesseract ./repo/tesseract
COPY Makefile .
RUN make deps-ubuntu deps install install-tesseract-training \
&& rm -rf /build \
&& rm -rf /build/ocrd_tesserocr \
&& apt-get -y remove --auto-remove g++ libtesseract-dev make

RUN ocrd resmgr download ocrd-tesserocr-recognize Fraktur.traineddata
RUN ocrd resmgr download ocrd-tesserocr-recognize deu.traineddata
RUN ocrd resmgr download ocrd-tesserocr-recognize Fraktur.traineddata && \
ocrd resmgr download ocrd-tesserocr-recognize deu.traineddata && \
# clean possibly created log-files/dirs of ocrd_network logger to prevent permission problems
rm -rf /tmp/ocrd_*

# as discussed in ocrd_all#378, we do not want to manage more than one resource location
# to mount for model persistence;
Expand Down

0 comments on commit c11999f

Please sign in to comment.