-
-
Notifications
You must be signed in to change notification settings - Fork 17k
[ROCm] [Nightly Docker Release] nightly rocm docker #34756
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
Changes from 2 commits
c194db4
0fee22f
5da10c9
51b1f66
44f12d4
1e7eacc
c64df63
99b927c
bc71e30
eff56a4
9811b0c
4980412
a2f9569
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/bin/bash | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # SPDX-FileCopyrightText: Copyright contributors to the vLLM project | ||
| # | ||
| # Push ROCm nightly image from ECR to Docker Hub as vllm/vllm-openai-rocm:nightly | ||
| # and vllm/vllm-openai-rocm:nightly-<commit>. | ||
| # Run when NIGHTLY=1 after build-rocm-release-image has pushed to ECR. | ||
| # | ||
| # Local testing (no push to Docker Hub): | ||
| # BUILDKITE_COMMIT=<commit-with-rocm-image-in-ecr> DRY_RUN=1 bash .buildkite/scripts/push-nightly-builds-rocm.sh | ||
| # Requires: AWS CLI configured (for ECR public login), Docker. For full run: Docker Hub login. | ||
|
|
||
| set -ex | ||
|
|
||
| # Use BUILDKITE_COMMIT from env (required; set to a commit that has ROCm image in ECR for local test) | ||
| BUILDKITE_COMMIT="${BUILDKITE_COMMIT:?Set BUILDKITE_COMMIT to the commit SHA that has the ROCm image in ECR (e.g. from a previous release pipeline run)}" | ||
| DRY_RUN="${DRY_RUN:-0}" | ||
|
|
||
| ORIG_TAG="${BUILDKITE_COMMIT}-rocm" | ||
| TAG_NAME="nightly" | ||
| TAG_NAME_COMMIT="nightly-${BUILDKITE_COMMIT}" | ||
|
|
||
| echo "Pushing ROCm image from ECR tag $ORIG_TAG to Docker Hub as $TAG_NAME and $TAG_NAME_COMMIT" | ||
| [[ "$DRY_RUN" == "1" ]] && echo "[DRY_RUN] Skipping push to Docker Hub" | ||
|
|
||
| # Login to ECR and pull the image built by build-rocm-release-image | ||
| aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7 | ||
| docker pull public.ecr.aws/q9t5s3a7/vllm-release-repo:"$ORIG_TAG" | ||
|
|
||
| # Tag for Docker Hub (nightly and nightly-<commit>) | ||
| docker tag public.ecr.aws/q9t5s3a7/vllm-release-repo:"$ORIG_TAG" vllm/vllm-openai-rocm:"$TAG_NAME" | ||
| docker tag public.ecr.aws/q9t5s3a7/vllm-release-repo:"$ORIG_TAG" vllm/vllm-openai-rocm:"$TAG_NAME_COMMIT" | ||
|
|
||
| if [[ "$DRY_RUN" == "1" ]]; then | ||
| echo "[DRY_RUN] Would push vllm/vllm-openai-rocm:$TAG_NAME and vllm/vllm-openai-rocm:$TAG_NAME_COMMIT" | ||
| echo "[DRY_RUN] Local tags created. Exiting without push." | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Push to Docker Hub (docker-login plugin runs before this step in CI) | ||
| docker push vllm/vllm-openai-rocm:"$TAG_NAME" | ||
| docker push vllm/vllm-openai-rocm:"$TAG_NAME_COMMIT" | ||
|
|
||
| echo "Pushed vllm/vllm-openai-rocm:$TAG_NAME and vllm/vllm-openai-rocm:$TAG_NAME_COMMIT" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For better maintainability and to avoid hardcoding values, the Docker repository name should be passed as an argument to this script instead of being hardcoded. This makes the script more reusable and configurable. This change is similar to how This suggestion refactors the script to accept the repository name as the first argument and updates the documentation comments accordingly. You will also need to update the call to this script in # Push ROCm nightly image from ECR to a specified Docker Hub repository.
# e.g. vllm/vllm-openai-rocm:nightly and vllm/vllm-openai-rocm:nightly-<commit>.
# Run when NIGHTLY=1 after build-rocm-release-image has pushed to ECR.
#
# Local testing (no push to Docker Hub):
# BUILDKITE_COMMIT=<commit-with-rocm-image-in-ecr> DRY_RUN=1 bash .buildkite/scripts/push-nightly-builds-rocm.sh <repo-name>
# Requires: AWS CLI configured (for ECR public login), Docker. For full run: Docker Hub login.
set -ex
# Use BUILDKITE_COMMIT from env (required; set to a commit that has ROCm image in ECR for local test)
BUILDKITE_COMMIT="${BUILDKITE_COMMIT:?Set BUILDKITE_COMMIT to the commit SHA that has the ROCm image in ECR (e.g. from a previous release pipeline run)}"
DRY_RUN="${DRY_RUN:-0}"
REPO="${1:?Please provide the Docker repository name as the first argument}"
ORIG_TAG="${BUILDKITE_COMMIT}-rocm"
TAG_NAME="nightly"
TAG_NAME_COMMIT="nightly-${BUILDKITE_COMMIT}"
echo "Pushing ROCm image from ECR tag $ORIG_TAG to Docker Hub as ${REPO}:${TAG_NAME} and ${REPO}:${TAG_NAME_COMMIT}"
[[ "$DRY_RUN" == "1" ]] && echo "[DRY_RUN] Skipping push to Docker Hub"
# Login to ECR and pull the image built by build-rocm-release-image
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7
docker pull public.ecr.aws/q9t5s3a7/vllm-release-repo:"$ORIG_TAG"
# Tag for Docker Hub (nightly and nightly-<commit>)
docker tag public.ecr.aws/q9t5s3a7/vllm-release-repo:"$ORIG_TAG" "${REPO}:${TAG_NAME}"
docker tag public.ecr.aws/q9t5s3a7/vllm-release-repo:"$ORIG_TAG" "${REPO}:${TAG_NAME_COMMIT}"
if [[ "$DRY_RUN" == "1" ]]; then
echo "[DRY_RUN] Would push ${REPO}:${TAG_NAME} and ${REPO}:${TAG_NAME_COMMIT}"
echo "[DRY_RUN] Local tags created. Exiting without push."
exit 0
fi
# Push to Docker Hub (docker-login plugin runs before this step in CI)
docker push "${REPO}:${TAG_NAME}"
docker push "${REPO}:${TAG_NAME_COMMIT}"
echo "Pushed ${REPO}:${TAG_NAME} and ${REPO}:${TAG_NAME_COMMIT}" |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability, it's better to define the ROCm nightly repository name as an environment variable and pass it to the scripts. This avoids hardcoding the same string in multiple places and makes it easier to update in the future. This change is required to work with the suggested changes in
push-nightly-builds-rocm.sh.