Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: avoid re-entering XDG aliasing commands #444

Merged
merged 15 commits into from
Jul 17, 2024

Conversation

bertsky
Copy link
Collaborator

@bertsky bertsky commented Jul 3, 2024

fixes #394

@bertsky bertsky requested a review from kba July 3, 2024 11:13
@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Perhaps we should also add some checks to ensure this never causes undetected problems again?

For example, a simple RUN ocrd resmgr list-installed would have sufficed for this, but we could also do this as docker run ... ocrd resmgr list-installed or even docker run ... ocrd resmgr download ocrd-tesserocr-recognize deu.traineddata to be on the safe side

@MehmedGIT
Copy link

Today I tried to pull ocrd_all on my local machine a few times and always ended up with failed to register layer: max depth exceeded. May it also be related to the issue this PR resolves?

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Today I tried to pull ocrd_all on my local machine a few times and always ended up with failed to register layer: max depth exceeded. May it also be related to the issue this PR resolves?

I don't know. I can still pull and run the broken images.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

For example, a simple RUN ocrd resmgr list-installed would have sufficed for this,

done: a0937b6.

(I manually cancelled the job to save us unnecessary credits.)

but we could also do this as docker run ... ocrd resmgr list-installed or even docker run ... ocrd resmgr download ocrd-tesserocr-recognize deu.traineddata to be on the safe side

That should be done in CI file, but to test unprivileged users, we first have to set up some in the CI environment, right?

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

@MehmedGIT @kba here's the current docker history --no-trunc --format 'table {{.CreatedBy}}\t{{.Size}} ocrd/all:maximum:

CREATED BY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SIZE
CMD ["/bin/sh" "-c" "/bin/bash"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
VOLUME [/data]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c chmod 777 /data # buildkit                                                                                                                  0B
WORKDIR /data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
ENV DEBIAN_FRONTEND=teletype                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "PS1='\w\$ '" >> /etc/bash.bashrc # buildkit                                                                                           2.35kB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i '/width\|height/s/value="16KP"/value="64KP"/' /etc/ImageMagick-6/policy.xml || true # buildkit                                       4.72kB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i 's/name="disk" value="1GiB"/name="disk" value="8GiB"/g' /etc/ImageMagick-6/policy.xml || true # buildkit                             4.72kB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i 's/rights="none"/rights="read|write"/g' /etc/ImageMagick-6/policy.xml || true # buildkit                                             4.72kB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c chmod go+rwx /models # buildkit                                                                                                             0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mv $XDG_CONFIG_HOME /models && ln -s /models $XDG_CONFIG_HOME # buildkit                                                                    14B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mkdir -p $XDG_CONFIG_HOME # buildkit                                                                                                        0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c ln -s $XDG_CONFIG_HOME/ocrd-tesserocr-recognize $XDG_DATA_HOME/tessdata # buildkit                                                          56B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mv $XDG_DATA_HOME/tessdata $XDG_CONFIG_HOME/ocrd-tesserocr-recognize # buildkit                                                             56B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mkdir -p  $XDG_DATA_HOME/tessdata # buildkit                                                                                                0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c if echo $BASE_IMAGE | fgrep -q cuda; then make fix-cuda; fi # buildkit                                                                      0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c make -j4 check CHECK_HELP=1 # buildkit                                                                                                      46.1kB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c ldconfig # buildkit                                                                                                                         46.3kB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c set -a; bash docker.sh # buildkit                                                                                                           7.54GB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "rm -fr /.cache" >> docker.sh # buildkit                                                                                               357B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make -i clean-olena" >> docker.sh # buildkit                                                                                          342B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make -i clean-tesseract" >> docker.sh # buildkit                                                                                      322B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "apt-get -y remove automake autoconf libtool pkg-config g++ && apt-get -y clean" >> docker.sh # buildkit                               298B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make ocrd-all-tool.json ocrd-all-module-dir.json" >> docker.sh # buildkit                                                             219B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make $PARALLEL all" >> docker.sh # buildkit                                                                                           170B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "hash -r" >> docker.sh # buildkit                                                                                                      160B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "pip install -U pip setuptools wheel" >> docker.sh # buildkit                                                                          152B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "source $VIRTUAL_ENV/bin/activate" >> docker.sh # buildkit                                                                             116B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make deps-ubuntu" >> docker.sh # buildkit                                                                                             85B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "apt-get -y install automake autoconf libtool pkg-config g++" >> docker.sh # buildkit                                                  68B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "set -ex" > docker.sh # buildkit                                                                                                       8B
ENV NO_UPDATE=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c apt-get -y update && apt-get install -y apt-utils # buildkit                                                                                648kB
COPY . . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               875MB
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c rm -rf /build/core/.git # buildkit                                                                                                          0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c rm $VIRTUAL_ENV/bin/pip* && apt-get purge -y python3-pip && python3 -m venv $VIRTUAL_ENV && python3 -m pip install --force pip # buildkit   14.1MB
WORKDIR /build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::ftp::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                          279B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::https::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                        249B
RUN |7 BASE_IMAGE=ocrd/all:medium VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:37:51Z OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::http::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                         217B
ENV PIP_OPTIONS=--timeout=3000 -e                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 0B
ARG PARALLEL=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
ARG PYTHON=python3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ARG PIP_OPTIONS=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV OCRD_MODULES=cor-asv-ann core dinglehopper docstruct eynollah format-converters nmalign ocrd_anybaseocr ocrd_calamari ocrd_cis ocrd_detectron2 ocrd_doxa ocrd_fileformat ocrd_froc ocrd_im6convert ocrd_keraslm ocrd_kraken ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap sbb_binarization workflow-configuration                                                                                                                                                                                                                                                                                             0B
ARG OCRD_MODULES=core dinglehopper format-converters ocrd_calamari ocrd_cis ocrd_im6convert ocrd_keraslm ocrd_olena ocrd_segment ocrd_tesserocr tesseract tesserocr cor-asv-ann workflow-configuration                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B
ENV TF_FORCE_GPU_ALLOW_GROWTH=true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV LANG=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV LC_ALL=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV DEBIAN_FRONTEND=noninteractive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV OCRD_METS_CACHING=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           0B
ENV HOME=/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0B
ENV XDG_CONFIG_HOME=/usr/local/share/ocrd-resources                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0B
ENV XDG_DATA_HOME=/usr/local/share                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV VIRTUAL_ENV=/usr/local                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0B
ENV PREFIX=/usr/local                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             0B
LABEL maintainer=https://ocr-d.de/en/contact org.label-schema.vcs-ref=56507f1 org.label-schema.vcs-url=https://github.com/OCR-D/ocrd_all org.label-schema.build-date=2024-07-01T15:37:51Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         0B
ARG BUILD_DATE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
ARG VCS_REF                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0B
ARG BASE_IMAGE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
CMD ["/bin/sh" "-c" "/bin/bash"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
VOLUME [/data]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c chmod 777 /data # buildkit                                                                                                                                                                                                                0B
WORKDIR /data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
ENV DEBIAN_FRONTEND=teletype                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "PS1='\w\$ '" >> /etc/bash.bashrc # buildkit                                                                                                                                                                                         2.34kB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i '/width\|height/s/value="16KP"/value="64KP"/' /etc/ImageMagick-6/policy.xml || true # buildkit                                                                                                                                     4.72kB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i 's/name="disk" value="1GiB"/name="disk" value="8GiB"/g' /etc/ImageMagick-6/policy.xml || true # buildkit                                                                                                                           4.72kB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i 's/rights="none"/rights="read|write"/g' /etc/ImageMagick-6/policy.xml || true # buildkit                                                                                                                                           4.72kB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c chmod go+rwx /models # buildkit                                                                                                                                                                                                           0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mv $XDG_CONFIG_HOME /models && ln -s /models $XDG_CONFIG_HOME # buildkit                                                                                                                                                                  14B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mkdir -p $XDG_CONFIG_HOME # buildkit                                                                                                                                                                                                      0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c ln -s $XDG_CONFIG_HOME/ocrd-tesserocr-recognize $XDG_DATA_HOME/tessdata # buildkit                                                                                                                                                        56B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mv $XDG_DATA_HOME/tessdata $XDG_CONFIG_HOME/ocrd-tesserocr-recognize # buildkit                                                                                                                                                           56B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mkdir -p  $XDG_DATA_HOME/tessdata # buildkit                                                                                                                                                                                              0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c if echo $BASE_IMAGE | fgrep -q cuda; then make fix-cuda; fi # buildkit                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c make -j4 check CHECK_HELP=1 # buildkit                                                                                                                                                                                                    29.7kB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c ldconfig # buildkit                                                                                                                                                                                                                       46.3kB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c set -a; bash docker.sh # buildkit                                                                                                                                                                                                         11.2GB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "rm -fr /.cache" >> docker.sh # buildkit                                                                                                                                                                                             357B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make -i clean-olena" >> docker.sh # buildkit                                                                                                                                                                                        342B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make -i clean-tesseract" >> docker.sh # buildkit                                                                                                                                                                                    322B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "apt-get -y remove automake autoconf libtool pkg-config g++ && apt-get -y clean" >> docker.sh # buildkit                                                                                                                             298B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make ocrd-all-tool.json ocrd-all-module-dir.json" >> docker.sh # buildkit                                                                                                                                                           219B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make $PARALLEL all" >> docker.sh # buildkit                                                                                                                                                                                         170B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "hash -r" >> docker.sh # buildkit                                                                                                                                                                                                    160B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "pip install -U pip setuptools wheel" >> docker.sh # buildkit                                                                                                                                                                        152B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "source $VIRTUAL_ENV/bin/activate" >> docker.sh # buildkit                                                                                                                                                                           116B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make deps-ubuntu" >> docker.sh # buildkit                                                                                                                                                                                           85B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "apt-get -y install automake autoconf libtool pkg-config g++" >> docker.sh # buildkit                                                                                                                                                68B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "set -ex" > docker.sh # buildkit                                                                                                                                                                                                     8B
ENV NO_UPDATE=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c apt-get -y update && apt-get install -y apt-utils # buildkit                                                                                                                                                                              648kB
COPY . . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               875MB
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c rm -rf /build/core/.git # buildkit                                                                                                                                                                                                        0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c rm $VIRTUAL_ENV/bin/pip* && apt-get purge -y python3-pip && python3 -m venv $VIRTUAL_ENV && python3 -m pip install --force pip # buildkit                                                                                                 15.8MB
WORKDIR /build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::ftp::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                                                                                                                        186B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::https::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                                                                                                                      156B
RUN |7 BASE_IMAGE=ocrd/all:minimum VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:20:38Z OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::http::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                                                                                                                       124B
ENV PIP_OPTIONS=--timeout=3000 -e                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 0B
ARG PARALLEL=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
ARG PYTHON=python3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ARG PIP_OPTIONS=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV OCRD_MODULES=cor-asv-ann dinglehopper docstruct format-converters nmalign ocrd_calamari ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_keraslm ocrd_olahd_client ocrd_olena ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_segment ocrd_tesserocr ocrd_wrap workflow-configuration                                                                                                                                                                                                                                                                                                                                                                                            0B
ARG OCRD_MODULES=core dinglehopper format-converters ocrd_calamari ocrd_cis ocrd_im6convert ocrd_keraslm ocrd_olena ocrd_segment ocrd_tesserocr tesseract tesserocr cor-asv-ann workflow-configuration                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B
ENV TF_FORCE_GPU_ALLOW_GROWTH=true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV LANG=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV LC_ALL=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV DEBIAN_FRONTEND=noninteractive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV OCRD_METS_CACHING=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           0B
ENV HOME=/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0B
ENV XDG_CONFIG_HOME=/usr/local/share/ocrd-resources                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0B
ENV XDG_DATA_HOME=/usr/local/share                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV VIRTUAL_ENV=/usr/local                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0B
ENV PREFIX=/usr/local                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             0B
LABEL maintainer=https://ocr-d.de/en/contact org.label-schema.vcs-ref=56507f1 org.label-schema.vcs-url=https://github.com/OCR-D/ocrd_all org.label-schema.build-date=2024-07-01T15:20:38Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         0B
ARG BUILD_DATE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
ARG VCS_REF                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0B
ARG BASE_IMAGE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
CMD ["/bin/sh" "-c" "/bin/bash"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
VOLUME [/data]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c chmod 777 /data # buildkit                                                                                                                                                                                                                                                                                                                               0B
WORKDIR /data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
ENV DEBIAN_FRONTEND=teletype                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "PS1='\w\$ '" >> /etc/bash.bashrc # buildkit                                                                                                                                                                                                                                                                                                        2.33kB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i '/width\|height/s/value="16KP"/value="64KP"/' /etc/ImageMagick-6/policy.xml || true # buildkit                                                                                                                                                                                                                                                    4.72kB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i 's/name="disk" value="1GiB"/name="disk" value="8GiB"/g' /etc/ImageMagick-6/policy.xml || true # buildkit                                                                                                                                                                                                                                          4.72kB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c sed -i 's/rights="none"/rights="read|write"/g' /etc/ImageMagick-6/policy.xml || true # buildkit                                                                                                                                                                                                                                                          4.72kB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c chmod go+rwx /models # buildkit                                                                                                                                                                                                                                                                                                                          0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mv $XDG_CONFIG_HOME /models && ln -s /models $XDG_CONFIG_HOME # buildkit                                                                                                                                                                                                                                                                                 28.2MB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mkdir -p $XDG_CONFIG_HOME # buildkit                                                                                                                                                                                                                                                                                                                     0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c ln -s $XDG_CONFIG_HOME/ocrd-tesserocr-recognize $XDG_DATA_HOME/tessdata # buildkit                                                                                                                                                                                                                                                                       56B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mv $XDG_DATA_HOME/tessdata $XDG_CONFIG_HOME/ocrd-tesserocr-recognize # buildkit                                                                                                                                                                                                                                                                          28.2MB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c mkdir -p  $XDG_DATA_HOME/tessdata # buildkit                                                                                                                                                                                                                                                                                                             0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c if echo $BASE_IMAGE | fgrep -q cuda; then make fix-cuda; fi # buildkit                                                                                                                                                                                                                                                                                   0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c make -j4 check CHECK_HELP=1 # buildkit                                                                                                                                                                                                                                                                                                                   830B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c ldconfig # buildkit                                                                                                                                                                                                                                                                                                                                      43.4kB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c set -a; bash docker.sh # buildkit                                                                                                                                                                                                                                                                                                                        1.29GB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "rm -fr /.cache" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                                            357B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make -i clean-olena" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                                       342B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make -i clean-tesseract" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                                   322B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "apt-get -y remove automake autoconf libtool pkg-config g++ && apt-get -y clean" >> docker.sh # buildkit                                                                                                                                                                                                                                            298B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make ocrd-all-tool.json ocrd-all-module-dir.json" >> docker.sh # buildkit                                                                                                                                                                                                                                                                          219B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make $PARALLEL all" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                                        170B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "hash -r" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                                                   160B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "pip install -U pip setuptools wheel" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                       152B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "source $VIRTUAL_ENV/bin/activate" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                          116B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "make deps-ubuntu" >> docker.sh # buildkit                                                                                                                                                                                                                                                                                                          85B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "apt-get -y install automake autoconf libtool pkg-config g++" >> docker.sh # buildkit                                                                                                                                                                                                                                                               68B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "set -ex" > docker.sh # buildkit                                                                                                                                                                                                                                                                                                                    8B
ENV NO_UPDATE=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c apt-get -y update && apt-get install -y apt-utils # buildkit                                                                                                                                                                                                                                                                                             33.5MB
COPY . . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               875MB
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c rm -rf /build/core/.git # buildkit                                                                                                                                                                                                                                                                                                                       0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c rm $VIRTUAL_ENV/bin/pip* && apt-get purge -y python3-pip && python3 -m venv $VIRTUAL_ENV && python3 -m pip install --force pip # buildkit                                                                                                                                                                                                                13.5MB
WORKDIR /build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::ftp::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                                                                                                                                                                                                                                       93B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::https::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                                                                                                                                                                                                                                     63B
RUN |7 BASE_IMAGE=ocrd/core:v2.66.1 VCS_REF=56507f1 BUILD_DATE=2024-07-01T15:09:35Z OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client PIP_OPTIONS=--timeout=3000 -e PYTHON=python3 PARALLEL= /bin/sh -c echo "Acquire::http::Timeout \"3000\";" >> /etc/apt/apt.conf.d/99network # buildkit                                                                                                                                                                                                                                                                      31B
ENV PIP_OPTIONS=--timeout=3000 -e                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 0B
ARG PARALLEL=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
ARG PYTHON=python3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ARG PIP_OPTIONS=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV OCRD_MODULES=ocrd_cis ocrd_fileformat ocrd_im6convert ocrd_pagetopdf ocrd_repair_inconsistencies ocrd_tesserocr ocrd_wrap workflow-configuration ocrd_olahd_client                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B
ARG OCRD_MODULES=core dinglehopper format-converters ocrd_calamari ocrd_cis ocrd_im6convert ocrd_keraslm ocrd_olena ocrd_segment ocrd_tesserocr tesseract tesserocr cor-asv-ann workflow-configuration                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B
ENV TF_FORCE_GPU_ALLOW_GROWTH=true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV LANG=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV LC_ALL=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV DEBIAN_FRONTEND=noninteractive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV OCRD_METS_CACHING=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           0B
ENV HOME=/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0B
ENV XDG_CONFIG_HOME=/usr/local/share/ocrd-resources                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0B
ENV XDG_DATA_HOME=/usr/local/share                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV VIRTUAL_ENV=/usr/local                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0B
ENV PREFIX=/usr/local                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             0B
LABEL maintainer=https://ocr-d.de/en/contact org.label-schema.vcs-ref=56507f1 org.label-schema.vcs-url=https://github.com/OCR-D/ocrd_all org.label-schema.build-date=2024-07-01T15:09:35Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         0B
ARG BUILD_DATE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
ARG VCS_REF                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0B
ARG BASE_IMAGE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
CMD ["/usr/local/bin/ocrd" "--help"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0B
WORKDIR /data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0B
RUN |1 FIXUP=echo /bin/sh -c python3 -m venv /usr/local     && hash -r     && make install-dev     && eval $FIXUP # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      467MB
RUN |1 FIXUP=echo /bin/sh -c apt-get update && apt-get -y install software-properties-common     && apt-get update && apt-get -y install         ca-certificates         python3-dev         python3-venv         gcc         make         wget         time         curl         sudo         git     && make deps-ubuntu # buildkit                                                                                                                                                                                                                                                                                                                                             451MB
RUN |1 FIXUP=echo /bin/sh -c echo 'APT::Install-Recommends "0"; APT::Install-Suggests "0";' >/etc/apt/apt.conf.d/ocr-d.conf # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            56B
COPY .git ./.git # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       30MB
COPY LICENSE . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         11.4kB
COPY README.md . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       7.32kB
COPY Makefile . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        15.7kB
RUN |1 FIXUP=echo /bin/sh -c mv ./src/ocrd_utils/ocrd_logging.conf /etc # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                3.38kB
COPY requirements.txt ./requirements.txt # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               652B
COPY VERSION ./VERSION # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 7B
COPY pyproject.toml . # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1.05kB
COPY src ./src # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         1.74MB
WORKDIR /build/core                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0B
ENV PIP=pip                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0B
ENV LANG=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ENV LC_ALL=C.UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
ENV PYTHONIOENCODING=utf8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         0B
ENV DEBIAN_FRONTEND=noninteractive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0B
MAINTAINER OCR-D                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0B
ARG FIXUP=echo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B
/bin/sh -c #(nop)  CMD ["/bin/bash"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0B
/bin/sh -c #(nop) ADD file:e7cff353f027ecf0a2cb1cdd51714de3b083a11a0d965f104489f9a7e6925056 in /                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  72.8MB
/bin/sh -c #(nop)  LABEL org.opencontainers.image.version=20.04                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B
/bin/sh -c #(nop)  LABEL org.opencontainers.image.ref.name=ubuntu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 0B
/bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0B
/bin/sh -c #(nop)  ARG RELEASE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B

So there's plenty of room to reduce the number of layers/steps...

@MehmedGIT
Copy link

MehmedGIT commented Jul 3, 2024

@bertsky we have briefly discussed with @kba about that after the tech call. Some of the commands could be abstracted away in separate script/s and called with a single RUN command. The register layer error is from that. Pulling the ocrd/all:medium then ocrd/all:maximum on top works as a temporal solution.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Some of the commands could be abstracted away in separate script/s and called with a single RUN command.

I'm already in the middle of that change – coming up ... here.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Note: ffefb8f was not possible with earlier versions of Docker. The original idea of using multiple RUN steps while still doing the actual build in one stop (for minimal image size) was because I wanted to have comments in between.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

So reducing the number of steps actually brought down build time by 4min.

How about trying to reactivate our parallel build again? Also, in the same experiment: let's try storing test results.

@MehmedGIT
Copy link

How about trying to reactivate our parallel build again?

Please also consider the cases in which the build is broken with an interruption. Rerunning the build should remove the files used for the parallel build. I remember facing such issues in the past.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Please also consider the cases in which the build is broken with an interruption. Rerunning the build should remove the files used for the parallel build. I remember facing such issues in the past.

I don't remember, sry. Can you please elaborate? So rerunning the CI becomes impossible if we use make -j in the Dockerfile?

(BTW, the current version is still sequential, because I confused PARALLEL and DOCKER_PARALLEL – I'm still curious if the test results work, though.)

@MehmedGIT
Copy link

I don't remember, sry. Can you please elaborate?

AFAIR, there were some files created under the ~/.parallel folder when installing ocrd_all natively. If a CTRL+C interrupted the build, rerunning the build was producing errors. Either because of the state or existence of the files under the parallel folder. I had to manually delete that folder for a successful build.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Oh that! Yes, that can happen. Not sure how to fix this (I guess it's really a GNU parallel issue).

But this should not affect CI/CD, since this will spawn a fresh environment each time.

(Also, setting DOCKER_PARALLEL will not affect native builds at all.)

@MehmedGIT
Copy link

Oh that! Yes, that can happen. Not sure how to fix this (I guess it's really a GNU parallel issue).

Just deleting the ~/.parallel folder if existing at the beginning of the build? Is there anything wrong by doing that? I am not sure.

Right, it does not affect the CI/CD pipeline.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Oops! Seems we do have a test failure when running make test in core (in the newly built Docker image).

So ocrd_network complains that it cannot import MpxReq from ocrd.mets_server. @MehmedGIT do you know what's going on?

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

So ocrd_network complains that it cannot import MpxReq from ocrd.mets_server. @MehmedGIT do you know what's going on?

Ouch!

I am seeing:

#12 41.65 . /usr/local/sub-venv/headless-tf1/bin/activate && sem -q --will-cite --fg --id ocrd_all_pipheadless-tf1 pip install --timeout=3000 ocrd ocrd_network
#12 97.12 Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
#12 97.12 Collecting ocrd
#12 97.12   Downloading ocrd-2.66.1-py3-none-any.whl.metadata (8.8 kB)
#12 97.12 Collecting ocrd_network
#12 97.12   Downloading ocrd_network-2.64.0-py3-none-any.whl.metadata (8.8 kB)

@MehmedGIT
Copy link

Inconsistent core version as you also found out. 2.64.0 instead of 2.66.1. @joschrew also had his setup failing due to that error.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

So IIUC there are multiple things going on:

  1. we neglected publishing our aliased packages ocrd_utils, ocrd_models, ocrd_network etc to PyPI in addition to ocrd
    (remember we just wanted to keep this as a fallback for a while, since we moved everything into a single distribution, but were not sure every dependent package updated its requirements to just ocrd)
  2. in ocrd_all's rules for installing core, we still mention ocrd_network, which should not be used anymore

    ocrd_all/Makefile

    Lines 231 to 232 in 56507f1

    $(BIN)/ocrd: | $(ACTIVATE_VENV)
    . $(ACTIVATE_VENV) && $(SEMPIP) pip install $(PIP_OPTIONS_E) ocrd ocrd_network
  3. the whole premise for firing that rule is that core is not part of OCRD_MODULES, i.e. if it must be assumed that should not be installed from the repo; and core, in turn, is not in that list, because it is not in DOCKER_MODULES, where it was removed when we migrated towards staged build (core → minimum → medium → maximum). The idea behind that was that we don't need to clone and COPY and install something we already have installed in the FROM stage (in the exact version we want). But what we forgot (!) was that there are no sub-venvs in ocrd/core, so we actually do need that module – even if that means re-installing in the top-level venv. Since the sub-venv starts being needed only with medium, we could just add it there. But then perhaps we'll forget about this dependency some day, and when we need a sub-venv in minimum it fails again. So I'll just include it in all 3 stages.

You can never be too paranoid.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Just deleting the ~/.parallel folder if existing at the beginning of the build? Is there anything wrong by doing that? I am not sure.
Right, it does not affect the CI/CD pipeline.

For native installations, that's not recommendable. First of all, it is unexpected to remove stuff in the user's home directory. Second, there might be other use-cases of that, even some that are running at the same time. Third, this is also the place where parallel stores its 'activation' (needed so it does not always nag about being cited).

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Ok, we are still failing, but this time ocr-fileformat is the culprit:

#12 85.98 Collecting ocrd-utils (from textract2page==0.2.dev12+g3f28e31)
#12 86.00   Downloading ocrd_utils-2.64.0-py3-none-any.whl.metadata (8.8 kB)
#12 86.20 Collecting ocrd-models (from textract2page==0.2.dev12+g3f28e31)
#12 86.21   Downloading ocrd_models-2.64.0-py3-none-any.whl.metadata (8.8 kB)

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

I'll update to OCR-D/ocrd_fileformat#186.

Good news is that with -j4 we reduced build time by another 10min.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Next CI failure almost feels great!

I think I've seen those already. IINM OCR-D/core#1243 should fix them. But ocrd_all is not the place for this.

So from my side, this is ready.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 3, 2024

Note: I've cancelled the CircleCI workflow for the latest change, which only affects the GH Actions workflow for the Docker build (in similar fashion). I manually triggered that here.

@MehmedGIT
Copy link

Well done!

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

note: 60c7f7a is in preparation of OCR-D/core#1250

(but perhaps we should also do something similar in native installations...)

@MehmedGIT
Copy link

(but perhaps we should also do something similar in native installations...)

That would be ideal. I was wondering if that will not produce some inconsistencies between the single ocrd-all-tool.json file and the json tool of any processor that got updated recently. I.e., how will ocrd-all-tool.json always be up-to-date from the core's perspective?

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

(but perhaps we should also do something similar in native installations...)

That would be ideal.

So perhaps we should embed ocrd-all-tool.json and ocrd-all-module-dir.json into a recipe for all (which currently just delegates to modules and executables)?

all: $(OCRD_MODULES) $(OCRD_EXECUTABLES)

For example:

# already depend on OCRD_MODULES and OCRD_EXECUTABLES:
all: ocrd-all-tool.json ocrd-all-module-dir.json
	. $(ACTIVATE_VENV) && cp -f $^ `python -c "import ocrd; print(ocrd.__path__[0])"`

I was wondering if that will not produce some inconsistencies between the single ocrd-all-tool.json file and the json tool of any processor that got updated recently. I.e., how will ocrd-all-tool.json always be up-to-date from the core's perspective?

Notice that the recipe which creates ocrd-all-tool.json (via ocrd-all-tool.py) merely concatenates all individual ocrd-tool.json files. Therefore, insofar as these are up-to-date, and the recipe is running after each change to the installation, the total file will also be up-to-date.

But if someone merely updates a single tool without running the ocrd-all-tool.json recipe afterwards, then indeed there will be an inconsistency.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

But if someone merely updates a single tool without running the ocrd-all-tool.json recipe afterwards, then indeed there will be an inconsistency.

We could rewrite our documentation to say that even for individual tool updates, the recommended method is always via make all – e.g. make all -W ocrd_tesserocr.

BTW, the problem of not being up-to-date also arises in the network implementation (or other long-running instances of ocrd_utils): because the runtime lru_cache might be out of date.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

CI still fails with 909fdaf – I wonder what's the matter with the additional cp -f command. Unfortunately, Docker Build seems to obscure the exact reason for the failure. (It works the first time, i.e. minimum stage, but fails the second attempt, i.e. medium.)

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

CI still fails with 909fdaf – I wonder what's the matter with the additional cp -f command. Unfortunately, Docker Build seems to obscure the exact reason for the failure. (It works the first time, i.e. minimum stage, but fails the second attempt, i.e. medium.)

Ah, not obscured, but disguised due to out-of-order output in parallel build:

actual error
#12 31.65 ERROR: Error checking for conflicts.
#12 31.65 Traceback (most recent call last):
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3021, in _dep_map
#12 31.65     return self.__dep_map
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2815, in __getattr__
#12 31.65     raise AttributeError(attr)
#12 31.65 AttributeError: _DistInfoDistribution__dep_map
#12 31.65 
#12 31.65 During handling of the above exception, another exception occurred:
#12 31.65 
#12 31.65 Traceback (most recent call last):
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
#12 31.65     return self._pkg_info
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2815, in __getattr__
#12 31.65     raise AttributeError(attr)
#12 31.65 AttributeError: _pkg_info
#12 31.65 
#12 31.65 During handling of the above exception, another exception occurred:
#12 31.65 
#12 31.65 Traceback (most recent call last):
#12 31.65   File "/usr/local/sub-venv/headless-tf1/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 543, in _warn_about_conflicts
#12 31.65   File "/usr/local/sub-venv/headless-tf1/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 114, in check_install_conflicts
#12 31.65   File "/usr/local/sub-venv/headless-tf1/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 53, in create_package_set_from_installed
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2736, in requires
#12 31.65     dm = self._dep_map
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3023, in _dep_map
#12 31.65     self.__dep_map = self._compute_dependencies()
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3032, in _compute_dependencies
#12 31.65     for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
#12 31.65     metadata = self.get_metadata(self.PKG_INFO)
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 1420, in get_metadata
#12 31.65     value = self._get(path)
#12 31.65   File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 1616, in _get
#12 31.65     with open(path, 'rb') as stream:
#12 31.65 FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/sub-venv/headless-tf1/lib/python3.8/site-packages/pip-20.0.2.dist-info/METADATA'
#12 31.65 Installing collected packages: pip, setuptools, wheel
#12 31.65   Attempting uninstall: pip
#12 31.66     Found existing installation: pip 20.0.2
#12 31.66     Can't uninstall 'pip'. No files were found to uninstall.
#12 32.50   Attempting uninstall: setuptools
#12 32.50     Found existing installation: setuptools 44.0.0
#12 32.50   Attempting uninstall: setuptools
#12 32.50     Found existing installation: setuptools 44.0.0
#12 32.55     Uninstalling setuptools-44.0.0:
#12 32.55       Successfully uninstalled setuptools-44.0.0
#12 32.56     Uninstalling setuptools-44.0.0:
#12 32.56 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/usr/local/sub-venv/headless-tf1/bin/easy_install'

So perhaps just copying to core/src/ocrd was not such a bright idea after all – it may cause problems next time we want to install. Also, we forgot to install in the sub-venv as well.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

So perhaps we should embed ocrd-all-tool.json and ocrd-all-module-dir.json into a recipe for all (which currently just delegates to modules and executables)?

The new recipe seems to work now. (We can build successfully, merely the core test is running into the 4 unrelated assertions discussed earlier.) I also tested native installation in a GHA build again.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 4, 2024

So to sum up (esp. for the changelog) this PR brings:

  • docker: fix /models/tessdata symlink loop (by avoiding re-linking during build)
  • docker: verify that resmgr works
  • docker: reduce number of build steps / layers
  • docker: build parallel (again), fully utilising CI resources
  • docker: no ocrd_network if core is not a module
  • docker: do include core as a module in all variants (needed for sub-venvs)
  • CI/CD: run core test and store its results
  • CI/CD: extract and store JSON files in Github Actions, too
  • update ocrd_fileformat / ocr-fileformat / textract2page (to avoid broken ocrd_utils dependency)
  • make all: 🔥 also build ocrd-all-tool.json and ocrd-all-module-dir.json
  • make all: 🔥 install ocrd-all-tool.json and ocrd-all-module-dir.json into ocrd distribution

@kba kba merged commit d46326b into master Jul 17, 2024
4 of 5 checks passed
@stweil stweil deleted the fix-docker-xdg-alias-staged branch July 17, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/models not working
3 participants