Toc
  1. use with vscode
    1. with colab_ssh, Cloudflare and Remote-SSH
  2. runtime
    1. restart
Toc
0 results found
MINGG
colab

Created: 2021-12-08 18:37:30

Modified: 2021-12-08 18:37:30

Google Colab is a free platform to use GPUs and TPUs, different from Google Cloud.

It is based on driver.google to store jupyter notebook and your own data, though some public ram and rom delivered by colab.

use with vscode

with colab_ssh, Cloudflare and Remote-SSH

refer to Colab + Vs Code + GitHub + Jupyter (Perfect for Deep Learning) and How to Connect to VSCode to Colab.

  1. Push Colab to Cloudflare, then there will be tips for following steps in your screen.

    !pip install colab_ssh --upgrade
    from colab_ssh import launch_ssh_cloudflared, init_git_cloudflared
    launch_ssh_cloudflared(password="yourpassword")

    cf1

  2. Following the tips in the screen, download binary file of Cloudflare as /to/path/cloudflared-linux-amd64, and

    chmod +x /to/path/cloudflared-linux-amd64
  3. Remote Configuration modifying ~/.ssh/config.

    # Read more about SSH config files: https://linux.die.net/man/5/ssh_config
    Host *.trycloudflare.com
    HostName %h
    User root
    Port 22
    ProxyCommand /to/path/cloudflared-linux-amd64 access ssh --hostname %h
  4. Test the connection in local terminal.

    ssh channels-enhancing-aw-specifies.trycloudflare.com
    nvidia-smi
    exit
  5. Connect with VSCode Remote SSH. PressCtrl+Shift+P and type “Connect to Host…” and then paste the following hostname in the opened command palette.

    channels-enhancing-aw-specifies.trycloudflare.com
  6. Test in the remote terminal.

    nvidia-smi

    runtime

    restart

    import os
    os.kill(os.getpid(), 9)
打赏
支付宝
微信
本文作者:MINGG
版权声明:本文首发于MINGG的博客,转载请注明出处!