From 3f366339ad1628855458f000748265039242b054 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Mon, 24 Jun 2019 16:36:19 +0200 Subject: [PATCH] Add container setup --- Dockerfile | 25 +++++++++++++++++++++++++ build | 2 ++ requirements.txt | 4 ++++ run | 2 ++ 4 files changed, 33 insertions(+) create mode 100644 Dockerfile create mode 100755 build create mode 100644 requirements.txt create mode 100755 run diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2843a21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:18.04 + +ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 + +RUN apt-get update && \ + apt-get install -y \ + git \ + libleptonica-dev \ + libtesseract-dev \ + libxml2-utils \ + python3-pip \ + tesseract-ocr-all \ + xmlstarlet \ + && \ + apt-get clean + +COPY requirements.txt /tmp +RUN pip3 install --no-cache-dir -r /tmp/requirements.txt + +COPY my_ocrd_workflow /usr/bin +COPY xsd /usr/bin/xsd + + +WORKDIR /data +CMD ["/usr/bin/my_ocrd_workflow"] diff --git a/build b/build new file mode 100755 index 0000000..2297810 --- /dev/null +++ b/build @@ -0,0 +1,2 @@ +#!/bin/sh +podman build -t my_ocrd_workflow . diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d0bd925 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +git+https://github.com/seuretm/ocrd_typegroups_classifier.git +ocrd_kraken +tesserocr == 2.3.1 # 2.4.0 fails with Ubuntu 18.04's tesseract +ocrd_tesserocr diff --git a/run b/run new file mode 100755 index 0000000..996578b --- /dev/null +++ b/run @@ -0,0 +1,2 @@ +#!/bin/sh +podman run -it --mount type=bind,src="$(pwd)",target=/data --privileged=true my_ocrd_workflow