Skip to content

Commit e604a4d

Browse files
authored
Migrate gsutil usage to gcloud storage (#4341)
1 parent 23af537 commit e604a4d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

notebooks/community/ml_ops/stage6/get_started_with_cpr.ipynb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,7 @@
483483
},
484484
"outputs": [],
485485
"source": [
486-
"! gsutil mb -l $REGION $BUCKET_URI"
487-
]
486+
"! gcloud storage buckets create --location=$REGION $BUCKET_URI" ]
488487
},
489488
{
490489
"cell_type": "markdown",
@@ -503,8 +502,7 @@
503502
},
504503
"outputs": [],
505504
"source": [
506-
"! gsutil ls -al $BUCKET_URI"
507-
]
505+
"! gcloud storage ls --all-versions --long $BUCKET_URI" ]
508506
},
509507
{
510508
"cell_type": "markdown",
@@ -669,9 +667,7 @@
669667
},
670668
"outputs": [],
671669
"source": [
672-
"! gsutil cp model/* {BUCKET_URI}/model/\n",
673-
"! gsutil ls {BUCKET_URI}/model/"
674-
]
670+
"! gcloud storage cp model/* {BUCKET_URI}/model/\n", "! gcloud storage ls {BUCKET_URI}/model/" ]
675671
},
676672
{
677673
"cell_type": "markdown",
@@ -2603,8 +2599,7 @@
26032599
"delete_bucket = False\n",
26042600
"\n",
26052601
"if delete_bucket or os.getenv(\"IS_TESTING\"):\n",
2606-
" ! gsutil rm -rf {BUCKET_URI}\n",
2607-
"\n",
2602+
" ! gcloud storage rm --recursive --continue-on-error {BUCKET_URI}\n", "\n",
26082603
"! rm -rf src model instances.json instances.csv Dockerfile"
26092604
]
26102605
}

0 commit comments

Comments
 (0)