Skip to content

Run ocrd network sample #449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,29 @@ docker: DOCKER_MODULES ?= $(OCRD_MODULES)
docker: DOCKER_PARALLEL ?= -j1
docker: docker-latest

OCRD_NETWORK_CONFIG ?= run-network/ocrd-all-config.yaml

.PHONY: network-setup network-start network-stop network-clean
network-setup: run-network/docker-compose.yml run-network/.env
docker volume create ocrd-resources
docker-compose -f run-network/docker-compose-resources.yaml up > /dev/null
docker-compose -f run-network/docker-compose-resources.yaml down --remove-orphans -v

run-network/venv:
$(PYTHON) -m venv $@
$@/bin/python -m pip install click requests pyaml shapely==1.8.5 ocrd
run-network/docker-compose.yml: run-network/venv
$</bin/python run-network/creator.py create-compose $(OCRD_NETWORK_CONFIG)
run-network/.env: run-network/venv
$</bin/python run-network/creator.py create-dotenv $(OCRD_NETWORK_CONFIG)
$</bin/python run-network/creator.py create-clients $</bin $(OCRD_NETWORK_CONFIG)
network-start:
run-network/venv/bin/python run-network/creator.py start $(OCRD_NETWORK_CONFIG)
network-stop:
run-network/venv/bin/python run-network/creator.py stop $(OCRD_NETWORK_CONFIG)
network-clean:
$(RM) -r run-network/venv run-network/.env run-network/docker-compose.yml
docker volume rm ocrd-resources
# do not search for implicit rules here:
Makefile: ;
local.mk: ;
Expand Down
4 changes: 4 additions & 0 deletions run-network/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!ocrd-all-tool.json
docker-compose.yaml
.env
clean.sh
Loading