-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
build: embed image provenance metadata in vLLM containers #40653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vllm-bot
merged 6 commits into
vllm-project:main
from
alec-flowers:aflowers/vllm-image-provenance
Apr 29, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e129486
build: embed image provenance metadata
alec-flowers 96bc375
build: fix release image metadata refs
alec-flowers 80560a7
build: centralize release image ref metadata
alec-flowers dfd56e4
build: simplify image metadata helper
alec-flowers fc16402
build: drop staging image ref metadata
alec-flowers 38d88b9
build: clarify image tag provenance metadata
alec-flowers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #!/bin/bash | ||
| # Emit docker build flags for release image provenance metadata. | ||
| # Keep this helper best-effort: missing Buildkite metadata should fall back to | ||
| # local/default values instead of blocking the Docker build. | ||
|
|
||
| # Variant examples: "", "cu129", "ubuntu2404", "cu129-ubuntu2404". | ||
| variant="${1:-}" | ||
| variant_suffix="${variant:+-${variant}}" | ||
|
|
||
| image_name="${VLLM_DOCKER_IMAGE_NAME:-vllm/vllm-openai}" | ||
| staging_repo="${VLLM_STAGING_IMAGE_REPO:-public.ecr.aws/q9t5s3a7/vllm-release-repo}" | ||
| build_commit="${VLLM_BUILD_COMMIT:-${BUILDKITE_COMMIT:-unknown}}" | ||
| build_pipeline="${VLLM_BUILD_PIPELINE:-${BUILDKITE_PIPELINE_ID:-${BUILDKITE_PIPELINE_SLUG:-local}}}" | ||
| build_url="${VLLM_BUILD_URL:-${BUILDKITE_BUILD_URL:-}}" | ||
| tag_commit="${BUILDKITE_COMMIT:-${build_commit}}" | ||
|
|
||
| if [[ -n "${BUILDKITE:-}" || -n "${BUILDKITE_COMMIT:-}" ]]; then | ||
| release_version="${RELEASE_VERSION:-}" | ||
| if command -v buildkite-agent >/dev/null 2>&1; then | ||
| release_version="${release_version:-$(buildkite-agent meta-data get release-version 2>/dev/null)}" | ||
| fi | ||
| release_version="${release_version#v}" | ||
| release_version="${release_version:-${tag_commit}}" | ||
|
|
||
| staging_image_ref="${staging_repo}:${tag_commit}-$(uname -m)${variant_suffix}" | ||
|
|
||
| if [[ "${NIGHTLY:-}" == "1" ]]; then | ||
| if [[ -z "${variant}" ]]; then | ||
| image_tag="${image_name}:nightly-${tag_commit}" | ||
| elif [[ "${variant}" == cu* ]]; then | ||
| cuda_variant="${variant%%-*}" | ||
| remaining_variant="${variant#${cuda_variant}}" | ||
| image_tag="${image_name}:${cuda_variant}-nightly-${tag_commit}${remaining_variant}" | ||
| else | ||
| image_tag="${image_name}:nightly-${tag_commit}${variant_suffix}" | ||
| fi | ||
| else | ||
| image_tag="${image_name}:v${release_version}${variant_suffix}" | ||
| fi | ||
| else | ||
| image_tag="${VLLM_IMAGE_TAG:-local/vllm-openai:dev}" | ||
| staging_image_ref="${image_tag}" | ||
| fi | ||
|
|
||
| emit_arg() { | ||
| printf -- "--build-arg %s=%s " "$1" "$2" | ||
| } | ||
|
|
||
| emit_arg VLLM_BUILD_COMMIT "${build_commit}" | ||
| emit_arg VLLM_BUILD_PIPELINE "${build_pipeline}" | ||
| emit_arg VLLM_BUILD_URL "${build_url}" | ||
| # This is the intended public tag. The final digest is only known after push. | ||
| emit_arg VLLM_IMAGE_TAG "${image_tag}" | ||
| printf -- "--tag %s " "${staging_image_ref}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| group: Docker | ||
| depends_on: | ||
| - image-build-cpu | ||
| steps: | ||
| - label: Docker Build Metadata | ||
| timeout_in_minutes: 10 | ||
| device: cpu-small | ||
| source_file_dependencies: | ||
| - .buildkite/release-pipeline.yaml | ||
| - .buildkite/scripts/docker-build-metadata-args.sh | ||
| - docker/Dockerfile | ||
| - docker/Dockerfile.cpu | ||
| - docker/docker-bake.hcl | ||
| - tests/tools/test_docker_build_metadata_args.py | ||
| commands: | ||
| - pytest -v -s tools/test_docker_build_metadata_args.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.