Skip to content

Commit 0818229

Browse files
removed changes for model garden
1 parent b703435 commit 0818229

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

notebooks/community/model_garden/model_garden_timesfm_2_0_deployment_on_vertex.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@
162162
"if BUCKET_URI is None or BUCKET_URI.strip() == \"\" or BUCKET_URI == \"gs://\":\n",
163163
" BUCKET_URI = f\"gs://{PROJECT_ID}-tmp-{now}-{str(uuid.uuid4())[:4]}\"\n",
164164
" BUCKET_NAME = \"/\".join(BUCKET_URI.split(\"/\")[:3])\n",
165-
" ! gcloud storage buckets create --location {REGION} {BUCKET_URI}\n",
165+
" ! gsutil mb -l {REGION} {BUCKET_URI}\n",
166166
"else:\n",
167167
" assert BUCKET_URI.startswith(\"gs://\"), \"BUCKET_URI must start with `gs://`.\"\n",
168-
" shell_output = ! gcloud storage ls --full --buckets {BUCKET_NAME} | grep \"Location Constraint:\" | sed \"s/Location Constraint://\"\n",
168+
" shell_output = ! gsutil ls -Lb {BUCKET_NAME} | grep \"Location constraint:\" | sed \"s/Location constraint://\"\n",
169169
" bucket_region = shell_output[0].strip().lower()\n",
170170
" if bucket_region != REGION:\n",
171171
" raise ValueError(\n",
@@ -190,7 +190,7 @@
190190
"\n",
191191
"\n",
192192
"# Provision permissions to the SERVICE_ACCOUNT with the GCS bucket\n",
193-
"! gcloud storage buckets add-iam-policy-binding $BUCKET_NAME --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.admin\n",
193+
"! gsutil iam ch serviceAccount:{SERVICE_ACCOUNT}:roles/storage.admin $BUCKET_NAME\n",
194194
"\n",
195195
"! gcloud config set project $PROJECT_ID\n",
196196
"! gcloud projects add-iam-policy-binding --no-user-output-enabled {PROJECT_ID} --member=serviceAccount:{SERVICE_ACCOUNT} --role=\"roles/storage.admin\"\n",
@@ -911,7 +911,7 @@
911911
"\n",
912912
"delete_bucket = False # @param {type:\"boolean\"}\n",
913913
"if delete_bucket:\n",
914-
" ! gcloud storage rm --recursive $BUCKET_NAME"
914+
" ! gsutil -m rm -r $BUCKET_NAME"
915915
]
916916
}
917917
],

0 commit comments

Comments
 (0)