Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/vision/instance_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@
"if not os.path.exists(model_ckpt_path):\n",
" os.mkdir(model_ckpt_path)\n",
"\n",
"!gsutil cp gs://tf_model_garden/vision/mobilenet/v2_1.0_float/ckpt-180648.data-00000-of-00001 './model_ckpt/'\n",
"!gsutil cp gs://tf_model_garden/vision/mobilenet/v2_1.0_float/ckpt-180648.index './model_ckpt/'"
"!gcloud storage cp gs://tf_model_garden/vision/mobilenet/v2_1.0_float/ckpt-180648.data-00000-of-00001 './model_ckpt/'\n",
"!gcloud storage cp gs://tf_model_garden/vision/mobilenet/v2_1.0_float/ckpt-180648.index './model_ckpt/'"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/vision/semantic_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@
"if not os.path.exists(model_ckpt_path):\n",
" os.mkdir(model_ckpt_path)\n",
"\n",
"!gsutil cp gs://tf_model_garden/cloud/vision-2.0/deeplab/deeplabv3_mobilenetv2_coco/best_ckpt-63.data-00000-of-00001 './model_ckpt/'\n",
"!gsutil cp gs://tf_model_garden/cloud/vision-2.0/deeplab/deeplabv3_mobilenetv2_coco/best_ckpt-63.index './model_ckpt/'"
"!gcloud storage cp gs://tf_model_garden/cloud/vision-2.0/deeplab/deeplabv3_mobilenetv2_coco/best_ckpt-63.data-00000-of-00001 './model_ckpt/'\n",
"!gcloud storage cp gs://tf_model_garden/cloud/vision-2.0/deeplab/deeplabv3_mobilenetv2_coco/best_ckpt-63.index './model_ckpt/'"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
" sandbox_path = web_path.split('/')[-1]\n",
" !rm -f {sandbox_path}\n",
" if web_path[:2] == \"gs\":\n",
" !gsutil cp {web_path} {sandbox_path}\n",
" !gcloud storage cp {web_path} {sandbox_path}\n",
" else:\n",
" !wget -v {web_path} --no-check-certificate\n",
" return sandbox_path\n"
Expand Down Expand Up @@ -122,7 +122,7 @@
},
"source": [
"MODEL_HOME='gs://tf_model_garden/models/edgetpu/checkpoint_and_tflite/vision/segmentation-edgetpu/tflite/default_argmax'\n",
"!gsutil ls {MODEL_HOME}"
"!gcloud storage ls {MODEL_HOME}"
],
"execution_count": null,
"outputs": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ def setup_logger_and_directories(input_dir):

input_directory = (input_dir).rstrip('/\\')
local_dir = os.path.basename(input_directory)
# A failed previous run can leave a file where gsutil needs a directory.
# A failed previous run can leave a file where gcloud needs a directory.
if os.path.isfile(local_dir):
os.remove(local_dir)
command = f'gsutil -m cp -r {input_directory} .'
command = f'gcloud storage cp --recursive {input_directory} .'
subprocess.run(command, shell=True, check=True)
prediction_folder = os.path.basename(input_directory) + '_prediction'
os.makedirs(prediction_folder, exist_ok=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def main(_) -> None:

# Copy the images folder from GCP to the present directory.
input_directory = (INPUT_DIRECTORY.value).rstrip("/\\")
command = f"gsutil -m cp -r {input_directory} ."
command = f"gcloud storage cp --recursive {input_directory} ."
subprocess.run(command, shell=True, check=True)

# Create a folder to store the predictions.
Expand Down Expand Up @@ -361,7 +361,7 @@ def main(_) -> None:

# Move the tracking visualization to the output directory.
commands = [
f"gsutil -m cp -r {output_folder} {OUTPUT_DIRECTORY.value}",
f"gcloud storage cp --recursive {output_folder} {OUTPUT_DIRECTORY.value}",
f"rm -r {output_folder}",
]
combined_command_1 = " && ".join(commands)
Expand All @@ -383,7 +383,7 @@ def main(_) -> None:

# Move the cropped objects to the output directory.
commands = [
f"gsutil -m cp -r {cropped_obj_folder} {OUTPUT_DIRECTORY.value}",
f"gcloud storage cp --recursive {cropped_obj_folder} {OUTPUT_DIRECTORY.value}",
f"rm -r {cropped_obj_folder}",
]

Expand Down Expand Up @@ -423,11 +423,11 @@ def main(_) -> None:
# Move the folders to the destination bucket.
commands = [
(
"gsutil -m cp -r"
"gcloud storage cp --recursive"
f" {os.path.basename(input_directory)} {OUTPUT_DIRECTORY.value}"
),
f"rm -r {os.path.basename(input_directory)}",
f"gsutil -m cp -r {prediction_folder} {OUTPUT_DIRECTORY.value}",
f"gcloud storage cp --recursive {prediction_folder} {OUTPUT_DIRECTORY.value}",
f"rm -r {prediction_folder}",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ echo ""
# ---

echo "✅ Step 4: Create GCS Buckets..."
gsutil mb \
-p "${PROJECT_ID}" \
-l "${REGION}" \
-c standard \
-b on "gs://${SOURCE_BUCKET_NAME}" \
gcloud storage buckets create \
--project "${PROJECT_ID}" \
--location "${REGION}" \
--default-storage-class standard \
--uniform-bucket-level-access "gs://${SOURCE_BUCKET_NAME}" \
|| echo "Source Bucket 'gs://${SOURCE_BUCKET_NAME}' already exists."
echo "GCS Buckets are ready."
echo ""
Expand Down Expand Up @@ -324,5 +324,5 @@ echo ""

echo "🚀🚀🚀 Deployment complete! 🚀🚀🚀"
echo "You can upload files to the source bucket to be processed in the next run:"
echo "gsutil cp your-local-image.jpg gs://${SOURCE_BUCKET_NAME}/"
echo "gcloud storage cp your-local-image.jpg gs://${SOURCE_BUCKET_NAME}/"
echo "Check the results in the bucket's subfolders."
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"source": [
"# # Connect to GCP bucket if your data is store there and copy them locally.\n",
"# !gcloud init\n",
"# gsutil -m cp -r gs://input ."
"# gcloud storage cp --recursive gs://input ."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion research/object_detection/dockerfiles/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN git clone --depth 1 https://github.com/tensorflow/models.git && \
mv models /tensorflow/models


# Install gcloud and gsutil commands
# Install gcloud commands
# https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
RUN apt-get -y update && apt-get install -y gpg-agent && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
Expand Down
2 changes: 1 addition & 1 deletion research/object_detection/dockerfiles/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The Oxford-IIIT Pets dataset, the COCO pre-trained SSD + MobileNet (v1)
checkpoint, and example
trained model are all available in `/tmp` in their respective folders.

This container also has the `gsutil` and `gcloud` utilities, the `bazel` build
This container also has the `gcloud` utilities, the `bazel` build
tool, and all dependencies necessary to use the Object Detection API, and
compile and install the TensorFlow Lite Android demo app.

Expand Down
2 changes: 1 addition & 1 deletion research/object_detection/dockerfiles/tf1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
python3-tk \
wget

# Install gcloud and gsutil commands
# Install gcloud commands
# https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
Expand Down
2 changes: 1 addition & 1 deletion research/object_detection/dockerfiles/tf2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
python3-tk \
wget

# Install gcloud and gsutil commands
# Install gcloud commands
# https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
Expand Down