loft-sh / devpod-provider-aws

DevPod on AWS
Mozilla Public License 2.0
13 stars 8 forks source link

Use different default image when using with gpu instances #26

Open sansmoraxz opened 10 months ago

sansmoraxz commented 10 months ago

The default ubuntu images lacks a lot of stuff when trying to create with GPU enabled.

Currently I am using Deep Learning Base GPU AMI (Ubuntu 20.04) 20231026 ie ami-0e376370bca957974 for region ap-south-1 to create GPU based dev-containers. It would be ideal if it was inferred from requested devcontainer config file, as we have to manually look up the ami while creating for other regions.

pascalbreuninger commented 9 months ago

Hi @sansmoraxz, thanks for opening the issue. You only have to do this when setting it up initially, how big of an issue is this for you? I could see a possible devcontainer.json customization for this kind of stuff but generally speaking the infrastructure from the providers are mostly separated from the devcontainer spec

sansmoraxz commented 9 months ago

Not huge, more of a QOL thing for me. I do have seperate provides for use cases. And have a bash script to update the amis.

But someone with less understanding may struggle here, or even waste time trying to debug the issue.

Related: https://github.com/loft-sh/devpod/issues/669

sansmoraxz commented 9 months ago

As I understand a condition for whether GPU is enabled can be passed here: https://github.com/loft-sh/devpod-provider-aws/blob/b8c145e4b7ee6d98b933fb0749d0707463457127/pkg/aws/aws.go#L176-L192

Would've made a PR, but I didn't get how much API changes needed to be made to get it working.