Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,6 +37,9 @@ def print_gpu():
|
|
| 37 |
result = subprocess.run(
|
| 38 |
['ps', '-ef'], text=True
|
| 39 |
)
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
print("当前进程ID:", os.getpid())
|
| 42 |
print("父进程ID:", os.getppid())
|
|
@@ -53,6 +56,9 @@ def print_gpu():
|
|
| 53 |
else:
|
| 54 |
print("CUDA is not available.")
|
| 55 |
|
|
|
|
|
|
|
|
|
|
| 56 |
##
|
| 57 |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
|
| 58 |
print_gpu()
|
|
|
|
| 37 |
result = subprocess.run(
|
| 38 |
['ps', '-ef'], text=True
|
| 39 |
)
|
| 40 |
+
result = subprocess.run(
|
| 41 |
+
['pip', 'list'], text=True
|
| 42 |
+
)
|
| 43 |
|
| 44 |
print("当前进程ID:", os.getpid())
|
| 45 |
print("父进程ID:", os.getppid())
|
|
|
|
| 56 |
else:
|
| 57 |
print("CUDA is not available.")
|
| 58 |
|
| 59 |
+
print("outter")
|
| 60 |
+
result = subprocess.run(['pip', 'list'], text=True)
|
| 61 |
+
|
| 62 |
##
|
| 63 |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
|
| 64 |
print_gpu()
|