Visual Studio Code + Docker for Kaggle

Kaggle 用の docker image が公開されているのでそれを Mac 上の Visual Studio Code 使う。

  • やったこと
    • Remote-Containers という拡張を入れて拡張経由で docker を使う。これは host と container 内の両方で Visual Studio Code を起動するので開発環境=実行環境になりうれしい。
    • devcontainer.json に Container で起動する Visual Studio Code にインストールしたい拡張の記述
  • 諦めたこと
    • Container 内で GitHub に push などをやろうとした。.git_config の共有、credential を環境変数で渡すなど。どれもうまく行かなかったのでやめた。よく考えれば host 側のファイルシステムを mount させてhost 側で commit すれば良い
    • 非 root ユーザーでの実行。tutorial に従ったが home directory が permission error で作れなかった。深堀りはしなかった。
  • 想定する開発フロー