add support for nvidia gpu access (#5132)

Signed-off-by: Mondo <mondo.jiang@wisc.edu>
Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
Co-authored-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
Co-authored-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
MondoGao 2024-12-20 04:12:59 -06:00 committed by GitHub
parent 119d03694e
commit 53edc5d4a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 92 additions and 11 deletions

View file

@ -249,6 +249,11 @@ readonly class ContainerDefinitionFetcher {
$devices = $entry['devices'];
}
$enableNvidiaGpu = false;
if (is_bool($entry['enable_nvidia_gpu'])) {
$enableNvidiaGpu = $entry['enable_nvidia_gpu'];
}
$capAdd = [];
if (isset($entry['cap_add'])) {
$capAdd = $entry['cap_add'];
@ -312,6 +317,7 @@ readonly class ContainerDefinitionFetcher {
$dependsOn,
$secrets,
$devices,
$enableNvidiaGpu,
$capAdd,
$shmSize,
$apparmorUnconfined,