⬆️ ocrd_calamari 1.0.0 (plus changes for legacy ocrd_calmari)

pull/38/head
Gerber, Mike 4 years ago
parent c1cc544944
commit 04d16d93d0

@ -1,25 +1,25 @@
FROM my_ocrd_workflow-core
ARG PIP_INSTALL="pip install --no-cache-dir --use-feature=2020-resolver"
# XXX https://github.com/OCR-D/core/issues/642
#ARG PIP_INSTALL="pip install --no-cache-dir --use-feature=2020-resolver"
ARG PIP_INSTALL="pip install --no-cache-dir"
ARG OCRD_CALAMARI_VERSION="1.0.0"
# 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'
"ocrd_calamari == $OCRD_CALAMARI_VERSION"
# Copy OCR models
RUN mkdir -p /var/lib/calamari-models/GT4HistOCR
COPY data/calamari-models/GT4HistOCR/2019-07-22T15_49+0200 /var/lib/calamari-models/GT4HistOCR/2019-07-22T15_49+0200
COPY data/calamari-models/GT4HistOCR/2019-12-11T11_10+0100 /var/lib/calamari-models/GT4HistOCR/2019-12-11T11_10+0100
# Check pip dependencies
RUN pip check
# XXX https://github.com/OCR-D/core/issues/642
#RUN pip check
# Default command

@ -1,27 +0,0 @@
FROM my_ocrd_workflow-core
# XXX https://github.com/OCR-D/core/issues/642
#ARG PIP_INSTALL="pip install --no-cache-dir --use-feature=2020-resolver"
ARG PIP_INSTALL="pip install --no-cache-dir"
# Build pip installable stuff
RUN ${PIP_INSTALL} \
https://github.com/OCR-D/ocrd_calamari/archive/feat/update-calamari1.zip
# Copy OCR models
RUN mkdir -p /var/lib/calamari-models/GT4HistOCR
COPY data/calamari-models/GT4HistOCR/2019-12-11T11_10+0100 /var/lib/calamari-models/GT4HistOCR/2019-12-11T11_10+0100
# Check pip dependencies
# XXX https://github.com/OCR-D/core/issues/642
#RUN pip check
# Default command
RUN ln -s ocrd-calamari-recognize /usr/local/bin/ocrd-calamari-recognize-feat-update-calamari1
CMD ["ocrd-calamari-recognize"]

@ -0,0 +1,27 @@
FROM my_ocrd_workflow-core
ARG PIP_INSTALL="pip install --no-cache-dir --use-feature=2020-resolver"
# 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'
# Copy OCR models
RUN mkdir -p /var/lib/calamari-models/GT4HistOCR
COPY data/calamari-models/GT4HistOCR/2019-07-22T15_49+0200 /var/lib/calamari-models/GT4HistOCR/2019-07-22T15_49+0200
# Check pip dependencies
RUN pip check
# Default command
RUN ln -s ocrd-calamari-recognize /usr/local/bin/ocrd-calamari-recognize03
CMD ["ocrd-calamari-recognize"]

@ -35,6 +35,5 @@ docker build --cache-from=my_ocrd_workflow-sbb_binarization -t my_ocrd_work
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 .
# XXX
docker build --cache-from=my_ocrd_workflow-ocrd_calamari-feat-update-calamari1 -t my_ocrd_workflow-ocrd_calamari-feat-update-calamari1 -f Dockerfile-ocrd_calamari-feat-update-calamari1 .
# legacy
docker build --cache-from=my_ocrd_workflow-ocrd_calamari03 -t my_ocrd_workflow-ocrd_calamari03 -f Dockerfile-ocrd_calamari03 .

@ -14,7 +14,7 @@ sub_images = {
"ocrd-sbb-binarize": "sbb_binarization",
"ocrd-sbb-textline-detector": "sbb_textline_detector",
"ocrd-calamari-recognize": "ocrd_calamari",
"ocrd-calamari-recognize-feat-update-calamari1": "ocrd_calamari-feat-update-calamari1",
"ocrd-calamari-recognize03": "ocrd_calamari03",
"ocrd-tesserocr-segment-region": "ocrd_tesserocr",
"ocrd-tesserocr-segment-line": "ocrd_tesserocr",
"ocrd-tesserocr-recognize": "ocrd_tesserocr",

@ -16,8 +16,8 @@ setup(
"ocrd-olena-binarize=qurator.ocrd_galley.cli:main",
"ocrd-sbb-binarize=qurator.ocrd_galley.cli:main",
"ocrd-sbb-textline-detector=qurator.ocrd_galley.cli:main",
"ocrd-calamari-recognize03=qurator.ocrd_galley.cli:main",
"ocrd-calamari-recognize=qurator.ocrd_galley.cli:main",
"ocrd-calamari-recognize-feat-update-calamari1=qurator.ocrd_galley.cli:main",
"ocrd-tesserocr-segment-region=qurator.ocrd_galley.cli:main",
"ocrd-tesserocr-segment-line=qurator.ocrd_galley.cli:main",
"ocrd-tesserocr-recognize=qurator.ocrd_galley.cli:main",

Loading…
Cancel
Save