diff --git a/notebooks/community/generative_ai/bq_dataframes_llm_code_generation.ipynb b/notebooks/community/generative_ai/bq_dataframes_llm_code_generation.ipynb index e5a9f1729..71e5babd8 100644 --- a/notebooks/community/generative_ai/bq_dataframes_llm_code_generation.ipynb +++ b/notebooks/community/generative_ai/bq_dataframes_llm_code_generation.ipynb @@ -761,7 +761,7 @@ "\n", "BUCKET_ID = \"code-samples-\" + str(uuid.uuid1())\n", "\n", - "!gsutil mb gs://{BUCKET_ID}" + "!gcloud storage buckets create gs://{BUCKET_ID}" ] }, { @@ -874,7 +874,7 @@ "outputs": [], "source": [ "# # Delete the Google Cloud Storage bucket and files\n", - "# ! gsutil rm -r gs://{BUCKET_ID}\n", + "# ! gcloud storage rm --recursive gs://{BUCKET_ID}\n", "# print(f\"Deleted bucket '{BUCKET_ID}'.\")" ] } diff --git a/notebooks/official/datasets/get_started_with_data_labeling.ipynb b/notebooks/official/datasets/get_started_with_data_labeling.ipynb index 9de4a780d..d2846e3c4 100644 --- a/notebooks/official/datasets/get_started_with_data_labeling.ipynb +++ b/notebooks/official/datasets/get_started_with_data_labeling.ipynb @@ -381,7 +381,7 @@ }, "outputs": [], "source": [ - "! gsutil mb -l $REGION $BUCKET_URI" + "! gcloud storage buckets create --location=$REGION $BUCKET_URI" ] }, { @@ -584,7 +584,7 @@ "print(IMPORT_FILE)\n", "\n", "# printing content of uploaded file\n", - "! gsutil cat $IMPORT_FILE" + "! gcloud storage cat $IMPORT_FILE" ] }, { @@ -707,7 +707,7 @@ "outputs": [], "source": [ "# create placeholder file for instructions for data labeling\n", - "! echo \"this is instruction\" >> instruction.txt | gsutil cp instruction.txt $BUCKET_URI" + "! echo \"this is instruction\" >> instruction.txt | gcloud storage cp instruction.txt $BUCKET_URI" ] }, { @@ -864,7 +864,7 @@ "\n", "# Delete the bucket created\n", "if delete_bucket or os.getenv(\"IS_TESTING\"):\n", - " ! gsutil rm -r $BUCKET_URI" + " ! gcloud storage rm --recursive $BUCKET_URI" ] } ], diff --git a/notebooks/official/explainable_ai/sdk_automl_tabular_classification_online_explain.ipynb b/notebooks/official/explainable_ai/sdk_automl_tabular_classification_online_explain.ipynb index f5baf5f23..e758c113d 100644 --- a/notebooks/official/explainable_ai/sdk_automl_tabular_classification_online_explain.ipynb +++ b/notebooks/official/explainable_ai/sdk_automl_tabular_classification_online_explain.ipynb @@ -291,7 +291,7 @@ }, "outputs": [], "source": [ - "! gsutil mb -l {LOCATION} -p {PROJECT_ID} {BUCKET_URI}" + "! gcloud storage buckets create --location {LOCATION} --project {PROJECT_ID} {BUCKET_URI}" ] }, { @@ -372,13 +372,13 @@ }, "outputs": [], "source": [ - "count = ! gsutil cat $IMPORT_FILE | wc -l\n", + "count = ! gcloud storage cat $IMPORT_FILE | wc -l\n", "print(\"Number of Examples\", int(count[0]))\n", "\n", "print(\"First 10 rows\")\n", - "! gsutil cat $IMPORT_FILE | head\n", + "! gcloud storage cat $IMPORT_FILE | head\n", "\n", - "heading = ! gsutil cat $IMPORT_FILE | head -n1\n", + "heading = ! gcloud storage cat $IMPORT_FILE | head -n1\n", "label_column = str(heading).split(\",\")[-1].split(\"'\")[0]\n", "print(\"Label Column Name\", label_column)\n", "if label_column is None:\n", @@ -840,7 +840,7 @@ "# Delete the Cloud Storage bucket\n", "delete_bucket = False # set True for deletion\n", "if delete_bucket:\n", - " ! gsutil rm -r $BUCKET_URI" + " ! gcloud storage rm --recursive $BUCKET_URI" ] } ], diff --git a/notebooks/official/prediction/get_started_with_dedicated_endpoint.ipynb b/notebooks/official/prediction/get_started_with_dedicated_endpoint.ipynb index 5f12b1618..95463bc4c 100644 --- a/notebooks/official/prediction/get_started_with_dedicated_endpoint.ipynb +++ b/notebooks/official/prediction/get_started_with_dedicated_endpoint.ipynb @@ -217,7 +217,7 @@ "source": [ "# Create GCS Bucket\n", "BUCKET_URI = \"gs://your-bucket-name-unique\" # @param {type:\"string\"}\n", - "! gsutil mb -l {LOCATION} -p {PROJECT_ID} {BUCKET_URI}" + "! gcloud storage buckets create --location={LOCATION} --project={PROJECT_ID} {BUCKET_URI}" ] }, { @@ -309,7 +309,7 @@ "IMAGE_URI = \"us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-12:latest\"\n", "\n", "# Copy Test Models to the Bucket\n", - "! gsutil -m cp -r \"gs://cloud-samples-data/vertex-ai/prediction/test-models-requests/tensorflow/*\" {ARTIFACT_URI}\n", + "! gcloud storage cp --recursive \"gs://cloud-samples-data/vertex-ai/prediction/test-models-requests/tensorflow/*\" {ARTIFACT_URI}\n", "\n", "model = aiplatform.Model.upload(\n", " display_name=DISPLAY_NAME,\n", @@ -786,7 +786,7 @@ }, "outputs": [], "source": [ - "! gsutil rm -r {BUCKET_URI}" + "! gcloud storage rm --recursive {BUCKET_URI}" ] }, { diff --git a/notebooks/official/tensorboard/tensorboard_custom_training_with_custom_container.ipynb b/notebooks/official/tensorboard/tensorboard_custom_training_with_custom_container.ipynb index 6f4823c5f..4e25193ac 100644 --- a/notebooks/official/tensorboard/tensorboard_custom_training_with_custom_container.ipynb +++ b/notebooks/official/tensorboard/tensorboard_custom_training_with_custom_container.ipynb @@ -347,7 +347,7 @@ }, "outputs": [], "source": [ - "! gsutil mb -l {LOCATION} -p {PROJECT_ID} {BUCKET_URI}" + "! gcloud storage buckets create --location {LOCATION} --project {PROJECT_ID} {BUCKET_URI}" ] }, { @@ -720,9 +720,9 @@ }, "outputs": [], "source": [ - "! gsutil iam ch serviceAccount:{SERVICE_ACCOUNT}:roles/storage.objectCreator $BUCKET_URI\n", + "! gcloud storage buckets add-iam-policy-binding $BUCKET_URI --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.objectCreator\n", "\n", - "! gsutil iam ch serviceAccount:{SERVICE_ACCOUNT}:roles/storage.objectViewer $BUCKET_URI" + "! gcloud storage buckets add-iam-policy-binding $BUCKET_URI --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.objectViewer" ] }, { @@ -840,7 +840,7 @@ "# Delete GCS bucket.\n", "delete_bucket = False\n", "if delete_bucket:\n", - " ! gsutil -m rm -r $BUCKET_URI" + " ! gcloud storage rm --recursive $BUCKET_URI" ] } ], diff --git a/notebooks/official/tensorboard/tensorboard_vertex_ai_pipelines_integration.ipynb b/notebooks/official/tensorboard/tensorboard_vertex_ai_pipelines_integration.ipynb index 6c2800621..58d10fb24 100644 --- a/notebooks/official/tensorboard/tensorboard_vertex_ai_pipelines_integration.ipynb +++ b/notebooks/official/tensorboard/tensorboard_vertex_ai_pipelines_integration.ipynb @@ -350,7 +350,7 @@ }, "outputs": [], "source": [ - "! gsutil mb -l {LOCATION} -p {PROJECT_ID} {BUCKET_URI}" + "! gcloud storage buckets create --location={LOCATION} --project={PROJECT_ID} {BUCKET_URI}" ] }, { @@ -846,7 +846,7 @@ "# Delete GCS bucket.\n", "delete_bucket = False # set True for deletion\n", "if delete_bucket:\n", - " ! gsutil -m rm -r {BUCKET_URI}" + " ! gcloud storage rm --recursive {BUCKET_URI}" ] } ], diff --git a/notebooks/official/workbench/ads_targetting/training-multi-class-classification-model-for-ads-targeting-usecase.ipynb b/notebooks/official/workbench/ads_targetting/training-multi-class-classification-model-for-ads-targeting-usecase.ipynb index 666f96d89..5ae6f0f2a 100644 --- a/notebooks/official/workbench/ads_targetting/training-multi-class-classification-model-for-ads-targeting-usecase.ipynb +++ b/notebooks/official/workbench/ads_targetting/training-multi-class-classification-model-for-ads-targeting-usecase.ipynb @@ -282,7 +282,7 @@ }, "outputs": [], "source": [ - "! gsutil mb -l $LOCATION -p $PROJECT_ID $BUCKET_URI" + "! gcloud storage buckets create --location=$LOCATION --project=$PROJECT_ID $BUCKET_URI" ] }, { @@ -840,7 +840,7 @@ "\n", "delete_bucket = False\n", "if delete_bucket:\n", - " ! gsutil -m rm -r $BUCKET_URI" + " ! gcloud storage rm --recursive $BUCKET_URI" ] } ],