GCP + Visual Studio Code 開発環境構築
前提
GCP への ssh 接続。GCP の AI notebooks インスタンスに ssh できなかったので調べた - higepon blog。
目標
- Visual Studio Code のリモート接続を利用して GCP 上のコードを快適に編集。
- git 周りの操作もそのまま行いたい。
- Visual Studio Code 自体の習熟。
- Kaggle 用に directory layout も最適化。
手順
- 以前の適当な設定を消したいので VS Code アンインストール。macos - How to completely uninstall vscode on mac - Stack Overflow
- VS Code インストール。
- Settings
- Auto Save - after delay
- Extensions
- Python
- Awesome Emacs Keymap
- Remote Development
- Visual Studio Code Remote Development Frequently Asked Questions
- Supporting Remote Development and Visual Studio Online | Visual Studio Code Extension API 読むこと。
- Python Extension を Remote にもインストールする。そうすれば Intellisense 動く。
- Refactoring できる?=> Yes
- pylint インストール。
- 正しい Python interpreter をステータスバー左から選ぶ。import numpy as np して np. で正しく保管されれば正しく動いている。
- git
- GitHubとVSCODEの連携方法 - Qiita のとおりに動いている。