mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 04:00:42 +00:00
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.
This commit is contained in:
parent
98fa43fd94
commit
a51a4317b3
1 changed files with 7 additions and 3 deletions
|
|
@ -58,8 +58,6 @@ ENV TEST_PYPI_VERSION=${TEST_PYPI_VERSION}
|
||||||
ENV KEEP_WORKSPACE=${KEEP_WORKSPACE}
|
ENV KEEP_WORKSPACE=${KEEP_WORKSPACE}
|
||||||
ENV DISTRO_NAME=${DISTRO_NAME}
|
ENV DISTRO_NAME=${DISTRO_NAME}
|
||||||
ENV RUN_CONFIG_PATH=${RUN_CONFIG_PATH}
|
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 the repository so editable installs and run configurations are available.
|
||||||
COPY . /workspace
|
COPY . /workspace
|
||||||
|
|
@ -76,13 +74,19 @@ RUN set -eux; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
# Install llama-stack
|
# Install llama-stack
|
||||||
|
# Use UV_EXTRA_INDEX_URL inline only for this step to avoid affecting distribution deps
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
if [ "$INSTALL_MODE" = "editable" ]; then \
|
if [ "$INSTALL_MODE" = "editable" ]; then \
|
||||||
if [ ! -d "$LLAMA_STACK_DIR" ]; 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; \
|
echo "INSTALL_MODE=editable requires LLAMA_STACK_DIR to point to a directory inside the build context" >&2; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
|
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"; \
|
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 \
|
elif [ "$INSTALL_MODE" = "test-pypi" ]; then \
|
||||||
uv pip install --no-cache-dir fastapi libcst; \
|
uv pip install --no-cache-dir fastapi libcst; \
|
||||||
if [ -n "$TEST_PYPI_VERSION" ]; then \
|
if [ -n "$TEST_PYPI_VERSION" ]; then \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue