set UV_PYTHON_INSTALL_DIR to a world readable/executable location #15302
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, thank you for this amazing project and all the effort! I would like to share my part with a first contribution:
I have a problem, not being able to run the vllm-openai amd64 image on Openshift since v0.8.0.
On container start I get a permission error:
/opt/venv/bin/vllm: /opt/venv/bin/python3: Permission denied
Openshift runs containers with non-root users per default.
Turns out that my non-root user (e.g. uid 1001) has access to /opt/venv, but not the python binary:
4 lrwxrwxrwx 1 root root 75 Mar 19 20:35 /opt/venv/bin/python -> /root/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/bin/python3.12
The recent update to use uv #13566 has caused this bug for me.
uv defaults to downloading python if it's not available system-wide (see astral-sh/uv#7710)
There's an easy fix though, as uv has an env var for the target dir:
Setting UV_PYTHON_INSTALL_DIR="/usr/local/share/uv/python" makes uv install python to a location, other users can access.
I have tested this on my mac, unfortunately not able to run the full amd64 vllm with cuda.
But I was able to run the container as root, change the env var, install another python version, add a user UID1001, log in and run the python interpreter.
Running containers as non-root is a very common way to reduce the attack surface of deployments so hopefully this fix can be released soon :)
I even would very much prefer to switch the default user to some non-root UID by default, what do others think?
I have found no related issues so far, so I didn't bother to create one just to close it again...