-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
docs: Extend non-root guide and create dedicated compose file for it #13257
base: main
Are you sure you want to change the base?
Conversation
Label error. Requires exactly 1 of: changelog:.*. Found: |
Does this need a whole separate compose file? |
I don’t think this should be added. I rather we document (as in the FAQ) the needed changes for users who know what to do. Non root requires more technical knowledge. Also, have you tested this PR? Pretty sure ML won’t work. I’m not too sure about the 999:999 for Postgres either - what OS was this determined on? |
Hi, I use Debian bookworm, I tested only the onboarding and a single photo upload. I waited for some time for the machine learning to kick in for the facial recognition or such and saw some logs about it without error.
The directory is empty, I am not sure how to troubleshoot, or what can be wrong, I checked with exec into the container and the mounted dir is writeable. The postgres was tested. When I did not set userid 999 it failed even with read-write permissions, as it tried to change ownership of the directory and failed (I guess this line fails, but not sure on the lineage of the image). Even if the init process has root/given_userid, it changes the userid of the child processes, as I can tell from the logs and behavior. The 999 userid was empirically checked exec-ing into the running container, but I think this dockerfile template is what this image is based on as well, or based on which it was created. |
Machine learning actually doesn't use matplotlib at all - it's just a transitive dependency for a module to provide functionality we don't use. Setting |
How about if we put Does it make sense to turn |
The userid variable introduction would only cause some clutter in the .env file, but I see value in. However, the bind mount would give unnecessary extra requirement to the normal deployment, I would avoid that. |
It would also be possible to use named volumes and |
I am still trying to figure out a solution where we do not complicate the standard case (root) but at the same time make the delta to go non-root as small as possible. One question on the way there is why we need a volume for [EDIT] |
Something like the following could be a solution for named volumes:
The creation of the directories and Just some thoughts... I will probably start with the bind mount solution and merge changes as needed by future versions. |
Correct, it’s non persistent data so volume isn’t needed except for permission issue. We’ve discussed a “permission setup” container before and we will not be adding that. We’re only going to add details on which volumes need to be mounted. |
I think it may also be possible to |
You can only run chown with root privileges, which defeats the point of running the container as non root. |
I just made a pull request #13834 not noticing this one. I used tmpfs so I didn't need to use a dedicated chown container or manually create the directories on the host, although it does make the model-cache folder ephemeral. |
Thanks for the The |
/.cache is not a mistake, or it was not when I tested about 2 months ago. The ML container fails to start without it being writable. |
So we indeed need |
Not all of the facial recognition features require the ML container, so that doesn’t prove much. |
Based on discussion 13124, creating a dedicated compose file for easier non-root setup guide and refining the relevant FAQ item.