Merge pull request #6 from qurator-spk/update-cd

Deploy versioned docker images and update transformers
This commit is contained in:
Robert Sachunsky 2026-05-08 18:44:49 +02:00 committed by GitHub
commit 3a9d72d3fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View file

@ -35,7 +35,7 @@ jobs:
password: ${{ secrets.DOCKERIO_PASSWORD }}
- name: Build the Docker image
# build both tags at the same time
run: make docker DOCKER_TAG="docker.io/ocrd/eynollah -t ghcr.io/qurator-spk/eynollah"
run: make docker DOCKER_TAG="docker.io/ocrd/eynollah ghcr.io/qurator-spk/eynollah"
- name: Test the Docker image
run: docker run --rm ocrd/eynollah ocrd-eynollah-segment -h
- name: Push to Dockerhub

View file

@ -2,8 +2,7 @@ PYTHON ?= python3
PIP ?= pip3
EXTRAS ?=
# DOCKER_BASE_IMAGE = artefakt.dev.sbb.berlin:5000/sbb/ocrd_core:v2.68.0
DOCKER_BASE_IMAGE ?= docker.io/ocrd/core-cuda-tf2:latest
DOCKER_BASE_IMAGE ?= docker.io/ocrd/core-cuda-tf2:3.12.3
DOCKER_TAG ?= ocrd/eynollah
DOCKER ?= docker
WGET = wget -O
@ -120,12 +119,19 @@ coverage:
$(MAKE) test PYTHON="coverage run"
coverage report -m
# Concatenate docker image names with either the git tag describing current commit or 'latest' and
# merge list with "-t"
empty :=
space := $(empty) $(empty)
GIT_TAG := $(strip $(shell git describe --tags | grep -x "v[0-9]\+\.[0-9]\+\.[0-9]\+"))
DOCKER_TAGS = $(subst $(space),$(space)-t$(space),$(DOCKER_TAG:%=$(if $(GIT_TAG),%:$(GIT_TAG),%:latest)))
# Build docker image
docker:
$(DOCKER) build \
--build-arg DOCKER_BASE_IMAGE=$(DOCKER_BASE_IMAGE) \
--build-arg VCS_REF=$$(git rev-parse --short HEAD) \
--build-arg BUILD_DATE=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
-t $(DOCKER_TAG) .
-t $(DOCKER_TAGS) .
.PHONY: models build install install-dev test smoke-test ocrd-test coverage docker help

View file

@ -1,2 +1,2 @@
torch
transformers <= 4.30.2
transformers >= 5