eynollah/Makefile

62 lines
1.6 KiB
Makefile
Raw Permalink Normal View History

2021-02-04 15:21:14 +01:00
EYNOLLAH_MODELS ?= $(PWD)/models_eynollah
export EYNOLLAH_MODELS
2024-09-16 18:21:14 +02:00
# DOCKER_BASE_IMAGE = artefakt.dev.sbb.berlin:5000/sbb/ocrd_core:v2.68.0
DOCKER_BASE_IMAGE = docker.io/ocrd/core:v2.68.0
DOCKER_TAG = ocrd/eynollah
# BEGIN-EVAL makefile-parser --make-help Makefile
help:
@echo ""
@echo " Targets"
@echo ""
2020-11-23 13:40:54 +01:00
@echo " models Download and extract models to $(PWD)/models_eynollah"
@echo " install Install with pip"
@echo " install-dev Install editable with pip"
2020-11-27 14:38:29 +01:00
@echo " test Run unit tests"
@echo ""
@echo " Variables"
@echo ""
# END-EVAL
2020-11-23 13:40:54 +01:00
# Download and extract models to $(PWD)/models_eynollah
models: models_eynollah
2023-03-31 02:21:36 +02:00
models_eynollah: models_eynollah.tar.gz
2024-08-15 23:59:18 +02:00
tar xf models_eynollah.tar.gz
2020-11-23 13:40:54 +01:00
models_eynollah.tar.gz:
2023-03-31 02:19:07 +02:00
# wget 'https://qurator-data.de/eynollah/2021-04-25/models_eynollah.tar.gz'
2023-04-12 23:59:46 +02:00
# wget 'https://qurator-data.de/eynollah/2022-04-05/models_eynollah_renamed.tar.gz'
2024-11-22 12:40:21 +01:00
wget 'https://qurator-data.de/eynollah/2022-04-05/models_eynollah.tar.gz'
2024-09-17 21:39:17 +02:00
# wget 'https://github.com/qurator-spk/eynollah/releases/download/v0.3.0/models_eynollah.tar.gz'
2024-11-21 12:08:29 +01:00
# wget 'https://github.com/qurator-spk/eynollah/releases/download/v0.3.1/models_eynollah.tar.gz'
2020-11-23 13:40:54 +01:00
# Install with pip
install:
pip install .
# Install editable with pip
install-dev:
pip install -e .
2020-11-23 13:40:54 +01:00
smoke-test:
2024-11-22 19:47:06 +01:00
eynollah layout -i tests/resources/kant_aufklaerung_1784_0020.tif -o . -m $(PWD)/models_eynollah
2020-11-27 14:38:29 +01:00
# Run unit tests
test:
pytest tests
2024-09-16 18:21:14 +02:00
# 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) .