2020-08-14 17:52:57 +02:00
|
|
|
FROM my_ocrd_workflow-core
|
2020-08-14 14:37:20 +02:00
|
|
|
|
2020-09-25 16:11:11 +02:00
|
|
|
ARG PIP_INSTALL="pip3 install --no-cache-dir --use-feature=2020-resolver"
|
|
|
|
|
2020-08-14 14:37:20 +02:00
|
|
|
|
|
|
|
# Build pip installable stuff
|
2020-09-25 16:11:11 +02:00
|
|
|
RUN ${PIP_INSTALL} \
|
2020-08-14 14:37:20 +02:00
|
|
|
# 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
|
|
|
|
COPY data/calamari-models/GT4HistOCR /var/lib/calamari-models/GT4HistOCR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check pip dependencies
|
|
|
|
RUN pip3 check
|
|
|
|
|
|
|
|
|
|
|
|
# Default command
|
|
|
|
CMD ["ocrd-calamari-recognize"]
|