Skip to content

Commit 3530bec

Browse files
authored
Setup uv caching (#15)
- Puts python interpreter downloads in the cache - Sets uv to copy rather than hardlink to avoid warnings https://docs.astral.sh/uv/guides/integration/docker/#caching
1 parent 7ed3893 commit 3530bec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ RUN /root/terminal-config/ensure-user-terminal-config.sh && \
4646
# Install uv using the official image
4747
# See https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
4848
COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /uvx /bin/
49+
50+
# We recommend mounting in a cache for uv, so silence warnings about it being on a different volume
51+
# and cache python interpreter downloads in the same directory
52+
# https://docs.astral.sh/uv/guides/integration/docker/#caching
53+
ENV UV_LINK_MODE=copy
54+
ENV UV_PYTHON_CACHE_DIR=/root/.cache/uv/python

0 commit comments

Comments
 (0)