mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
fix: pass UV index config to docker build for RC dependencies
Docker builds on release branches need access to UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY to resolve RC client dependencies from test.pypi. Changes: - Add UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY build args to Containerfile - Pass these env vars as build args in integration-tests.sh - ENV variables are now available during uv pip install in Docker builds
This commit is contained in:
parent
cc54e9ee42
commit
98fa43fd94
2 changed files with 14 additions and 0 deletions
|
|
@ -19,6 +19,8 @@ ARG KEEP_WORKSPACE=""
|
||||||
ARG DISTRO_NAME="starter"
|
ARG DISTRO_NAME="starter"
|
||||||
ARG RUN_CONFIG_PATH=""
|
ARG RUN_CONFIG_PATH=""
|
||||||
ARG UV_HTTP_TIMEOUT=500
|
ARG UV_HTTP_TIMEOUT=500
|
||||||
|
ARG UV_EXTRA_INDEX_URL=""
|
||||||
|
ARG UV_INDEX_STRATEGY=""
|
||||||
ENV UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT}
|
ENV UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT}
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||||
|
|
@ -56,6 +58,8 @@ 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
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,16 @@ if [[ "$STACK_CONFIG" == *"docker:"* && "$COLLECT_ONLY" == false ]]; then
|
||||||
--build-arg "LLAMA_STACK_DIR=/workspace"
|
--build-arg "LLAMA_STACK_DIR=/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Pass UV index configuration for release branches
|
||||||
|
if [[ -n "${UV_EXTRA_INDEX_URL:-}" ]]; then
|
||||||
|
echo "Adding UV_EXTRA_INDEX_URL to docker build: $UV_EXTRA_INDEX_URL"
|
||||||
|
build_cmd+=(--build-arg "UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL")
|
||||||
|
fi
|
||||||
|
if [[ -n "${UV_INDEX_STRATEGY:-}" ]]; then
|
||||||
|
echo "Adding UV_INDEX_STRATEGY to docker build: $UV_INDEX_STRATEGY"
|
||||||
|
build_cmd+=(--build-arg "UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY")
|
||||||
|
fi
|
||||||
|
|
||||||
if ! "${build_cmd[@]}"; then
|
if ! "${build_cmd[@]}"; then
|
||||||
echo "❌ Failed to build Docker image"
|
echo "❌ Failed to build Docker image"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue