diff --git a/runtime/main.go b/runtime/main.go index 9802adb509aee86dfbfbfba14f794dcbed5d7865..d0e39f4ef7c2f8c3d586868a19d03d86e2cdde96 100644 --- a/runtime/main.go +++ b/runtime/main.go @@ -57,6 +57,9 @@ const ( devicePlugin = "ascend-device-plugin" ascendVisibleDevices = "ASCEND_VISIBLE_DEVICES" ascendRuntimeOptions = "ASCEND_RUNTIME_OPTIONS" + + // void indicates that the NPU card does not need to be mounted + void = "void" ) var ( @@ -507,7 +510,7 @@ func addManagerDevice(spec *specs.Spec) error { func checkVisibleDevice(spec *specs.Spec) ([]int, error) { visibleDevices := getValueByDeviceKey(spec.Process.Env) - if visibleDevices == "" { + if visibleDevices == "" || visibleDevices == void { return nil, nil }