Skip to content

Commit

Permalink
Docker: move JSON builds up before cleaning (to avoid attempts to re-…
Browse files Browse the repository at this point in the history
…install Tesseract)
  • Loading branch information
bertsky committed Feb 23, 2024
1 parent b0140b9 commit 7f19746
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 @@ -109,6 +109,8 @@ RUN echo "pip install -U pip setuptools wheel" >> docker.sh
RUN echo "hash -r" >> docker.sh
# build/install all tools of the requested modules:
RUN echo "make $PARALLEL all" >> docker.sh
# preinstall ocrd-all-tool.json and ocrd-all-module-dir.json
RUN echo "make ocrd-all-tool.json ocrd-all-module-dir.json"" >> docker.sh
# remove unneeded automatic deps and clear pkg cache
RUN echo "apt-get -y remove automake autoconf libtool pkg-config g++ && apt-get -y clean" >> docker.sh
# clean-up some temporary files (git repos are also installation targets and must be kept)
Expand All @@ -124,9 +126,6 @@ RUN ldconfig
RUN make -j4 check CHECK_HELP=1
RUN if echo $BASE_IMAGE | fgrep -q cuda; then make fix-cuda; fi
# preinstall ocrd-all-tool.json and ocrd-all-module-dir.json
RUN make ocrd-all-tool.json ocrd-all-module-dir.json

# as discussed in #378, we do not want to manage more than one resource location
# to mount for model persistence; with named volumes, the preinstalled models
# will be copied to the host and complemented by downloaded models; tessdata
Expand Down

0 comments on commit 7f19746

Please sign in to comment.