Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: GPU host requirement #7586

Closed
3 tasks done
chrmarti opened this issue Nov 28, 2022 · 2 comments
Closed
3 tasks done

Test: GPU host requirement #7586

chrmarti opened this issue Nov 28, 2022 · 2 comments
Labels
containers Issue in vscode-remote containers testplan-item
Milestone

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Nov 28, 2022

Refs: devcontainers/spec#82

Complexity: 3

Create Issue


  • Install the Dev Containers pre-release extension (0.265.0-pre-release or later).
  • With nvidia GPU (@connor4312):
    • Have a devcontainer.json with "hostRequirements"."gpu" and verify that the devcontainer comes with GPU enabled/disabled depending on the config.
  • Without Nvidia GPU:
    • Have a devcontainer.json with "hostRequirements"."gpu" and verify that the Dev Containers extension warns about the GPU not being available when one is required depending on the config.
  • Verify that there is IntelliSense for the "hostRequirements"."gpu" property in the devcontainer.json and its description makes sense.
@chrmarti chrmarti added containers Issue in vscode-remote containers testplan-item labels Nov 28, 2022
@aeschli aeschli added this to the November 2022 milestone Nov 29, 2022
@ghost ghost assigned connor4312 and sandy081 Nov 29, 2022
@sandy081 sandy081 removed their assignment Nov 29, 2022
@joaomoreno joaomoreno self-assigned this Nov 30, 2022
@joaomoreno
Copy link
Member

This doesn't seem to work, despite the GPU being detected when running the CUDA "hello world" container:

image

Here's my docker info:

{"ID":"E4EU:NPH5:D2L7:Z6VS:ELH5:6YY3:LKTQ:BL4M:LEWZ:4TTF:BZKF:IJWB","Containers":4,"ContainersRunning":0,"ContainersPaused":0,"ContainersStopped":4,"Images":7,"Driver":"overlay2","DriverStatus":[["Backing Filesystem","extfs"],["Supports d_type","true"],["Native Overlay Diff","true"],["userxattr","false"]],"Plugins":{"Volume":["local"],"Network":["bridge","host","ipvlan","macvlan","null","overlay"],"Authorization":null,"Log":["awslogs","fluentd","gcplogs","gelf","journald","json-file","local","logentries","splunk","syslog"]},"MemoryLimit":true,"SwapLimit":true,"KernelMemory":true,"KernelMemoryTCP":true,"CpuCfsPeriod":true,"CpuCfsQuota":true,"CPUShares":true,"CPUSet":true,"PidsLimit":true,"IPv4Forwarding":true,"BridgeNfIptables":true,"BridgeNfIp6tables":true,"Debug":false,"NFd":46,"OomKillDisable":true,"NGoroutines":49,"SystemTime":"2022-11-30T13:19:46.213115858Z","LoggingDriver":"json-file","CgroupDriver":"cgroupfs","CgroupVersion":"1","NEventsListener":4,"KernelVersion":"5.10.102.1-microsoft-standard-WSL2","OperatingSystem":"Docker Desktop","OSVersion":"","OSType":"linux","Architecture":"x86_64","IndexServerAddress":"https://index.docker.io/v1/","RegistryConfig":{"AllowNondistributableArtifactsCIDRs":[],"AllowNondistributableArtifactsHostnames":[],"InsecureRegistryCIDRs":["127.0.0.0/8"],"IndexConfigs":{"docker.io":{"Name":"docker.io","Mirrors":[],"Secure":true,"Official":true},"hubproxy.docker.internal:5000":{"Name":"hubproxy.docker.internal:5000","Mirrors":[],"Secure":false,"Official":false}},"Mirrors":[]},"NCPU":16,"MemTotal":16728231936,"GenericResources":null,"DockerRootDir":"/var/lib/docker","HttpProxy":"http.docker.internal:3128","HttpsProxy":"http.docker.internal:3128","NoProxy":"hubproxy.docker.internal","Name":"docker-desktop","Labels":[],"ExperimentalBuild":false,"ServerVersion":"20.10.21","Runtimes":{"io.containerd.runc.v2":{"path":"runc"},"io.containerd.runtime.v1.linux":{"path":"runc"},"runc":{"path":"runc"}},"DefaultRuntime":"runc","Swarm":{"NodeID":"","NodeAddr":"","LocalNodeState":"inactive","ControlAvailable":false,"Error":"","RemoteManagers":null},"LiveRestoreEnabled":false,"Isolation":"","InitBinary":"docker-init","ContainerdCommit":{"ID":"1c90a442489720eec95342e1789ee8a5e1b9536f","Expected":"1c90a442489720eec95342e1789ee8a5e1b9536f"},"RuncCommit":{"ID":"v1.1.4-0-g5fd4c4d","Expected":"v1.1.4-0-g5fd4c4d"},"InitCommit":{"ID":"de40ad0","Expected":"de40ad0"},"SecurityOptions":["name=seccomp,profile=default"],"Warnings":["WARNING: No blkio throttle.read_bps_device support","WARNING: No blkio throttle.write_bps_device support","WARNING: No blkio throttle.read_iops_device support","WARNING: No blkio throttle.write_iops_device support"],"ClientInfo":{"Debug":false,"Context":"default","Plugins":[{"SchemaVersion":"0.1.0","Vendor":"Docker Inc.","Version":"v0.9.1","ShortDescription":"Docker Buildx","Name":"buildx","Path":"C:\\Program Files\\Docker\\cli-plugins\\docker-buildx.exe"},{"SchemaVersion":"0.1.0","Vendor":"Docker Inc.","Version":"v2.12.2","ShortDescription":"Docker Compose","Name":"compose","Path":"C:\\Program Files\\Docker\\cli-plugins\\docker-compose.exe"},{"SchemaVersion":"0.1.0","Vendor":"Docker Inc.","Version":"v0.0.3","ShortDescription":"Docker Dev Environments","Name":"dev","Path":"C:\\Program Files\\Docker\\cli-plugins\\docker-dev.exe"},{"SchemaVersion":"0.1.0","Vendor":"Docker Inc.","Version":"v0.2.13","ShortDescription":"Manages Docker extensions","Name":"extension","Path":"C:\\Program Files\\Docker\\cli-plugins\\docker-extension.exe"},{"SchemaVersion":"0.1.0","Vendor":"Anchore Inc.","Version":"0.6.0","ShortDescription":"View the packaged-based Software Bill Of Materials (SBOM) for an image","URL":"https://github.com/docker/sbom-cli-plugin","Name":"sbom","Path":"C:\\Program Files\\Docker\\cli-plugins\\docker-sbom.exe"},{"SchemaVersion":"0.1.0","Vendor":"Docker Inc.","Version":"v0.21.0","ShortDescription":"Docker Scan","Name":"scan","Path":"C:\\Program Files\\Docker\\cli-plugins\\docker-scan.exe"}],"Warnings":null}}

@chrmarti
Copy link
Contributor Author

We check the docker info for Runtimes?.nvidia?.path === 'nvidia-container-runtime' to determine if a GPU is available. Not sure why that is missing in your case, but the sample still works. @chris-major-improbable Do you have additional insights into when the GPU is listed in the runtimes and when not?

@connor4312 connor4312 removed their assignment Dec 1, 2022
@aeschli aeschli closed this as completed Dec 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers testplan-item
Projects
None yet
Development

No branches or pull requests

5 participants