diff --git a/.github/workflows/build-gpu-image.yml b/.github/workflows/build-gpu-image.yml index 1eff3a884..7d952c6a7 100644 --- a/.github/workflows/build-gpu-image.yml +++ b/.github/workflows/build-gpu-image.yml @@ -71,6 +71,7 @@ jobs: env: SKY_INFRA: k8s/cks-wb3 + BUILD_CLUSTER_NAME: art-gpu-build-${{ github.run_id }}-${{ github.run_attempt }} PREWARM_INFRAS: ${{ inputs.prewarm_infras || 'k8s/cks-wb3 k8s/ext-collab2 k8s/serverless-training-central' }} steps: @@ -196,6 +197,7 @@ jobs: PREWARM_TIMEOUT="${PREWARM_TIMEOUT:-30m}" args=( + --cluster-name "${BUILD_CLUSTER_NAME}" --infra "${SKY_INFRA}" --image-repo "${IMAGE_REPO}" --pull-image-repo "${PULL_IMAGE_REPO}" @@ -217,6 +219,12 @@ jobs: bash scripts/build-gpu-image.sh "${args[@]}" + - name: Remove temporary image builder + if: ${{ always() }} + run: | + kubectl --context cks-wb3 delete pod -n default "${BUILD_CLUSTER_NAME}" \ + --ignore-not-found --wait=false + - name: Smoke launch prewarmed image if: ${{ github.event_name != 'workflow_dispatch' || inputs.smoke_launch }} env: diff --git a/scripts/build-gpu-image.sh b/scripts/build-gpu-image.sh index 2c5ccff62..4e8d78949 100755 --- a/scripts/build-gpu-image.sh +++ b/scripts/build-gpu-image.sh @@ -799,7 +799,7 @@ wait_for_mutable_tag_convergence() { clear_mutable_tag="${prewarm_clear_mutable_tag}" fi pod="${pod_base}-${attempt}" - delete_pods_without_wait "${pod}" + delete_pods_best_effort "${pod}" "${kubectl_cmd[@]}" apply -n "${prewarm_namespace}" -f - <