Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
815 B
Bash
Executable File
34 lines
815 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
if [[ $# -lt 3 ]]; then
|
|
echo "Usage: $0 <registry> <repo> <commit>"
|
|
exit 1
|
|
fi
|
|
|
|
REGISTRY=$1
|
|
REPO=$2
|
|
BUILDKITE_COMMIT=$3
|
|
IMAGE="$REGISTRY/$REPO:$BUILDKITE_COMMIT-arm64-cpu"
|
|
|
|
# authenticate with AWS ECR
|
|
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin "$REGISTRY" || true
|
|
|
|
# skip build if image already exists
|
|
if docker manifest inspect "$IMAGE" >/dev/null 2>&1; then
|
|
echo "Image found"
|
|
else
|
|
echo "Image not found, proceeding with build..."
|
|
# build
|
|
docker build --file docker/Dockerfile.cpu \
|
|
--build-arg max_jobs=16 \
|
|
--build-arg buildkite_commit="$BUILDKITE_COMMIT" \
|
|
--tag "$IMAGE" \
|
|
--target vllm-test \
|
|
--progress plain .
|
|
# push
|
|
docker push "$IMAGE"
|
|
fi
|
|
|
|
.buildkite/scripts/annotate-image-build.sh "$IMAGE"
|