-
Notifications
You must be signed in to change notification settings - Fork 228
Migrate gsutil usage to gcloud storage #4320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0dbc24a
b5c4ba8
ca74e1c
56dad72
926818f
57d6775
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -321,8 +321,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "! gsutil mb -l $LOCATION $BUCKET_URI" | ||
| ] | ||
| "! gcloud storage buckets create --location $LOCATION $BUCKET_URI" ] | ||
|
||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
|
|
@@ -1238,8 +1237,7 @@ | |
| "! rm -f custom.tar custom.tar.gz\n", | ||
| "! tar cvf custom.tar custom\n", | ||
| "! gzip custom.tar\n", | ||
| "! gsutil cp custom.tar.gz $BUCKET_URI/trainer.tar.gz" | ||
| ] | ||
| "! gcloud storage cp custom.tar.gz $BUCKET_URI/trainer.tar.gz" ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
|
|
@@ -1451,8 +1449,7 @@ | |
| "delete_bucket = False\n", | ||
| "\n", | ||
| "if delete_bucket:\n", | ||
| " ! gsutil rm -rf {BUCKET_URI}" | ||
| ] | ||
| " ! gcloud storage rm --recursive --continue-on-error {BUCKET_URI}" ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -324,8 +324,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "! gsutil mb -l $LOCATION -p $PROJECT_ID $BUCKET_URI" | ||
| ] | ||
| "! gcloud storage buckets create --location $LOCATION --project $PROJECT_ID $BUCKET_URI" ] | ||
|
||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
|
|
@@ -595,8 +594,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "!gsutil ls gs://$BUCKET_NAME/$GCS_PREFIX/data" | ||
| ] | ||
| "!gcloud storage ls gs://$BUCKET_NAME/$GCS_PREFIX/data" ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
|
|
@@ -1359,8 +1357,7 @@ | |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "!gsutil ls $gcs_source_test_url" | ||
| ] | ||
| "!gcloud storage ls $gcs_source_test_url" ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
|
|
@@ -1488,8 +1485,7 @@ | |
| "batch_predict_job.delete()\n", | ||
| "\n", | ||
| "if delete_bucket or os.getenv(\"IS_TESTING\"):\n", | ||
| " ! gsutil rm -r $BUCKET_URI" | ||
| ] | ||
| " ! gcloud storage rm --recursive $BUCKET_URI" ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is a Python-style comment (
# Note...) in a cell where shell commands are being executed (prefixed with!). This will cause aSyntaxErrorwhen the notebook cell is run. The comment should be a shell comment, prefixed with! #. Additionally, it appears to be breaking the JSON format of the notebook file, as it's not a string literal within thesourcearray.