-
Notifications
You must be signed in to change notification settings - Fork 739
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
uv falls back to copy instead of symlink #7509
Comments
Symlinks are fairly problematic, since if the cache gets deleted, your entire project will break. I generally would not want to default to them. |
We set |
I use symlink mode at work and I agree with this, I've hit an issue twice where I had to recreate my entire environment, for me it's worth the trade off but I think a user should know they are opting into symlink. |
I think this is the correct behavior. It's totally fine for users to use symlinks, but they are also dangerous so I'd prefer not to make them the default. |
When using a Docker cache mount, as recommended in the documentation, uv falls back to copying instead of hardlinking and complains about it. The message also recommends to suppress the complaint with explicitely setting the link mode to COPY.
See
uv/crates/install-wheel-rs/src/linker.rs
Line 443 in fe4e39a
As a matter of fact, uv now supports link mode "symlink".
ENV UV_LINK_MODE=symlink
so that people do not run into this issue. See https://docs.astral.sh/uv/guides/integration/docker/#cachingThe text was updated successfully, but these errors were encountered: