@@ -119,6 +119,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
119119# Reference: https://github.com/astral-sh/uv/pull/1694
120120ENV UV_HTTP_TIMEOUT=500
121121ENV UV_INDEX_STRATEGY="unsafe-best-match"
122+ # Use copy mode to avoid hardlink failures with Docker cache mounts
123+ ENV UV_LINK_MODE=copy
122124
123125# Upgrade to GCC 10 to avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92519
124126# as it was causing spam when compiling the CUTLASS kernels
@@ -181,6 +183,8 @@ COPY requirements/build.txt requirements/build.txt
181183# Reference: https://github.com/astral-sh/uv/pull/1694
182184ENV UV_HTTP_TIMEOUT=500
183185ENV UV_INDEX_STRATEGY="unsafe-best-match"
186+ # Use copy mode to avoid hardlink failures with Docker cache mounts
187+ ENV UV_LINK_MODE=copy
184188
185189RUN --mount=type=cache,target=/root/.cache/uv \
186190 uv pip install --system -r requirements/build.txt \
@@ -272,6 +276,8 @@ ARG PYTORCH_CUDA_INDEX_BASE_URL
272276# Reference: https://github.com/astral-sh/uv/pull/1694
273277ENV UV_HTTP_TIMEOUT=500
274278ENV UV_INDEX_STRATEGY="unsafe-best-match"
279+ # Use copy mode to avoid hardlink failures with Docker cache mounts
280+ ENV UV_LINK_MODE=copy
275281
276282COPY requirements/lint.txt requirements/lint.txt
277283COPY requirements/test.txt requirements/test.txt
@@ -341,6 +347,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
341347# Reference: https://github.com/astral-sh/uv/pull/1694
342348ENV UV_HTTP_TIMEOUT=500
343349ENV UV_INDEX_STRATEGY="unsafe-best-match"
350+ # Use copy mode to avoid hardlink failures with Docker cache mounts
351+ ENV UV_LINK_MODE=copy
344352
345353# Workaround for https://github.com/openai/triton/issues/2507 and
346354# https://github.com/pytorch/pytorch/issues/107960 -- hopefully
@@ -472,6 +480,8 @@ ARG PIP_EXTRA_INDEX_URL UV_EXTRA_INDEX_URL
472480# Reference: https://github.com/astral-sh/uv/pull/1694
473481ENV UV_HTTP_TIMEOUT=500
474482ENV UV_INDEX_STRATEGY="unsafe-best-match"
483+ # Use copy mode to avoid hardlink failures with Docker cache mounts
484+ ENV UV_LINK_MODE=copy
475485
476486# install development dependencies (for testing)
477487RUN --mount=type=cache,target=/root/.cache/uv \
0 commit comments