Skip to content

GPU requirement and auto-detect NVIDIA extensions - #173

Merged
Christof Marti (chrmarti) merged 9 commits into
devcontainers:mainfrom
chris-major-improbable:chrism/gpu-requriements
Nov 11, 2022
Merged

GPU requirement and auto-detect NVIDIA extensions#173
Christof Marti (chrmarti) merged 9 commits into
devcontainers:mainfrom
chris-major-improbable:chrism/gpu-requriements

Conversation

@chris-major-improbable

@chris-major-improbableChris Major (chris-major-improbable) commented Sep 13, 2022

Copy link
Copy Markdown
Contributor

This PR builds upon the proposal in devcontainers/spec#82
When launching a devcontainer requesting GPUs it also detects the presence of NVIDIA docker extensions, and adds the --gpus all flag.

This means that the same devcontainer can be used by developments that don't all have GPU's.

It also does the equivalent for docker-compose scripts, adding the GPU access to the service specified in the devcontainer.json file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I have left a comment.

Comment threadsrc/spec-node/singleContainer.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! I have added a few more comments.

Comment threadsrc/spec-node/dockerCompose.ts Outdated
Comment threadsrc/spec-configuration/configuration.ts Outdated
Comment threadsrc/spec-configuration/configuration.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left a few more comments. Thanks!

Comment threadsrc/spec-node/singleContainer.ts Outdated
Comment threadsrc/spec-node/imageMetadata.ts
Comment threadsrc/spec-node/dockerCompose.ts Outdated
Comment threadsrc/spec-configuration/configuration.ts Outdated
Comment threadsrc/spec-node/dockerCompose.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 more comment. :)

Comment threadsrc/spec-node/dockerCompose.ts Outdated
Comment threadsrc/spec-node/dockerCompose.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (Looping in our partner team for cross-review. Will merge after that. Thanks!)

@chris-major-improbable

Copy link
Copy Markdown
ContributorAuthor

Hey Christof Marti (@chrmarti) just seen a lot of test failures on the CI - and slightly at a loss to understand what they mean and why they are failing. I'm happy to take a look, but I'm not sure what the difference between src/test/cli.build.test.ts and src/test/cli.exec.buildKit.1.test.ts is (and how to replicated it locally?)

@chris-major-improbable

Copy link
Copy Markdown
ContributorAuthor

I've taken a bit of a closer look, and rebased onto the latest main - and I see the same failures running the tests locally, so I don't think this is a regression from this PR.

@chrmarti

Copy link
Copy Markdown
Contributor

Chris Major (@chris-major-improbable) I have merged in the main branch and fixed an issue with the PR I found when looking into the test failures. Please check the above comment from the CLA bot, we must have added that after you submitted the PR. Thanks!

@chris-major-improbable

Copy link
Copy Markdown
ContributorAuthor

@microsoft-github-policy-service agree [company="{Improbable Worlds Ltd}"]

@chris-major-improbable

Copy link
Copy Markdown
ContributorAuthor

@microsoft-github-policy-service agree company="{Improbable Worlds Ltd}"

@chris-major-improbable

Copy link
Copy Markdown
ContributorAuthor

@microsoft-github-policy-service agree company="Improbable Worlds Ltd"

@chris-major-improbable

Copy link
Copy Markdown
ContributorAuthor

Thanks for that - looks good to me.
I've merged in the latest and fixed one conflict, and should be good now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (Will get a second review now.) Thanks!

@joshspicerjoshspicer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for the contribution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for the contribution! ✨

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@chris-major-improbable@chrmarti@joshspicer@samruddhikhandale