这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions notebooks/community/ml_ops/stage6/get_started_with_cpr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION $BUCKET_URI"
]
"! gcloud storage buckets create --location=$REGION $BUCKET_URI" ]
},
{
"cell_type": "markdown",
Expand All @@ -503,8 +502,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_URI"
]
"! gcloud storage ls --all-versions --long $BUCKET_URI" ]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -669,9 +667,7 @@
},
"outputs": [],
"source": [
"! gsutil cp model/* {BUCKET_URI}/model/\n",
"! gsutil ls {BUCKET_URI}/model/"
]
"! gcloud storage cp model/* {BUCKET_URI}/model/\n", "! gcloud storage ls {BUCKET_URI}/model/" ]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -2603,8 +2599,7 @@
"delete_bucket = False\n",
"\n",
"if delete_bucket or os.getenv(\"IS_TESTING\"):\n",
" ! gsutil rm -rf {BUCKET_URI}\n",
"\n",
" ! gcloud storage rm --recursive --continue-on-error {BUCKET_URI}\n", "\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The gcloud storage rm --recursive command is not the correct equivalent for gsutil rm -r when deleting all objects in a bucket. To delete all objects within the bucket without deleting the bucket itself, you must append a /** wildcard to the bucket URI. Without this, the command will attempt to delete the bucket object, which will fail if the bucket is not empty.

See the migration guide for more details.

    ! gcloud storage rm --recursive --continue-on-error {BUCKET_URI}/**\n

"! rm -rf src model instances.json instances.csv Dockerfile"
]
}
Expand Down
Loading