【问题标题】:Downloading a public file from Google Cloud to Google colaboratory将公共文件从 Google Cloud 下载到 Google colaboratory
【发布时间】:2020-09-25 23:01:28
【问题描述】:

我有一个公开托管在谷歌云上的数据集this link。我想通过在 Google 合作笔记本中下载这些数据来使用它。但是,我看到的所有涉及将文件从云端传输到 Colab 的教程都需要一个项目 ID,我没有,因为这不是我的项目。 Wget 也不适用于此文件。有没有办法将该链接上的文件直接下载到 colab 笔记本?

【问题讨论】:

    标签: google-cloud-platform google-colaboratory


    【解决方案1】:

    小心,您的文件非常大。它可以轻松填满所有 Colab 空间。

    首先您需要登录(验证自己)。

    from google.colab import auth
    auth.authenticate_user()
    

    然后,您可以使用gsutil 列出文件。

    !gsutil ls gs://ravens-matrices/analogies/
    

    并将 1 个或多个文件复制到当前目录。

    !gsutil cp gs://ravens-matrices/analogies/extrapolation.tar.gz .
    

    这是working notebook

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-21
      • 1970-01-01
      • 2018-10-14
      • 1970-01-01
      • 2018-04-22
      • 2017-07-08
      • 1970-01-01
      • 2015-09-09
      相关资源
      最近更新 更多