From 2b94595705865daeb4bb1809d27cd8fcc44c70be Mon Sep 17 00:00:00 2001 From: Abhishek Bhagwat Date: Wed, 30 Oct 2024 15:21:19 +0000 Subject: [PATCH] fix: remove local dockerfile build and update to pull from ghcr --- .../claude/computer-use-demo/cloudbuild.yaml | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/partner-models/claude/computer-use-demo/cloudbuild.yaml b/partner-models/claude/computer-use-demo/cloudbuild.yaml index eeeb8e5ee8f..1b62506a0a2 100644 --- a/partner-models/claude/computer-use-demo/cloudbuild.yaml +++ b/partner-models/claude/computer-use-demo/cloudbuild.yaml @@ -37,18 +37,26 @@ steps: --quiet fi - - id: "build-push-image" + - id: "pull-tag-push-image" name: "gcr.io/cloud-builders/docker" waitFor: ["setup-artifact-registry"] + entrypoint: "bash" args: - - "build" - - "-t" - - "${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_ARTIFACT_REGISTRY_ID}/${_IMAGE_NAME}:${_IMAGE_TAG}" - - "." + - "-c" + - | + # Pull the prebuilt image + docker pull ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest + + # Tag for Artifact Registry + docker tag ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest \ + ${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_ARTIFACT_REGISTRY_ID}/${_IMAGE_NAME}:${_IMAGE_TAG} + + # Push to Artifact Registry + docker push ${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_ARTIFACT_REGISTRY_ID}/${_IMAGE_NAME}:${_IMAGE_TAG} - id: "setup-k8s-iam" name: "gcr.io/google.com/cloudsdktool/cloud-sdk" - waitFor: ["build-push-image"] + waitFor: ["pull-tag-push-image"] entrypoint: "bash" args: - "-c"