mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-05-24 05:05:56 +00:00
This change moves the pkg folder to `cmd/nvidia-container-toolkit` to better match go best practices. This allows, for example, for the `cmd/nvidia-container-toolkit` to be go installed. The only package included in `pkg` was `main`. Signed-off-by: Evan Lezar <elezar@nvidia.com>
28 lines
422 B
Go
28 lines
422 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"
|
|
case "ngx":
|
|
return "--ngx"
|
|
default:
|
|
log.Panicln("unknown driver capability:", cap)
|
|
}
|
|
return ""
|
|
}
|