mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 05:21:33 +00:00
87c8a868f9
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
26 lines
392 B
Go
26 lines
392 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
)
|
|
|
|
func capabilityToCLI(cap string) string {
|
|
switch cap {
|
|
case "compute":
|
|
return "--compute"
|
|
case "compat32":
|
|
return "--compat32"
|
|
case "graphics":
|
|
return "--graphics"
|
|
case "utility":
|
|
return "--utility"
|
|
case "video":
|
|
return "--video"
|
|
case "display":
|
|
return "--display"
|
|
default:
|
|
log.Panicln("unknown driver capability:", cap)
|
|
}
|
|
return ""
|
|
}
|