←back to thread

741 points chirau | 7 comments | | HN request time: 0.919s | source | bottom
Show context
acheong08 ◴[] No.44358882[source]
Just a few months back I said I would never use uv. I was already used to venv and pip. No need for another tool I thought.

I now use uv for everything Python. The reason for the switch was a shared server where I did not have root and there were all sorts of broken packages/drivers and I needed pytorch. Nothing was working and pip was taking ages. Each user had 10GB of storage allocated and pip's cache was taking up a ton of space & not letting me change the location properly. Switched to uv and everything just worked

If you're still holding out, really just spend 5 minutes trying it out, you won't regret it.

replies(11): >>44359172 #>>44359456 #>>44359522 #>>44359897 #>>44359946 #>>44360000 #>>44360262 #>>44360544 #>>44360813 #>>44361022 #>>44363908 #
1. yjftsjthsd-h ◴[] No.44359522[source]
> Each user had 10GB of storage allocated and pip's cache was taking up a ton of space & not letting me change the location properly. Switched to uv and everything just worked

Is it better about storage use? (And if so, how? Is it just good at sharing what can be shared?)

replies(3): >>44359578 #>>44360060 #>>44360598 #
2. fsh ◴[] No.44359578[source]
uv hardlinks identical packages, so adding virtual envs takes up very little space.
replies(1): >>44359776 #
3. snerbles ◴[] No.44359776[source]
Unless you cross mount points, which uv will helpfully warn about.
replies(1): >>44360456 #
4. kissgyorgy ◴[] No.44360060[source]
There is a global cache for all installed packages in the user home cache dir.
5. codethief ◴[] No.44360456{3}[source]
In those situations, have you had a any luck using UV_LINK_MODE=symlink? I eventually had to resort to `copy` mode because it seemed the folder names (hashes) uv created in the package cache were not fully deterministic. So sometimes my cache volume would change and my Docker build would break. :\
6. acheong08 ◴[] No.44360598[source]
Both pip and uv cache packages to ~/.cache. Uv lets you change it to /tmp and symlink instead of copying
replies(1): >>44363289 #
7. esseph ◴[] No.44363289[source]
Note: /tmp will take awhile to get rid of, but it's definitely on the chopping block.

I'd avoid workflows that lean on it, if anything else for security's sake.