Skip to content
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

make references to "Models and Docker" much more prominent #318

Open
Tracked by #337
bertsky opened this issue Jul 13, 2022 · 8 comments
Open
Tracked by #337

make references to "Models and Docker" much more prominent #318

bertsky opened this issue Jul 13, 2022 · 8 comments
Assignees

Comments

@bertsky
Copy link
Collaborator

bertsky commented Jul 13, 2022

Currently, the section explaining how to install models and run processors with Docker – which requires some form of persisting processor resources – is completely hidden here.

IMO it should be referenced (hyperlinked) in the Setup Guide, right after testing the Docker installation, in a short section Installing models (and yes, that section should exist for the native and individual option as well). Also, in the User Guide, rename Usage of models to Using models and also link back to the (new section on model downloading in the) Setup Guide. Also, consistently all docker run examples should carry the models volume besides the data volume throughout.

@bertsky
Copy link
Collaborator Author

bertsky commented Mar 8, 2023

ping @lena-hinrichsen

@bertsky
Copy link
Collaborator Author

bertsky commented Mar 16, 2023

BTW, Models and Docker currently does not cover the config volume needed for resources.yml (model user database). (It's also missing on the ocrd_all readme...)

@lena-hinrichsen
Copy link
Member

lena-hinrichsen commented Apr 4, 2023

These are the tasks I extracted from this issue:

@kba
Copy link
Member

kba commented Apr 6, 2023

=> Does this affect each command in https://ocr-d.de/en/user_guide or can we at least skip the Preparing a workspace section?

No, the ocrd CLI itself does not need any resources.

@kba
Copy link
Member

kba commented Apr 6, 2023

BTW, Models and Docker currently does not cover the config volume needed for resources.yml (model user database). (It's also missing on the ocrd_all readme...)

The issue is that if you download a resource, it will be added (and the file created if non-existant) to $HOME/.config/ocrd/resources.yml. To make that list persistent, there should be a host directory ./config (or similar) and it should be mounted like this:

  --volume $PWD/config:/.config/ocrd \

@bertsky
Copy link
Collaborator Author

bertsky commented Apr 8, 2023

To make that list persistent, there should be a host directory ./config (or similar) and it should be mounted like this:

@kba perhaps my thinking was not right though. I remember seeing problems by not having a /.config/ocrd/resources.yml writable. But that could be remedied by providing a sensible default for XDG_CONFIG_HOME. I don't think we actually need a persistent config itself. (And with dynamic resource discovery, perhaps we need no user config at all now?)

@lena-hinrichsen
Copy link
Member

lena-hinrichsen commented Jun 16, 2023

@kba @bertsky Do we still need --volume $PWD/config:/.config/ocrd \ as a parameter for docker calls when downloading models? (that means especially for https://ocr-d.de/en/models )

@bertsky
Copy link
Collaborator Author

bertsky commented Jun 16, 2023

@kba @bertsky Do we still need --volume $PWD/config:/.config/ocrd \ as a parameter for docker calls when downloading models? (that means especially for https://ocr-d.de/en/models

@lena-hinrichsen I'm afraid yes, for the moment we still do. That's because

  • we still do (generate and) parse a ocrd/resources.yml user DB
  • we still do not set XDG_CONFIG_HOME in ocrd_all (which we should, ideally to /usr/local/share/ocrd-resources, consistent with XDG_DATA_HOME, so in the future, a single volume would be enough)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants