mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
fix: pass UV env vars as build args in providers-build workflow
The docker build commands were not passing UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY as --build-arg, even though they were set in the environment. Build args must be explicitly passed to docker build.
This commit is contained in:
parent
58fe7d7b59
commit
0ec4e94f05
1 changed files with 28 additions and 10 deletions
38
.github/workflows/providers-build.yml
vendored
38
.github/workflows/providers-build.yml
vendored
|
|
@ -72,10 +72,16 @@ jobs:
|
||||||
- name: Build container image
|
- name: Build container image
|
||||||
if: matrix.image-type == 'container'
|
if: matrix.image-type == 'container'
|
||||||
run: |
|
run: |
|
||||||
|
BUILD_ARGS="--build-arg INSTALL_MODE=editable --build-arg DISTRO_NAME=${{ matrix.distro }}"
|
||||||
|
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=${{ matrix.distro }} \
|
|
||||||
--tag llama-stack:${{ matrix.distro }}-ci
|
--tag llama-stack:${{ matrix.distro }}-ci
|
||||||
|
|
||||||
- name: Print dependencies in the image
|
- name: Print dependencies in the image
|
||||||
|
|
@ -108,12 +114,18 @@ jobs:
|
||||||
- name: Build container image
|
- name: Build container image
|
||||||
run: |
|
run: |
|
||||||
BASE_IMAGE=$(yq -r '.distribution_spec.container_image // "python:3.12-slim"' llama_stack/distributions/ci-tests/build.yaml)
|
BASE_IMAGE=$(yq -r '.distribution_spec.container_image // "python:3.12-slim"' llama_stack/distributions/ci-tests/build.yaml)
|
||||||
|
BUILD_ARGS="--build-arg INSTALL_MODE=editable --build-arg DISTRO_NAME=ci-tests"
|
||||||
|
BUILD_ARGS="$BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE"
|
||||||
|
BUILD_ARGS="$BUILD_ARGS --build-arg RUN_CONFIG_PATH=/workspace/llama_stack/distributions/ci-tests/run.yaml"
|
||||||
|
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=ci-tests \
|
|
||||||
--build-arg BASE_IMAGE="$BASE_IMAGE" \
|
|
||||||
--build-arg RUN_CONFIG_PATH=/workspace/llama_stack/distributions/ci-tests/run.yaml \
|
|
||||||
-t llama-stack:ci-tests
|
-t llama-stack:ci-tests
|
||||||
|
|
||||||
- name: Inspect the container image entrypoint
|
- name: Inspect the container image entrypoint
|
||||||
|
|
@ -148,12 +160,18 @@ jobs:
|
||||||
- name: Build UBI9 container image
|
- name: Build UBI9 container image
|
||||||
run: |
|
run: |
|
||||||
BASE_IMAGE=$(yq -r '.distribution_spec.container_image // "registry.access.redhat.com/ubi9:latest"' llama_stack/distributions/ci-tests/build.yaml)
|
BASE_IMAGE=$(yq -r '.distribution_spec.container_image // "registry.access.redhat.com/ubi9:latest"' llama_stack/distributions/ci-tests/build.yaml)
|
||||||
|
BUILD_ARGS="--build-arg INSTALL_MODE=editable --build-arg DISTRO_NAME=ci-tests"
|
||||||
|
BUILD_ARGS="$BUILD_ARGS --build-arg BASE_IMAGE=$BASE_IMAGE"
|
||||||
|
BUILD_ARGS="$BUILD_ARGS --build-arg RUN_CONFIG_PATH=/workspace/llama_stack/distributions/ci-tests/run.yaml"
|
||||||
|
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=ci-tests \
|
|
||||||
--build-arg BASE_IMAGE="$BASE_IMAGE" \
|
|
||||||
--build-arg RUN_CONFIG_PATH=/workspace/llama_stack/distributions/ci-tests/run.yaml \
|
|
||||||
-t llama-stack:ci-tests-ubi9
|
-t llama-stack:ci-tests-ubi9
|
||||||
|
|
||||||
- name: Inspect UBI9 image
|
- name: Inspect UBI9 image
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue