Update app3.py
Browse files
app3.py
CHANGED
@@ -159,9 +159,9 @@ def check_service(host, port):
|
|
159 |
except socket.error:
|
160 |
return False
|
161 |
def localProxy():
|
162 |
-
os.system('
|
163 |
download_file('https://huggingface.co/datasets/ACCA225/openxlab/resolve/main/proxy_nginx.conf', os.path.join(base_directory, 'proxy_nginx.conf'))
|
164 |
-
run(f'''
|
165 |
|
166 |
|
167 |
import os
|
@@ -179,10 +179,10 @@ def start():
|
|
179 |
print(f"proxy 启动时发生重大错误: {e}")
|
180 |
try:
|
181 |
#安装环境
|
182 |
-
os.system(f"python launch.py --
|
183 |
#time.sleep(5)
|
184 |
|
185 |
-
command = "python launch.py --api --
|
186 |
|
187 |
|
188 |
process = subprocess.Popen(command, shell=True)
|
|
|
159 |
except socket.error:
|
160 |
return False
|
161 |
def localProxy():
|
162 |
+
os.system('apt install nginx -y')
|
163 |
download_file('https://huggingface.co/datasets/ACCA225/openxlab/resolve/main/proxy_nginx.conf', os.path.join(base_directory, 'proxy_nginx.conf'))
|
164 |
+
run(f'''nginx -c /home/xlab-app-center/stable-diffusion-webui/proxy_nginx.conf''')
|
165 |
|
166 |
|
167 |
import os
|
|
|
179 |
print(f"proxy 启动时发生重大错误: {e}")
|
180 |
try:
|
181 |
#安装环境
|
182 |
+
os.system(f"python launch.py --skip-torch-cuda-test --use-cpu=True --no-half --api --exit --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle")
|
183 |
#time.sleep(5)
|
184 |
|
185 |
+
command = "python launch.py --api --skip-torch-cuda-test --use-cpu=True --no-half --ui-settings-file /home/xlab-app-center/config.json --ui-config-file /home/xlab-app-center/ui-config.json --gradio-queue --disable-safe-unpickle"
|
186 |
|
187 |
|
188 |
process = subprocess.Popen(command, shell=True)
|