make install-models: delegate to ocrd resmgr#234
Conversation
bertsky
left a comment
There was a problem hiding this comment.
I recommend a more radical change: Instead of unconditionally delegating install-models to install-models-ocropus, install-models-calamari etc, we should make these subtargets depend on whether the respective module is in the currently active OCRD_MODULES, and encapsulate each such rule near the other rules for the modules.
Thus, instead of …
ifneq ($(findstring ocrd_cis, $(OCRD_MODULES)),)
OCRD_EXECUTABLES += $(OCRD_CIS)
...…we would have…
ifneq ($(findstring ocrd_cis, $(OCRD_MODULES)),)
install-models: install-models-cis
install-models-cis: $(BIN)/ocrd
. $(ACTIVATE_VENV) && ocrd resmgr download ocrd-cis-ocropy-recognize '*'
OCRD_EXECUTABLES += $(OCRD_CIS)
...Also, we still need to adapt Dockerfile:
ENV XDG_DATA_HOME /usr/local/share
VOLUME $XDG_DATA_HOME/ocrd-resources(perhaps also HOME itself)
|
Having thought about it some more, I agree that |
bertsky
left a comment
There was a problem hiding this comment.
Splendid – thanks!
Perhaps we could offer more of these install-models-* rules in order to allow a quick installation without studying all processors and available models? (Currently, I would still have to ocrd resmgr download PROCESSOR '*' selectively for each processor I might want to use.)
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
384ee6d I added targets for all projects that we have in core's You could always do the installation and then |
Once OCR-D/core#559 is merged.