-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
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
warn_user_once!("Failed to clone files; falling back to full copy. This may lead to degraded performance.\n If the cache and target directories are on different filesystems, reflinking may not be supported.\n If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning."); |
As a matter of fact, uv now supports link mode "symlink".
- It would probably be great to try symlink before falling back to copy
- The error message makes it sound like we have to live with the performance degradation, and does not mention that symlink mode is also available
- The Docker documentation should include
ENV UV_LINK_MODE=symlink
so that people do not run into this issue. See https://docs.astral.sh/uv/guides/integration/docker/#caching
Metadata
Metadata
Assignees
Labels
No labels