Spaces:
Runtime error
Runtime error
ljy266987
commited on
Commit
•
0a35a9d
1
Parent(s):
5cb2a10
try
Browse files
app.py
CHANGED
@@ -34,6 +34,13 @@ def print_gpu():
|
|
34 |
['nvidia-smi'], text=True
|
35 |
)
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
if torch.cuda.is_available():
|
38 |
print("CUDA is available. Listing available GPUs:")
|
39 |
# 获取并打印GPU数量
|
|
|
34 |
['nvidia-smi'], text=True
|
35 |
)
|
36 |
|
37 |
+
result = subprocess.run(
|
38 |
+
['ps', '-ef'], text=True
|
39 |
+
)
|
40 |
+
|
41 |
+
print("当前进程ID:", os.getpid())
|
42 |
+
print("父进程ID:", os.getppid())
|
43 |
+
|
44 |
if torch.cuda.is_available():
|
45 |
print("CUDA is available. Listing available GPUs:")
|
46 |
# 获取并打印GPU数量
|