You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eynollah/Makefile

62 lines
1.6 KiB
Makefile

EYNOLLAH_MODELS ?= $(PWD)/models_eynollah
export EYNOLLAH_MODELS
# 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 ""
4 years ago
@echo " models Download and extract models to $(PWD)/models_eynollah"
@echo " install Install with pip"
@echo " install-dev Install editable with pip"
4 years ago
@echo " test Run unit tests"
@echo ""
@echo " Variables"
@echo ""
# END-EVAL
4 years ago
# Download and extract models to $(PWD)/models_eynollah
models: models_eynollah
2 years ago
models_eynollah: models_eynollah.tar.gz
tar xf models_eynollah.tar.gz
4 years ago
models_eynollah.tar.gz:
# wget 'https://qurator-data.de/eynollah/2021-04-25/models_eynollah.tar.gz'
# wget 'https://qurator-data.de/eynollah/2022-04-05/models_eynollah_renamed.tar.gz'
1 month ago
wget 'https://qurator-data.de/eynollah/2022-04-05/models_eynollah.tar.gz'
# wget 'https://github.com/qurator-spk/eynollah/releases/download/v0.3.0/models_eynollah.tar.gz'
1 month ago
# wget 'https://github.com/qurator-spk/eynollah/releases/download/v0.3.1/models_eynollah.tar.gz'
4 years ago
# Install with pip
install:
pip install .
# Install editable with pip
install-dev:
pip install -e .
4 years ago
smoke-test:
eynollah -i tests/resources/kant_aufklaerung_1784_0020.tif -o . -m $(PWD)/models_eynollah
4 years ago
# Run unit tests
test:
pytest tests
# 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) .