-
Notifications
You must be signed in to change notification settings - Fork 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
Support https://astral.sh/uv/install.sh running as Nobody #8242
Comments
In the next release, you should be able to set |
Awesome. Thanks for the quick response, and for updating the documentation. |
@charliermarsh I just tried out uv 0.4.23 and 0.4.24, and I still need to modify export CARGO_HOME=$WORKSPACE/cargo
export UV_UNMANAGED_INSTALL=$CARGO_HOME/uv
export UV_CACHE_DIR=$CARGO_HOME/.cache/uv
curl -LsSf https://astral.sh/uv/install.sh | sh -s -- -v --no-modify-path However when I attempt to setup a venv I get the following error: uv venv --python 3.13
x failed to create directory `/.local/share/uv/python`
`-> Permission denied (os error 13) same command with a modified export HOME=$(pwd)
uv venv --python 3.13
Using CPython 3.13.0
Creating virtual environment at: .venv Should I create a separate issue? |
@VirtualTim -- That looks a bit different. You may need to set |
I'm now running with: export UV_UNMANAGED_INSTALL=$WORKSPACE/cargo
export UV_PYTHON_INSTALL_DIR=$UV_UNMANAGED_INSTALL/python
export UV_CACHE_DIR=$CARGO_HOME/.cache/uv
export uv=$UV_UNMANAGED_INSTALL/uv
curl -LsSf https://astral.sh/uv/install.sh | sh -s -- -v
$uv venv --python 3.13 This all seems to work as expected. It might be a good idea to add the defaults to the documentation (I also see On an unrelated note, I really appreciate this tool. My use-case is that I want to run tests against a cross-platform SDK. I have ~10 different platforms to test on. These tests are written in Python. Managing Python (and dependency) versions would normally be a huge headache, but now I can just run uv in my build scripts, and my environment is set up. Now updating python versions across VMs/docker images/OSs is as simple as just changing one number in a Jenkinsfile. |
Also, if you'd like, I could add a quick guide here https://docs.astral.sh/uv/guides/ on how to run as Nobody? |
I don't think is a common enough use-case to cover in the top-level guides. I'd definitely appreciate some content on it though. If you put up a pull request with the content I can try to figure out where it fits. |
I would like to use uv as a jenkins action, similar to https://github.com/astral-sh/setup-uv.
When I'm running inside a docker container, Jenkins runs as
Nobody
(specifically-u 1000:1000
).$HOME
evaluates to/
, which I do not have permission to write to.It seems like I can get things working by running:
I have concerns about how future-proof this is. Is the file written to
$HOME/.config/uv/uv-receipt.json
important?Is this likely to cause other things to break?
It would be nice if I could install this without having to temporarily modify
$HOME
.The text was updated successfully, but these errors were encountered: