VSCode에서 Colab의 GPU를 사용하기 위해 연동을 시켜보자.
window의 경우 아래에서 다운로드 가능
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup
Mac은 brew로 다운 가능하다.
brew install cloudflare/cloudflare/cloudflared
Remote-SSH Extension 설치
command + shift + P 로 command palette를 열기
Remote-SSH : Open configuration file을 실행
/Users/<user_name>/.ssh/config 수정(기존파일에 추가하는 방식)
Host *.trycloudflare.com
HostName %h
User root
Port 22
ProxyCommand exec cloudflared access ssh --hostname %h
# ProxyCommand exec <cloudflared 경로> access ssh --hostname %h
from google.colab import drive
# mount google drive
drive.mount('/content/drive')
# Install colab_ssh on google colab
!pip install colab_ssh --upgrade
from colab_ssh import launch_ssh_cloudflared, init_git_cloudflared
launch_ssh_cloudflared(password="<YOUR_PASSWORD>") # 비밀번호 설정

위의 작업을 다 마치면 VSCode에서 Colab을 사용할 수 있다.
잘 봤습니다. 좋은 글 감사합니다.