You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocrd-galley/build

40 lines
2.7 KiB
Bash

#!/bin/bash
set -e
self=`realpath $0`
self_dir=`dirname "$self"`
DATA_SUBDIR=data
get_from_annex() {
annex_get 'calamari-models/GT4HistOCR/2019-07-22T15_49+0200/*.ckpt*'
annex_get 'calamari-models/GT4HistOCR/2019-12-11T11_10+0100/*.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'
annex_get 'sbb_binarization/*.h5'
}
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/calamari-models/GT4HistOCR/2019-12-11T11_10+0100/model.tar.xz' 'calamari-models/GT4HistOCR/2019-12-11T11_10+0100'
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 --strip-components 1 'https://qurator-data.de/sbb_binarization/models.tar.gz' 'sbb_binarization'
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/4.0.0-repacked.tar.gz'
}
. $self_dir/qurator_data_lib.sh
handle_data
docker build --cache-from=my_ocrd_workflow-core -t my_ocrd_workflow-core -f Dockerfile-core .
docker build --cache-from=my_ocrd_workflow-ocrd_calamari -t my_ocrd_workflow-ocrd_calamari -f Dockerfile-ocrd_calamari .
docker build --cache-from=my_ocrd_workflow-dinglehopper -t my_ocrd_workflow-dinglehopper -f Dockerfile-dinglehopper .
docker build --cache-from=my_ocrd_workflow-ocrd_olena -t my_ocrd_workflow-ocrd_olena -f Dockerfile-ocrd_olena .
docker build --cache-from=my_ocrd_workflow-ocrd_tesserocr -t my_ocrd_workflow-ocrd_tesserocr -f Dockerfile-ocrd_tesserocr .
docker build --cache-from=my_ocrd_workflow-sbb_textline_detector -t my_ocrd_workflow-sbb_textline_detector -f Dockerfile-sbb_textline_detector .
docker build --cache-from=my_ocrd_workflow-sbb_binarization -t my_ocrd_workflow-sbb_binarization -f Dockerfile-sbb_binarization .
docker build --cache-from=my_ocrd_workflow-ocrd_cis -t my_ocrd_workflow-ocrd_cis -f Dockerfile-ocrd_cis .
docker build --cache-from=my_ocrd_workflow-ocrd_fileformat -t my_ocrd_workflow-ocrd_fileformat -f Dockerfile-ocrd_fileformat .
# legacy
docker build --cache-from=my_ocrd_workflow-ocrd_calamari03 -t my_ocrd_workflow-ocrd_calamari03 -f Dockerfile-ocrd_calamari03 .