diff --git a/Dockerfile-ocrd_fileformat b/Dockerfile-ocrd_fileformat new file mode 100644 index 0000000..183b0bd --- /dev/null +++ b/Dockerfile-ocrd_fileformat @@ -0,0 +1,20 @@ +FROM my_ocrd_workflow-core + +ARG PIP_INSTALL="pip3 install --no-cache-dir --use-feature=2020-resolver" +ARG OCRD_FILEFORMAT_VERSION="0.1.1" + + +RUN apt-get update && \ + apt-get install -y \ + openjdk-11-jdk-headless \ + && \ + apt-get clean && rm -rf /var/lib/apt/lists/* +RUN curl -sSL --retry 3 -O https://github.com/OCR-D/ocrd_fileformat/archive/v${OCRD_FILEFORMAT_VERSION}.tar.gz && \ + tar xvzf v${OCRD_FILEFORMAT_VERSION}.tar.gz && \ + cd ocrd_fileformat-${OCRD_FILEFORMAT_VERSION}/ && \ + make install-fileformat install PREFIX=/usr/local && \ + rm -rf v${OCRD_FILEFORMAT_VERSION}.tar.gz ocrd_fileformat-${OCRD_FILEFORMAT_VERSION}/ + + +# Default command +CMD ['ocrd-fileformat-transform'] diff --git a/build b/build index b35c989..f4bd858 100755 --- a/build +++ b/build @@ -31,3 +31,4 @@ docker build --cache-from=my_ocrd_workflow-ocrd_tesserocr -t my_ocrd_work docker build --cache-from=my_ocrd_workflow-sbb_textline_detector -t my_ocrd_workflow-sbb_textline_detector -f Dockerfile-sbb_textline_detector . docker build --cache-from=my_ocrd_workflow-sbb_binarization -t my_ocrd_workflow-sbb_binarization -f Dockerfile-sbb_binarization . docker build --cache-from=my_ocrd_workflow-ocrd_cis -t my_ocrd_workflow-ocrd_cis -f Dockerfile-ocrd_cis . +docker build --cache-from=my_ocrd_workflow-ocrd_fileformat -t my_ocrd_workflow-ocrd_fileformat -f Dockerfile-ocrd_fileformat . diff --git a/run b/run index b035279..12aee23 100755 --- a/run +++ b/run @@ -50,6 +50,7 @@ build_alias ocrd-cis-ocropy-denoise ${DOCKER_IMAGE_PREFIX}-ocrd_cis:${DOCKER_ build_alias ocrd-cis-ocropy-binarize ${DOCKER_IMAGE_PREFIX}-ocrd_cis:${DOCKER_IMAGE_TAG} build_alias ocrd-cis-ocropy-dewarp ${DOCKER_IMAGE_PREFIX}-ocrd_cis:${DOCKER_IMAGE_TAG} build_alias ocrd-cis-ocropy-recognize ${DOCKER_IMAGE_PREFIX}-ocrd_cis:${DOCKER_IMAGE_TAG} +build_alias ocrd-fileformat-transform ${DOCKER_IMAGE_PREFIX}-ocrd_transform:${DOCKER_IMAGE_TAG} . $self_dir/my_ocrd_workflow