Update app1.py
Browse files
app1.py
CHANGED
@@ -198,7 +198,7 @@ server
|
|
198 |
# 初始化 nvidia_smi
|
199 |
nvidia_smi.nvmlInit()
|
200 |
|
201 |
-
def
|
202 |
while True:
|
203 |
try:
|
204 |
# 获取 GPU 温度
|
@@ -217,7 +217,6 @@ def wandb():
|
|
217 |
|
218 |
time.sleep(60)
|
219 |
|
220 |
-
|
221 |
def start():
|
222 |
try:
|
223 |
print('启动proxy')
|
@@ -234,7 +233,7 @@ def start():
|
|
234 |
# 在这里处理异常的代码
|
235 |
print(f"启动SD发生错误: {e}")
|
236 |
# Create threads for each function
|
237 |
-
wandb_thread = threading.Thread(target=
|
238 |
start_thread = threading.Thread(target=start)
|
239 |
|
240 |
# Start the threads
|
|
|
198 |
# 初始化 nvidia_smi
|
199 |
nvidia_smi.nvmlInit()
|
200 |
|
201 |
+
def monitor_gpu():
|
202 |
while True:
|
203 |
try:
|
204 |
# 获取 GPU 温度
|
|
|
217 |
|
218 |
time.sleep(60)
|
219 |
|
|
|
220 |
def start():
|
221 |
try:
|
222 |
print('启动proxy')
|
|
|
233 |
# 在这里处理异常的代码
|
234 |
print(f"启动SD发生错误: {e}")
|
235 |
# Create threads for each function
|
236 |
+
wandb_thread = threading.Thread(target=monitor_gpu)
|
237 |
start_thread = threading.Thread(target=start)
|
238 |
|
239 |
# Start the threads
|