From c6d1105dcf9a258525d2f51cd05870d635105826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B8=A3=E6=B2=BC?= Date: Thu, 6 Jun 2024 20:25:17 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20a1e0a64=20from=20https://gitee.com/lmzt?= =?UTF-8?q?ju/ascend-docker-runtime/pulls/69=20=E3=80=90=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=20Modification=E3=80=91ASCEND=5FVISIBLE=5FDE?= =?UTF-8?q?VICES=E6=96=B0=E5=A2=9E=E6=94=AF=E6=8C=81void?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/main.go b/runtime/main.go index 9802adb..d0e39f4 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 } -- Gitee