Closed mikegerber closed 9 months ago
(I was a bit confused trying to understand what was going on, because the error message I got was about /usr/local/share/ocrd-resources
, not /models
- might be worth reconsidering the /models
path, or the error reporting in case there is a symlink.)
I transferred to ocrd_all, because this is not wrong in the documentation, only a bug in the implementation.
Basically, all we need is another chmod go+rwx /models
as final RUN
instruction in the Dockerfile.
(It already worked with true bind mounts, the problem only existed for named volumes.)
Mind though that already existing named volumes might have to be removed first (because they still carry the wrong permissions), i.e. docker volume rm ocrd-models
.
Basically, all we need is another
chmod go+rwx /models
as finalRUN
instruction in the Dockerfile. Mind though that already existing named volumes might have to be removed first (because they still carry the wrong permissions), i.e.docker volume rm ocrd-models
.
Are you sure the permissions carry over to a newly created named volume?
Are you sure the permissions carry over to a newly created named volume?
Yes, they do (I just tried).
At https://ocr-d.de/en/models#models-and-docker, the user is instructed to
docker run
the resmgr with--user $(id -u)
. However, the user does not by default have permission to write to/models
(or the underlying Docker volume).At least for Docker, this must be run as
root
inside the container, leaving out the--user
parameter. (For podman this would probably work, as it runs root-less.)