llama-stack-mirror/containers
Ashwin Bharambe b088665227
fix(ci): unset empty UV index env vars to prevent uv errors (#4013)
Cherry-pick of #4012 to release-0.3.x

Fixes container builds failing with UV index strategy errors when build
args are passed with empty values.

Docker ARGs declared with empty defaults (ARG UV_INDEX_STRATEGY="")
become environment variables with empty string values in RUN commands.
UV interprets these as if --index-strategy "" was passed on the command
line, causing build failures with "error: a value is required for
'--index-strategy <UV_INDEX_STRATEGY>'".

This is a footgun because empty string ≠ unset variable, and ARGs
silently propagate to all RUN commands, only failing when declared with
empty defaults.

The fix unsets UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY at the start of
RUN blocks, saves the values early, and only restores them for editable
installs with RC dependencies. All other install modes (PyPI, test-pypi,
client) now run with a clean environment.
2025-10-31 13:45:47 -07:00
..
Containerfile fix(ci): unset empty UV index env vars to prevent uv errors (#4013) 2025-10-31 13:45:47 -07:00