Skip to content

Commit 456a78e

Browse files
committed
Validates that that image exists for commit
Otherwise, falls back to building image and wheel. Signed-off-by: dougbtv <[email protected]>
1 parent 2191a18 commit 456a78e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

buildkite/bootstrap.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,17 @@ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
191191
LCA_COMMIT=$(git merge-base origin/main HEAD)
192192
fi
193193
if [[ -n "$LCA_COMMIT" ]]; then
194-
DOCKER_IMAGE_OVERRIDE="public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:$LCA_COMMIT"
195-
echo "Using Docker image for LCA commit: $DOCKER_IMAGE_OVERRIDE"
194+
IMAGE_TAG="public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:$LCA_COMMIT"
195+
# Check if the image exists on the registry
196+
if docker manifest inspect "$IMAGE_TAG" >/dev/null 2>&1; then
197+
DOCKER_IMAGE_OVERRIDE="$IMAGE_TAG"
198+
echo "Using Docker image for LCA commit: $DOCKER_IMAGE_OVERRIDE"
199+
else
200+
DOCKER_IMAGE_OVERRIDE="public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:latest"
201+
echo "LCA image not found, falling back to build image"
202+
SKIP_IMAGE_BUILD=0
203+
VLLM_USE_PRECOMPILED=0
204+
fi
196205
else
197206
DOCKER_IMAGE_OVERRIDE="public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo:latest"
198207
echo "Could not determine LCA commit, using latest Docker image: $DOCKER_IMAGE_OVERRIDE"

0 commit comments

Comments
 (0)