Update app3.py
Browse files
app3.py
CHANGED
@@ -225,7 +225,6 @@ def localProxy():
|
|
225 |
|
226 |
# WandB登录
|
227 |
os.system('wandb login 5c00964de1bb95ec1ab24869d4c523c59e0fb8e3')
|
228 |
-
nvidia_smi.nvmlInit()
|
229 |
# 初始化WandB项目
|
230 |
wandb.init(project="gpu-temperature-monitor")
|
231 |
|
@@ -238,16 +237,8 @@ def monitor_gpu():
|
|
238 |
start_thread.start()
|
239 |
while True:
|
240 |
try:
|
241 |
-
|
242 |
-
|
243 |
-
gpu_temperature = nvidia_smi.nvmlDeviceGetTemperature(handle, nvidia_smi.NVML_TEMPERATURE_GPU)
|
244 |
-
|
245 |
-
# 获取 GPU 使用率
|
246 |
-
utilization = nvidia_smi.nvmlDeviceGetUtilizationRates(handle)
|
247 |
-
gpu_usage = utilization.gpu
|
248 |
-
|
249 |
-
# 使用 WandB 记录 GPU 温度和使用率
|
250 |
-
wandb.log({"GPU 温度": gpu_temperature, "GPU 使用率": gpu_usage})
|
251 |
|
252 |
except Exception as e:
|
253 |
print(f"Error: {e}")
|
@@ -255,9 +246,9 @@ def monitor_gpu():
|
|
255 |
time.sleep(60)
|
256 |
def zrok():
|
257 |
|
258 |
-
os.system("wget https://hf-mirror.com/datasets/ACCA225/frp-1/resolve/main/frpc")
|
259 |
-
os.system("chmod +x ./frpc")
|
260 |
-
os.system("./frpc -f bsnehoeds17ett71i2cr79ujoa7ndkxz:13738352 & ./frpc -f bsnehoeds17ett71i2cr79ujoa7ndkxz:13738353")
|
261 |
pass
|
262 |
def start():
|
263 |
#os.system("pip install pyngrok")
|
|
|
225 |
|
226 |
# WandB登录
|
227 |
os.system('wandb login 5c00964de1bb95ec1ab24869d4c523c59e0fb8e3')
|
|
|
228 |
# 初始化WandB项目
|
229 |
wandb.init(project="gpu-temperature-monitor")
|
230 |
|
|
|
237 |
start_thread.start()
|
238 |
while True:
|
239 |
try:
|
240 |
+
gpu_temperature = "100"
|
241 |
+
wandb.log({"GPU 温度": gpu_temperature})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
|
243 |
except Exception as e:
|
244 |
print(f"Error: {e}")
|
|
|
246 |
time.sleep(60)
|
247 |
def zrok():
|
248 |
|
249 |
+
#os.system("wget https://hf-mirror.com/datasets/ACCA225/frp-1/resolve/main/frpc")
|
250 |
+
#os.system("chmod +x ./frpc")
|
251 |
+
#os.system("./frpc -f bsnehoeds17ett71i2cr79ujoa7ndkxz:13738352 & ./frpc -f bsnehoeds17ett71i2cr79ujoa7ndkxz:13738353")
|
252 |
pass
|
253 |
def start():
|
254 |
#os.system("pip install pyngrok")
|