From a51a4317b3711c64a59f7872171f0a74a7ac53fa Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 31 Oct 2025 10:05:39 -0700 Subject: [PATCH] fix: scope UV env vars to llama-stack install only The previous change set UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY as persistent ENV vars, which affected all subsequent uv commands including distribution dependency installation. This caused conflicts when deps have their own --extra-index-url (like PyTorch packages). Now these env vars are only used inline for the llama-stack installation step in editable mode, keeping distribution deps unaffected. --- containers/Containerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/containers/Containerfile b/containers/Containerfile index 050f52940..55ca7afc9 100644 --- a/containers/Containerfile +++ b/containers/Containerfile @@ -58,8 +58,6 @@ ENV TEST_PYPI_VERSION=${TEST_PYPI_VERSION} ENV KEEP_WORKSPACE=${KEEP_WORKSPACE} ENV DISTRO_NAME=${DISTRO_NAME} ENV RUN_CONFIG_PATH=${RUN_CONFIG_PATH} -ENV UV_EXTRA_INDEX_URL=${UV_EXTRA_INDEX_URL} -ENV UV_INDEX_STRATEGY=${UV_INDEX_STRATEGY} # Copy the repository so editable installs and run configurations are available. COPY . /workspace @@ -76,13 +74,19 @@ RUN set -eux; \ fi; # Install llama-stack +# Use UV_EXTRA_INDEX_URL inline only for this step to avoid affecting distribution deps RUN set -eux; \ if [ "$INSTALL_MODE" = "editable" ]; then \ if [ ! -d "$LLAMA_STACK_DIR" ]; then \ echo "INSTALL_MODE=editable requires LLAMA_STACK_DIR to point to a directory inside the build context" >&2; \ exit 1; \ fi; \ - uv pip install --no-cache-dir -e "$LLAMA_STACK_DIR"; \ + if [ -n "$UV_EXTRA_INDEX_URL" ]; then \ + UV_EXTRA_INDEX_URL="$UV_EXTRA_INDEX_URL" UV_INDEX_STRATEGY="$UV_INDEX_STRATEGY" \ + uv pip install --no-cache-dir -e "$LLAMA_STACK_DIR"; \ + else \ + uv pip install --no-cache-dir -e "$LLAMA_STACK_DIR"; \ + fi; \ elif [ "$INSTALL_MODE" = "test-pypi" ]; then \ uv pip install --no-cache-dir fastapi libcst; \ if [ -n "$TEST_PYPI_VERSION" ]; then \