Skip to content

Instantly share code, notes, and snippets.

@mrm8488
Created April 30, 2020 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrm8488/61c2271ea18513c09db553799d311734 to your computer and use it in GitHub Desktop.
Save mrm8488/61c2271ea18513c09db553799d311734 to your computer and use it in GitHub Desktop.

How to download files from a GCP Bucket to Colab ☁📚➡📝

  1. Go to your bucket dashboard

  2. Click on the bucket where is stored the resource you want to download

  3. Go to Permissions tab

  4. Add a new member with the gmail account your are going to use in your Colab

  5. Give to this member the required permissions (Admin, List, Create,...)

    5.b. Admin permissions will work!

  6. In your Colab Notebook, execute the following commands:

!gcloud auth login
# It will send you a link where you will paste a code that is required to continue
!gsutil -m cp -R 'gs://my-bucket/data/my_data' .
# It will download all the files in gs://my-bucket/data/my_data to the current directory

Created by Manuel Romero / mrm8488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment