@@ -18,10 +18,6 @@ UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT:-500}
1818
1919# mounting is not supported by docker buildx, so we use COPY instead
2020USE_COPY_NOT_MOUNT=${USE_COPY_NOT_MOUNT:- }
21-
22- # Mount command for cache container .cache, can be overridden by the user if needed
23- MOUNT_CACHE=${MOUNT_CACHE:- " --mount=type=cache,id=llama-stack-cache,target=/root/.cache" }
24-
2521# Path to the run.yaml file in the container
2622RUN_CONFIG_PATH=/app/run.yaml
2723
@@ -176,18 +172,13 @@ RUN pip install uv
176172EOF
177173fi
178174
179- # Set the link mode to copy so that uv doesn't attempt to symlink to the cache directory
180- add_to_container << EOF
181- ENV UV_LINK_MODE=copy
182- EOF
183-
184175# Add pip dependencies first since llama-stack is what will change most often
185176# so we can reuse layers.
186177if [ -n " $normal_deps " ]; then
187178 read -ra pip_args <<< " $normal_deps"
188179 quoted_deps=$( printf " %q" " ${pip_args[@]} " )
189180 add_to_container << EOF
190- RUN $MOUNT_CACHE uv pip install $quoted_deps
181+ RUN uv pip install --no-cache $quoted_deps
191182EOF
192183fi
193184
@@ -197,7 +188,7 @@ if [ -n "$optional_deps" ]; then
197188 read -ra pip_args <<< " $part"
198189 quoted_deps=$( printf " %q" " ${pip_args[@]} " )
199190 add_to_container << EOF
200- RUN $MOUNT_CACHE uv pip install $quoted_deps
191+ RUN uv pip install --no-cache $quoted_deps
201192EOF
202193 done
203194fi
@@ -208,10 +199,10 @@ if [ -n "$external_provider_deps" ]; then
208199 read -ra pip_args <<< " $part"
209200 quoted_deps=$( printf " %q" " ${pip_args[@]} " )
210201 add_to_container << EOF
211- RUN $MOUNT_CACHE uv pip install $quoted_deps
202+ RUN uv pip install --no-cache $quoted_deps
212203EOF
213204 add_to_container << EOF
214- RUN python3 - <<PYTHON | $MOUNT_CACHE uv pip install -r -
205+ RUN python3 - <<PYTHON | uv pip install --no-cache -r -
215206import importlib
216207import sys
217208
@@ -293,7 +284,7 @@ COPY $dir $mount_point
293284EOF
294285 fi
295286 add_to_container << EOF
296- RUN $MOUNT_CACHE uv pip install -e $mount_point
287+ RUN uv pip install --no-cache -e $mount_point
297288EOF
298289}
299290
@@ -308,10 +299,10 @@ else
308299 if [ -n " $TEST_PYPI_VERSION " ]; then
309300 # these packages are damaged in test-pypi, so install them first
310301 add_to_container << EOF
311- RUN $MOUNT_CACHE uv pip install fastapi libcst
302+ RUN uv pip install --no-cache fastapi libcst
312303EOF
313304 add_to_container << EOF
314- RUN $MOUNT_CACHE uv pip install --extra-index-url https://test.pypi.org/simple/ \
305+ RUN uv pip install --no-cache --extra-index-url https://test.pypi.org/simple/ \
315306 --index-strategy unsafe-best-match \
316307 llama-stack==$TEST_PYPI_VERSION
317308
323314 SPEC_VERSION=" llama-stack"
324315 fi
325316 add_to_container << EOF
326- RUN $MOUNT_CACHE uv pip install $SPEC_VERSION
317+ RUN uv pip install --no-cache $SPEC_VERSION
327318EOF
328319 fi
329320fi
0 commit comments