Skip to content

Commit db2da0f

Browse files
authored
Merge pull request #105 from gurusai-voleti/ai-gsutil-migration-bf6b6d1ee68344e3ba321e41476954e0
chore: Migrate gsutil usage to gcloud storage
2 parents 47369b9 + 7f2466c commit db2da0f

5 files changed

Lines changed: 20 additions & 23 deletions

File tree

context-atlas/deploy.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,14 @@ yarn
2525
yarn build
2626

2727
echo "Deploying..."
28-
gsutil mkdir -p gs://bert-wsd-vis/demo
29-
gsutil -m cp static/* gs://bert-wsd-vis/demo
28+
gcloud storage cp -r static/* gs://bert-wsd-vis/demo
3029

31-
gsutil -m setmeta -h "Cache-Control:private" "gs://bert-wsd-vis/**.html"
32-
gsutil -m setmeta -h "Cache-Control:private" "gs://bert-wsd-vis/**.css"
33-
gsutil -m setmeta -h "Cache-Control:private" "gs://bert-wsd-vis/**.js"
30+
gcloud storage objects update "gs://bert-wsd-vis/**.html" --cache-control="private"
31+
gcloud storage objects update "gs://bert-wsd-vis/**.css" --cache-control="private"
32+
gcloud storage objects update "gs://bert-wsd-vis/**.js" --cache-control="private"
3433

3534
if [[ $* == *--upload_jsons* ]]; then
3635
echo 'Uploading jsons data'
37-
gsutil mkdir -p gs://bert-wsd-vis/demo/jsons
38-
gsutil -m cp static/jsons/* gs://bert-wsd-vis/demo/jsons
36+
gcloud storage cp -r static/jsons/* gs://bert-wsd-vis/demo/jsons
3937
fi
4038

context-atlas/download_pregenerated_jsons.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121

2222
echo "Downloading..."
2323
mkdir -p static/jsons
24-
gsutil -m cp gs://bert-wsd-vis/demo/jsons/* static/jsons
24+
gcloud storage cp gs://bert-wsd-vis/demo/jsons/* static/jsons

data-synth-syntax/deploy.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,19 @@ yarn
2525
yarn build
2626

2727
echo "Deploying..."
28-
gsutil mkdir -p gs://data-synth-trees/demo
29-
gsutil rm -f gs://data-synth-trees/demo/*.html
30-
gsutil rm -f gs://data-synth-trees/demo/*.css
31-
gsutil rm -f gs://data-synth-trees/demo/*.js
28+
touch empty_file | gcloud storage cp gs://data-synth-trees/demo
29+
gcloud storage rm -f gs://data-synth-trees/demo/*.html
30+
gcloud storage rm -f gs://data-synth-trees/demo/*.css
31+
gcloud storage rm -f gs://data-synth-trees/demo/*.js
3232

33-
gsutil -m cp static/* gs://data-synth-trees/demo
33+
gcloud storage cp -r static/* gs://data-synth-trees/demo
3434

35-
gsutil -m setmeta -h "Cache-Control:private" "gs://data-synth-trees/**.html"
36-
gsutil -m setmeta -h "Cache-Control:private" "gs://data-synth-trees/**.css"
37-
gsutil -m setmeta -h "Cache-Control:private" "gs://data-synth-trees/**.js"
35+
gcloud storage objects update "gs://data-synth-trees/**.html" --cache-control="private"
36+
gcloud storage objects update "gs://data-synth-trees/**.css" --cache-control="private"
37+
gcloud storage objects update "gs://data-synth-trees/**.js" --cache-control="private"
3838

3939
if [[ $* == *--upload_jsons* ]]; then
4040
echo 'Uploading jsons data'
41-
gsutil mkdir -p gs://data-synth-trees/demo/data
42-
gsutil -m cp static/data/* gs://data-synth-trees/demo/data
41+
gcloud storage cp -r static/data/* gs://data-synth-trees/demo/data
4342
fi
4443

racing_thoughts/code/[1]_Behavioral_Results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,6 @@ def main(args) -> None:
295295

296296
# To save results from xcloud to gbucket
297297
# XCLOUD
298-
# gsutil -m rsync -r /workdir/results gs://patchscopes/workdir/main/racing_thoughts
298+
# gcloud storage rsync --recursive /workdir/results gs://patchscopes/workdir/main/racing_thoughts
299299
# To cloudtop
300-
# gsutil -m cp -R gs://patchscopes/workdir/main/racing_thoughts /usr/local/google/home/mlepori/racing_thoughts
300+
# gcloud storage cp --recursive gs://patchscopes/workdir/main/racing_thoughts /usr/local/google/home/mlepori/racing_thoughts

uncertainty-over-space/tcga-slide/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ vips dzsave TCGA-YL-A8SB-01Z-00-DX1.6E3A9961-7A7E-456F-B703-4920FCC79425.svs tcg
77
Upload to GCS and open up CORS headers.
88

99
```bash
10-
gsutil mb gs://uncertainty-over-space
11-
gsutil -m cp -r img/* gs://uncertainty-over-space/
12-
gsutil cors set cors-json-file.json gs://uncertainty-over-space
10+
gcloud storage buckets create gs://uncertainty-over-space
11+
gcloud storage cp --recursive img/* gs://uncertainty-over-space/
12+
gcloud storage buckets update --cors-file=cors-json-file.json gs://uncertainty-over-space
1313
```
1414

1515
`softmax.json` is generated by an unreleased pathology model.

0 commit comments

Comments
 (0)