Skip to content

Commit 682761f

Browse files
Merge pull request #39 from bhandarivijay-png/ai-gsutil-migration-b2f2daf91b2145a49af1eebaed6d1fc9
Changes for 4329
2 parents d38ac1c + 25c3780 commit 682761f

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

notebooks/community/ml_ops/stage3/get_started_with_hpt_pipeline_components.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,8 @@
529529
},
530530
"outputs": [],
531531
"source": [
532-
"# Note: Migrating scripts using gsutil iam ch is more complex than get or set. You need to replace the single iam ch command with a series of gcloud storage bucket add-iam-policy-binding and/or gcloud storage bucket remove-iam-policy-binding commands, or replicate the read-modify-write loop.\n",
532+
533533
"! gcloud storage buckets add-iam-policy-binding $BUCKET_URI --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.objectCreator\n", "\n",
534-
# Note: Migrating scripts using gsutil iam ch is more complex than get or set. You need to replace the single iam ch command with a series of gcloud storage bucket add-iam-policy-binding and/or gcloud storage bucket remove-iam-policy-binding commands, or replicate the read-modify-write loop.
535-
# Note: Conditions: gsutil iam ch does not support modifying IAM policies that contain conditions. gcloud storage commands do support conditions.
536-
# Note: File Argument Order: In gsutil iam set, the policy file comes before the URLs. In gcloud storage bucket set-iam-policy, the policy file comes after the URL.
537534
"! gcloud storage buckets add-iam-policy-binding $BUCKET_URI --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.objectViewer" ]
538535
},
539536
{

notebooks/community/model_garden/model_garden_pytorch_detectron2.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@
203203
" BUCKET_NAME = \"/\".join(BUCKET_URI.split(\"/\")[:3])\n",
204204
" ! gcloud storage buckets create --location={REGION} {BUCKET_URI}\n", "else:\n",
205205
" assert BUCKET_URI.startswith(\"gs://\"), \"BUCKET_URI must start with `gs://`.\"\n",
206-
"# Note: -L (Full Listing) Output: The format of the full listing output is different. gcloud storage uses a title case for keys and will not display a field if its value is \"None\".\n",
207206
" shell_output = ! gcloud storage ls --full --buckets {BUCKET_NAME} | grep \"Location constraint:\" | sed \"s/Location constraint://\"\n", " bucket_region = shell_output[0].strip().lower()\n",
208207
" if bucket_region != REGION:\n",
209208
" raise ValueError(\n",

notebooks/community/model_garden/model_garden_pytorch_llama3_3_finetuning.ipynb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@
187187
" BUCKET_NAME = \"/\".join(BUCKET_URI.split(\"/\")[:3])\n",
188188
" ! gcloud storage buckets create --location={REGION} {BUCKET_URI}\n", "else:\n",
189189
" assert BUCKET_URI.startswith(\"gs://\"), \"BUCKET_URI must start with `gs://`.\"\n",
190-
# Note: The format of the full listing output is different. gcloud storage uses a title case for keys and will not display a field if its value is "None".
191190
" shell_output = ! gcloud storage ls --full --buckets {BUCKET_NAME} | grep \"Location constraint:\" | sed \"s/Location constraint://\"\n", " bucket_region = shell_output[0].strip().lower()\n",
192191
" if bucket_region != REGION:\n",
193192
" raise ValueError(\n",
@@ -212,7 +211,6 @@
212211
"\n",
213212
"\n",
214213
"# Provision permissions to the SERVICE_ACCOUNT with the GCS bucket\n",
215-
"# Note: Migrating scripts using gsutil iam ch is more complex than get or set. You need to replace the single iam ch command with a series of gcloud storage bucket add-iam-policy-binding and/or gcloud storage bucket remove-iam-policy-binding commands, or replicate the read-modify-write loop.\n",
216214
"! gcloud storage buckets add-iam-policy-binding $BUCKET_NAME --member=\"serviceAccount:{SERVICE_ACCOUNT}\" --role=\"roles/storage.admin\"\n", "\n",
217215
"! gcloud config set project $PROJECT_ID\n",
218216
"! gcloud projects add-iam-policy-binding --no-user-output-enabled {PROJECT_ID} --member=serviceAccount:{SERVICE_ACCOUNT} --role=\"roles/storage.admin\"\n",

0 commit comments

Comments
 (0)