From 3fb2d39d9427c52dec2e799190122da958743a28 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Tue, 25 Aug 2020 16:38:22 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Allow=20running=20pre-built=20conta?= =?UTF-8?q?iners=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run | 15 +++++++++------ run-docker-hub | 6 ++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100755 run-docker-hub diff --git a/run b/run index de48bc9..940de9b 100755 --- a/run +++ b/run @@ -2,6 +2,9 @@ set -e # Abort on error +DOCKER_IMAGE_PREFIX=${DOCKER_IMAGE_PREFIX:-my_ocrd_workflow} # default to locally built +DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG:-latest} + self=`realpath $0` self_dir=`dirname "$self"` @@ -31,12 +34,12 @@ build_alias() { alias $command="docker run $docker_run_options $docker_image $command" } shopt -s expand_aliases # Required for non-interactive shells -build_alias ocrd my_ocrd_workflow-core -build_alias ocrd-olena-binarize my_ocrd_workflow-ocrd_olena -build_alias ocrd-sbb-textline-detector my_ocrd_workflow-sbb_textline_detector -build_alias ocrd-calamari-recognize my_ocrd_workflow-ocrd_calamari -build_alias ocrd-tesserocr-recognize my_ocrd_workflow-ocrd_tesserocr -build_alias ocrd-dinglehopper my_ocrd_workflow-dinglehopper +build_alias ocrd ${DOCKER_IMAGE_PREFIX}-core:${DOCKER_IMAGE_TAG} +build_alias ocrd-olena-binarize ${DOCKER_IMAGE_PREFIX}-ocrd_olena:${DOCKER_IMAGE_TAG} +build_alias ocrd-sbb-textline-detector ${DOCKER_IMAGE_PREFIX}-sbb_textline_detector:${DOCKER_IMAGE_TAG} +build_alias ocrd-calamari-recognize ${DOCKER_IMAGE_PREFIX}-ocrd_calamari:${DOCKER_IMAGE_TAG} +build_alias ocrd-tesserocr-recognize ${DOCKER_IMAGE_PREFIX}-ocrd_tesserocr:${DOCKER_IMAGE_TAG} +build_alias ocrd-dinglehopper ${DOCKER_IMAGE_PREFIX}-dinglehopper:${DOCKER_IMAGE_TAG} . $self_dir/my_ocrd_workflow diff --git a/run-docker-hub b/run-docker-hub new file mode 100755 index 0000000..add0823 --- /dev/null +++ b/run-docker-hub @@ -0,0 +1,6 @@ +#!/bin/sh +# Run the my_ocrd_workflow containers on the current workspace + +DOCKER_IMAGE_PREFIX=mikegerber/my_ocrd_workflow \ +DOCKER_IMAGE_TAG=stable \ + `dirname $0`/run "$@"