From b8510409d72ce5a4625ee555ff54426a1add70c1 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Thu, 25 Apr 2024 21:39:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20WIP:=20Migrate=20to=20using=20oc?= =?UTF-8?q?rd:all=20image=20-=20ocrd=5Fcalamari?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-ocrd_calamari | 20 -------------------- Dockerfile-ocrd_calamari03 | 22 ---------------------- test-ocrd_calamari.sh | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 42 deletions(-) delete mode 100644 Dockerfile-ocrd_calamari delete mode 100644 Dockerfile-ocrd_calamari03 create mode 100755 test-ocrd_calamari.sh diff --git a/Dockerfile-ocrd_calamari b/Dockerfile-ocrd_calamari deleted file mode 100644 index 3b9d9cc..0000000 --- a/Dockerfile-ocrd_calamari +++ /dev/null @@ -1,20 +0,0 @@ -ARG GIT_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda12.1:$GIT_COMMIT - - -# XXX https://github.com/OCR-D/core/issues/642 -#ARG PIP_INSTALL="pip install --no-cache-dir" -ARG PIP_INSTALL="pip install --no-cache-dir" -ARG OCRD_CALAMARI_VERSION="1.0.5" - -# Build pip installable stuff -RUN ${PIP_INSTALL} \ - "ocrd_calamari == $OCRD_CALAMARI_VERSION" - - -# Check pip dependencies -RUN pip check - - -# Default command -CMD ["ocrd-calamari-recognize"] diff --git a/Dockerfile-ocrd_calamari03 b/Dockerfile-ocrd_calamari03 deleted file mode 100644 index 5a8be3d..0000000 --- a/Dockerfile-ocrd_calamari03 +++ /dev/null @@ -1,22 +0,0 @@ -ARG GIT_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda12.1:$GIT_COMMIT - -ARG PIP_INSTALL="pip install --no-cache-dir" - - -# Build pip installable stuff -RUN ${PIP_INSTALL} \ -# Resolve conflicts early: - 'tensorflow-gpu == 1.15.*' \ - 'calamari-ocr == 0.3.5' \ -# Now the real stuff: - 'ocrd_calamari == 0.0.7' - - -# Check pip dependencies -RUN pip check - - -# Default command -RUN ln -s ocrd-calamari-recognize /usr/local/bin/ocrd-calamari-recognize03 -CMD ["ocrd-calamari-recognize"] diff --git a/test-ocrd_calamari.sh b/test-ocrd_calamari.sh new file mode 100755 index 0000000..1726e26 --- /dev/null +++ b/test-ocrd_calamari.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -ex + +test_id=`basename $0` +cd `mktemp -d /tmp/$test_id-XXXXX` + +# Prepare processors +ocrd resmgr download ocrd-calamari-recognize qurator-gt4histocr-1.0 + +# Prepare test workspace +wget https://qurator-data.de/examples/actevedef_718448162.first-page+binarization+segmentation.zip +unzip actevedef_718448162.first-page+binarization+segmentation.zip +cd actevedef_718448162.first-page+binarization+segmentation + +# Run tests +ocrd-calamari-recognize -I OCR-D-SEG-LINE-SBB -O OCR-D-OCR-CALA -P checkpoint_dir qurator-gt4histocr-1.0