【问题标题】:How do I create a local version of the Colab VM?如何创建 Colab VM 的本地版本?
【发布时间】:2018-11-08 02:22:01
【问题描述】:

我可以通过 colab 在 Google 提供的 VM 上运行脚本。我也可以通过 jupyter 在本地运行它,但是需要在我的本地机器上安装什么才能匹配 colab VM 的设置?

我可以在 colab 工作表中输入 !pip freeze 以查看所有已安装的 Python 包,但我还有什么需要做的吗?有没有一种简单的方法可以在本地复制 colab 虚拟机?

【问题讨论】:

    标签: google-colaboratory


    【解决方案1】:

    您可以将 Colab 与本地 Jupyter 安装一起使用。详细说明在这里:

    http://research.google.com/colaboratory/local-runtimes.html

    简而言之:

    1. 安装 Colab Jupyter 扩展 --

      pip install jupyter_http_over_ws
      jupyter serverextension enable --py jupyter_http_over_ws
      
    2. 使用以下参数启动 Jupyter:

      jupyter notebook \
        --NotebookApp.allow_origin='https://colab.research.google.com' \
        --port=8888 \
        --NotebookApp.port_retries=0
      

    然后,从连接下拉列表中选择本地运行时选项。

    【讨论】:

    • 除此之外,“Google Cloud Platform 提供深度学习 VM 映像,并预先配置了 Colaboratory 本地后端支持。”在下面的链接中还有更多关于配置的内容,但我还没有时间来处理更多关于如何在我的 ubuntu 机器上复制它的问题。如果有人已经通过这个有兴趣blog.kovalevskyi.com/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-31
    • 2019-05-07
    • 1970-01-01
    • 2021-10-04
    • 2019-01-24
    相关资源
    最近更新 更多