From 72693071e0df4081dfc30dda34aa887aa276e148 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Wed, 5 Aug 2020 16:03:17 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Get=20tessdata=5Fbest=20fr?= =?UTF-8?q?om=20git-annex/our=20mirror=20to=20make=20downloads=20more=20ro?= =?UTF-8?q?bust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 +---- build | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d49cc0..63b7ce2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,10 +63,7 @@ RUN pip3 install --no-cache-dir --upgrade pip && \ RUN mkdir -p /var/lib/calamari-models COPY data/calamari-models/GT4HistOCR /var/lib/calamari-models/GT4HistOCR RUN mkdir -p $TESSDATA_PREFIX -RUN curl -sSL -O https://qurator-data.de/mirror/github.com/tesseract-ocr/tessdata_best/archive/$TESSDATA_BEST_VERSION.tar.gz && \ - tar xzf $TESSDATA_BEST_VERSION.tar.gz && \ - mv tessdata_best-$TESSDATA_BEST_VERSION/* $TESSDATA_PREFIX/ && \ - rm -rf $TESSDATA_BEST_VERSION.tar.gz +ADD data/mirror/github.com/tesseract-ocr/tessdata_best/archive/${TESSDATA_BEST_VERSION}-repacked.tar.gz $TESSDATA_PREFIX/ COPY data/tesseract-models/GT4HistOCR/GT4HistOCR_2000000.traineddata $TESSDATA_PREFIX/ COPY data/textline_detection /var/lib/textline_detection diff --git a/build b/build index 42dbbae..88acf21 100755 --- a/build +++ b/build @@ -9,11 +9,13 @@ get_from_annex() { annex_get 'calamari-models/GT4HistOCR/2019-07-22T15_49+0200/*.ckpt*' annex_get 'tesseract-models/GT4HistOCR/*.traineddata' annex_get 'textline_detection/*.h5' + annex_get 'mirror/github.com/tesseract-ocr/tessdata_best/archive/4.0.0-repacked.tar.gz' } get_from_web() { download_to 'https://qurator-data.de/calamari-models/GT4HistOCR/model.tar.xz' 'calamari-models/GT4HistOCR/2019-07-22T15_49+0200' download_to 'https://qurator-data.de/tesseract-models/GT4HistOCR/models.tar' 'tesseract-models/GT4HistOCR' download_to 'https://qurator-data.de/sbb_textline_detector/models.tar.gz' 'textline_detection' + download_to --no-unpack 'https://qurator-data.de/mirror/github.com/tesseract-ocr/tessdata_best/archive/4.0.0-repacked.tar.gz' 'mirror/github.com/tesseract-ocr/tessdata_best/archive/' } . $self_dir/qurator_data_lib.sh handle_data