【问题标题】:Is there a way to use the data from Google Cloud Storage directly in Colab?有没有办法直接在 Colab 中使用来自 Google Cloud Storage 的数据?
【发布时间】:2021-04-04 18:56:43
【问题描述】:

我想在 Google Colab 中使用一个数据集 (170+GB)。我有两个问题:

  1. 由于 Colab 中的可用空间约为 66GB,如果数据托管在 GCS 中,有没有办法直接在 colab 中使用 GCS 中的数据?如果没有,有什么可能的解决方案?

  2. 由于可用空间有限,我无法进入 colab,如何直接从可下载链接将数据集上传到 GCS?

感谢任何帮助。

【问题讨论】:

    标签: google-cloud-storage google-colaboratory


    【解决方案1】:

    验证:

    from google.colab import auth
    auth.authenticate_user()
    

    安装谷歌SDK:

    !curl https://sdk.cloud.google.com | bash
    

    初始化 SDK 以配置项目设置。

    !gcloud init
    

    1 .将文件从 Cloud Storage 下载到 Google Colab

    !gsutil cp gs://google storage bucket/your file.csv .
    

    2 。将文件从 Google Colab 上传到云端

    gsutil cp yourfile.csv gs://gs bucket/
    

    希望对您有所帮助。 Source

    【讨论】:

    • 如果可能的话,我会推荐使用 google ai notebook,它可以让我们免于这些烦人的问题。
    猜你喜欢
    • 2021-01-02
    • 1970-01-01
    • 2021-03-13
    • 2018-01-28
    • 2020-04-29
    • 2020-07-18
    • 2018-11-18
    • 2022-07-23
    • 1970-01-01
    相关资源
    最近更新 更多