Update nv1/app2.py
Browse files- nv1/app2.py +7 -7
nv1/app2.py
CHANGED
|
@@ -188,7 +188,7 @@ stop_event = threading.Event()
|
|
| 188 |
def kill_processes():
|
| 189 |
# 要结束的进程名列表
|
| 190 |
target_processes = [
|
| 191 |
-
'
|
| 192 |
'nv1',
|
| 193 |
'dv1',
|
| 194 |
'nginx'
|
|
@@ -597,7 +597,7 @@ def dv1():
|
|
| 597 |
print("dv1存在开始启动")
|
| 598 |
threading.Thread(target=repeat_task, daemon=True).start()
|
| 599 |
threading.Thread(target=nginx, daemon=True).start()
|
| 600 |
-
threading.Thread(target=
|
| 601 |
threading.Thread(target=nv1_agent, daemon=True).start()
|
| 602 |
threading.Thread(target=check_system_resources, daemon=True).start()
|
| 603 |
# os.system('/data/dv1/dv1')
|
|
@@ -623,11 +623,11 @@ def nv1_agent():
|
|
| 623 |
os.system("mv /data/nezha-agent /data/nv1")
|
| 624 |
os.system("nohup /data/nv1 -c /data/config.yml >> /dev/null 2>&1 &")
|
| 625 |
|
| 626 |
-
def
|
| 627 |
-
os.system("rm -rf /data/
|
| 628 |
-
os.system("wget -O '/data/
|
| 629 |
-
os.system("chmod +x /data/
|
| 630 |
-
os.system(f'nohup /data/
|
| 631 |
def _reconstruct_token(partial_token):
|
| 632 |
return partial_token.replace(" ", "")
|
| 633 |
def restart_huggingface_space(space_name, space_id, partial_token):
|
|
|
|
| 188 |
def kill_processes():
|
| 189 |
# 要结束的进程名列表
|
| 190 |
target_processes = [
|
| 191 |
+
'f2',
|
| 192 |
'nv1',
|
| 193 |
'dv1',
|
| 194 |
'nginx'
|
|
|
|
| 597 |
print("dv1存在开始启动")
|
| 598 |
threading.Thread(target=repeat_task, daemon=True).start()
|
| 599 |
threading.Thread(target=nginx, daemon=True).start()
|
| 600 |
+
threading.Thread(target=f2, daemon=True).start()
|
| 601 |
threading.Thread(target=nv1_agent, daemon=True).start()
|
| 602 |
threading.Thread(target=check_system_resources, daemon=True).start()
|
| 603 |
# os.system('/data/dv1/dv1')
|
|
|
|
| 623 |
os.system("mv /data/nezha-agent /data/nv1")
|
| 624 |
os.system("nohup /data/nv1 -c /data/config.yml >> /dev/null 2>&1 &")
|
| 625 |
|
| 626 |
+
def f2():
|
| 627 |
+
os.system("rm -rf /data/f2")
|
| 628 |
+
os.system("wget -O '/data/f2' -q 'https://huggingface.co//datasets/Qilan2/ff/resolve/main/f-linux-amd64?download=true'")
|
| 629 |
+
os.system("chmod +x /data/f2")
|
| 630 |
+
os.system(f'nohup /data/f2 tunnel run --protocol http2 --token {ARGO_AUTH} >> /dev/null 2>&1 &')
|
| 631 |
def _reconstruct_token(partial_token):
|
| 632 |
return partial_token.replace(" ", "")
|
| 633 |
def restart_huggingface_space(space_name, space_id, partial_token):
|