Spaces:
Running
on
Zero
Running
on
Zero
Update main.py
Browse files
main.py
CHANGED
@@ -29,14 +29,14 @@ for i in range(device_count):
|
|
29 |
|
30 |
import os
|
31 |
|
|
|
|
|
32 |
try:
|
33 |
ctypes.CDLL('libnvidia-ml.so')
|
34 |
print("成功加载 libnvidia-ml.so。")
|
35 |
except Exception as e:
|
36 |
print("无法加载 libnvidia-ml.so,错误信息:", e)
|
37 |
|
38 |
-
import glob
|
39 |
-
|
40 |
libs = glob.glob('/usr/lib*/**/libnvidia-*.so*', recursive=True)
|
41 |
print("NVIDIA 驱动库文件:", libs)
|
42 |
print("LD_LIBRARY_PATH:", os.environ.get('LD_LIBRARY_PATH', '未设置'))
|
|
|
29 |
|
30 |
import os
|
31 |
|
32 |
+
import glob
|
33 |
+
import ctypes
|
34 |
try:
|
35 |
ctypes.CDLL('libnvidia-ml.so')
|
36 |
print("成功加载 libnvidia-ml.so。")
|
37 |
except Exception as e:
|
38 |
print("无法加载 libnvidia-ml.so,错误信息:", e)
|
39 |
|
|
|
|
|
40 |
libs = glob.glob('/usr/lib*/**/libnvidia-*.so*', recursive=True)
|
41 |
print("NVIDIA 驱动库文件:", libs)
|
42 |
print("LD_LIBRARY_PATH:", os.environ.get('LD_LIBRARY_PATH', '未设置'))
|