Skip to content

Conversation

@tpoliaw
Copy link

@tpoliaw tpoliaw commented Oct 23, 2025

Instead of mounting the user's local cache. For the first use this will
be slower (if the user has previously used uv) but using a separate
volume means links within the cache referring to devcontainer locations
will not interfere with uv being run from outside the container.

Using a named volume means devcontainers for multiple projects can share
the same cache.

Instead of mounting the user's local cache. For the first use this will
be slower (if the user has previously used uv) but using a separate
volume means links within the cache referring to devcontainer locations
will not interfere with uv being run from outside the container.

Using a named volume means devcontainers for multiple projects can share
the same cache.
@tpoliaw tpoliaw requested a review from coretl October 23, 2025 15:16
@tpoliaw tpoliaw linked an issue Oct 23, 2025 that may be closed by this pull request
@tpoliaw tpoliaw force-pushed the volume_cache branch 2 times, most recently from 1509ae6 to 89f799f Compare October 23, 2025 15:26
@tpoliaw tpoliaw changed the title Use shared volume for devcontainer uv cache chore: Use shared volume for devcontainer uv cache Oct 24, 2025
@tpoliaw tpoliaw requested a review from DiamondJoseph October 27, 2025 10:49
@tpoliaw tpoliaw closed this Oct 27, 2025
coretl added a commit that referenced this pull request Oct 28, 2025
Supercedes #304 and #305 by adding a global volume that contains:
- pre-commit cache
- uv cache
- uv managed python cache
- the venvs for all the projects

This allows us to use hardlink mode which makes it even faster, and
avoid the issue of anonymous volumes in devcontainers being left
dangling. Added docs to say that there is now a global venv for the
container, which is different for how it would look without any
environment variables set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharing uv cache in devcontainer creates broken links outside it

2 participants