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.
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")Following the tips in the screen, download binary file of Cloudflare as
/to/path/cloudflared-linux-amd64, andchmod +x /to/path/cloudflared-linux-amd64Remote 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 %hTest the connection in local terminal.
ssh channels-enhancing-aw-specifies.trycloudflare.com
nvidia-smi
exitConnect with VSCode Remote SSH. Press
Ctrl+Shift+Pand type “Connect to Host…” and then paste the following hostname in the opened command palette.channels-enhancing-aw-specifies.trycloudflare.comTest in the remote terminal.
nvidia-smiruntime
restart
import os
os.kill(os.getpid(), 9)
