the-full-stack / fsdl-text-recognizer-2022

Source of the FSDL 2022 labs, which are at https://github.com/full-stack-deep-learning/fsdl-text-recognizer-2022-labs
https://fullstackdeeplearning.com/course
MIT License
82 stars 26 forks source link

Make devcontainer compatible with Codespaces and local VS code #59

Open charlesfrye opened 2 years ago

charlesfrye commented 2 years ago

In order to get CUDA when launching inside VSCode, the devcontainer.json needs to include gpu arguments for docker run:

{
  "runArgs": [
    "--gpus",
    "all"
]
}

This isn't necessary when using GitHub Codespaces+GPUs. Before changing the devcontainer, we should make sure this change works with that platform.

charlesfrye commented 2 years ago

okay, so the tricky bit here is that it's hard to support both VSCode and Codespaces development both with and without GPUs

VSCode really just wants to use the .devcontainer/devcontainer.json -- I cannot figure out how to get it to use literally anything else, even after diving into settings. It may be possible when the devcontainer.json is available locally, but not when it's on a remote.

But that breaks the pattern I set up at the start, which is that the default devcontainer works with the default GitHub Codespace machines.

I'm thinking perhaps we use default GitHub Codespace machines, but then we run GPU-accelerated jobs elsewhere. That'll depend on cloud-native GPU development tools being good enough that we can recommend them. My experience so far with Modal was pretty positive.

There's also some stuff with making sure git config info is passed along -- though that may be because my remote was misconfigured. It's also going to be important to