FIX AutoDL修复

This commit is contained in:
kyj@bowong.ai 2025-04-17 16:28:10 +08:00
parent 8a61905b55
commit 52eeb712e0
2 changed files with 26 additions and 5 deletions

View File

@ -1,7 +1,5 @@
import time import time
import traceback import traceback
import uuid
from concurrent.futures.thread import ThreadPoolExecutor
from typing import Union from typing import Union
import loguru import loguru
@ -58,7 +56,7 @@ class RunningPool:
"video_file": video_file, "video_file": video_file,
"audio_file": audio_file "audio_file": audio_file
} }
resp = requests.post(base_url, data, headers=self._headers, allow_redirects=True, stream=True) resp = requests.post(base_url, data, headers=self._headers, allow_redirects=True, stream=True, timeout=60)
loguru.logger.info("Submit Response: %s" % resp.text) loguru.logger.info("Submit Response: %s" % resp.text)
if resp.status_code == 200: if resp.status_code == 200:
if resp.json()["status"] == "success": if resp.json()["status"] == "success":

View File

@ -13,6 +13,29 @@ instances = {}
LIM = 200 # 等待状态时间LIM*5s LIM = 200 # 等待状态时间LIM*5s
START_LIM = 20 #Heygem脚本启动等待超时时间-10 START_LIM = 20 #Heygem脚本启动等待超时时间-10
DEBUG = False DEBUG = False
gpu_list = ["V100-SXM2-32GB",
"vGPU-32GB",
"RTX 4090",
"RTX 4090D",
"RTX 3090",
"RTX 3080",
"RTX 3080x2",
"RTX 3080 Ti",
"RTX 3060",
"RTX A4000",
"RTX 2080 Ti",
"RTX 2080 Ti x2",
"GTX 1080 Ti"]
area_list = ["nm-B1",
"nm-B2",
"west-B",
"west-C",
"west-X",
"bj-B1",
"beijing-A",
"beijing-B",
"beijing-D",
"beijing-E"]
def ssh_try(host,port,pwd,uid): def ssh_try(host,port,pwd,uid):
# 建立连接 # 建立连接
@ -53,7 +76,7 @@ def get_autodl_machines() -> Union[list, None]:
payload = { payload = {
"charge_type":"payg", "charge_type":"payg",
"region_sign":"", "region_sign":"",
"gpu_type_name":["V100-SXM2-32GB", "vGPU-32GB", "RTX 4090", "RTX 4090D", "RTX 3090", "RTX 3080", "RTX 3080x2", "RTX 3080 Ti", "RTX 3060", "RTX A4000", "RTX 2080 Ti", "RTX 2080 Ti x2", "GTX 1080 Ti"], "gpu_type_name": gpu_list,
"machine_tag_name":[], "machine_tag_name":[],
"gpu_idle_num":1, "gpu_idle_num":1,
"mount_net_disk":False, "mount_net_disk":False,
@ -66,7 +89,7 @@ def get_autodl_machines() -> Union[list, None]:
"pay_price_order":"", "pay_price_order":"",
"gpu_idle_type":"", "gpu_idle_type":"",
"default_order":False, "default_order":False,
"region_sign_list":["nm-B1","nm-B2", "west-B", "west-C", "west-X", "bj-B1", "beijing-A", "beijing-B", "beijing-D", "beijing-E"], "region_sign_list": area_list,
"cpu_arch":["x86"], "cpu_arch":["x86"],
"chip_corp":["nvidia"], "chip_corp":["nvidia"],
"machine_id":"" "machine_id":""