Skip to content

Instantly share code, notes, and snippets.

@korakot
Last active September 29, 2022 21:40
Show Gist options
  • Save korakot/f3600576720206363c734eca5f302e38 to your computer and use it in GitHub Desktop.
Save korakot/f3600576720206363c734eca5f302e38 to your computer and use it in GitHub Desktop.
Mount GCS bucket on Colab
from google.colab import auth
auth.authenticate_user()
!echo "deb http://packages.cloud.google.com/apt gcsfuse-bionic main" > /etc/apt/sources.list.d/gcsfuse.list
!curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
!apt -qq update
!apt -qq install gcsfuse
!mkdir co-lab
!gcsfuse co-lab /content/co-lab
# this won't work with "requester pays" bucket, you need gsutil instead
# !gsutil -u "kora-id" cp gs://bucket_name/path_to/image.png .
@aaronjoseph
Copy link

I am facing the same issue. Were you able to debug this ?

@LightingMc
Copy link

LightingMc commented Sep 5, 2021 via email

@aaronjoseph
Copy link

Yeah, also, it doesn't make sense to mount GCS bucket. Latency is a big minus.

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