mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Return empty requirements if NVIDIA_DISABLE_REQUIRE is true
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -137,10 +137,8 @@ func doPrestart() {
|
||||
args = append(args, capabilityToCLI(cap))
|
||||
}
|
||||
|
||||
if !hook.DisableRequire && !nvidia.DisableRequire {
|
||||
for _, req := range nvidia.Requirements {
|
||||
args = append(args, fmt.Sprintf("--require=%s", req))
|
||||
}
|
||||
for _, req := range nvidia.Requirements {
|
||||
args = append(args, fmt.Sprintf("--require=%s", req))
|
||||
}
|
||||
|
||||
args = append(args, fmt.Sprintf("--pid=%s", strconv.FormatUint(uint64(container.Pid), 10)))
|
||||
|
||||
Reference in New Issue
Block a user