fix: pass UV env vars in all remaining docker build locations

Updated install-script-ci.yml workflow and scripts/docker.sh to pass
UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY as build args, ensuring all
docker build invocations handle RC dependencies correctly.
This commit is contained in:
Ashwin Bharambe 2025-10-31 10:15:01 -07:00
parent 0ec4e94f05
commit e19979ae29
2 changed files with 18 additions and 2 deletions

View file

@ -30,10 +30,16 @@ jobs:
- name: Build a single provider - name: Build a single provider
run: | run: |
BUILD_ARGS="--build-arg INSTALL_MODE=editable --build-arg DISTRO_NAME=starter"
if [ -n "${UV_EXTRA_INDEX_URL:-}" ]; then
BUILD_ARGS="$BUILD_ARGS --build-arg UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL"
fi
if [ -n "${UV_INDEX_STRATEGY:-}" ]; then
BUILD_ARGS="$BUILD_ARGS --build-arg UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY"
fi
docker build . \ docker build . \
-f containers/Containerfile \ -f containers/Containerfile \
--build-arg INSTALL_MODE=editable \ $BUILD_ARGS \
--build-arg DISTRO_NAME=starter \
--tag llama-stack:starter-ci --tag llama-stack:starter-ci
- name: Run installer end-to-end - name: Run installer end-to-end

View file

@ -215,6 +215,16 @@ build_image() {
--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