Last active
September 29, 2022 21:40
-
-
Save korakot/f3600576720206363c734eca5f302e38 to your computer and use it in GitHub Desktop.
Mount GCS bucket on Colab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, also, it doesn't make sense to mount GCS bucket. Latency is a big minus.