SamuelLance73 commited on
Commit
09df52d
·
verified ·
1 Parent(s): 9f91950

Automated deployment update from ML build

Browse files
Files changed (1) hide show
  1. services/open_webui_service.py +3 -3
services/open_webui_service.py CHANGED
@@ -5,6 +5,6 @@ LOG_PATH=os.path.join(METRICS_DIR,'open_webui.log')
5
  PORT=3000
6
  PREFIX='[open-webui]'
7
  def start():
8
- E='/opt/venv-openwebui/bin/open-webui';D='DATA_DIR';C='none';os.makedirs(METRICS_DIR,exist_ok=True);A=os.environ.copy();A['OPENAI_API_BASE_URL']='http://127.0.0.1:8080/v1';A['OPENAI_API_KEY']=A.get('LITELLM_MASTER_KEY',C)or C;A['WEBUI_AUTH']='False';A.setdefault('WEBUI_SECRET_KEY','sanctuary_owui_secret_key_server01');A.setdefault('OAUTH_SESSION_TOKEN_ENCRYPTION_KEY','sanctuary_owui_oauth_token_key_server01_32bytes');A[D]=os.path.join(METRICS_DIR,'open_webui_data');os.makedirs(A[D],exist_ok=True);from pathlib import Path;F=E if Path(E).exists()else'open-webui';G=[F,'serve','--host','127.0.0.1','--port',str(PORT)];logger.info(f"{PREFIX} Starting Open WebUI on 127.0.0.1:{PORT}...")
9
- with open(LOG_PATH,'a')as B:H=subprocess.Popen(G,stdout=B,stderr=B,env=A)
10
- logger.success(f"{PREFIX} Open WebUI started (pid {H.pid}). Reachable at http://127.0.0.1:{PORT} exclusively over Tailscale / private overlay networks.")
 
5
  PORT=3000
6
  PREFIX='[open-webui]'
7
  def start():
8
+ F='/opt/venv-openwebui/bin/open-webui';E='DATA_DIR';D='none';B='127.0.0.1';os.makedirs(METRICS_DIR,exist_ok=True);A=os.environ.copy();A['OPENAI_API_BASE_URL']='http://127.0.0.1:8080/v1';A['OPENAI_API_KEY']=A.get('LITELLM_MASTER_KEY',D)or D;A['WEBUI_AUTH']='False';A.setdefault('WEBUI_SECRET_KEY','sanctuary_owui_secret_key_server01');A.setdefault('OAUTH_SESSION_TOKEN_ENCRYPTION_KEY','sanctuary_owui_oauth_token_key_server01_32bytes');A[E]=os.path.join(METRICS_DIR,'open_webui_data');os.makedirs(A[E],exist_ok=True);A['PORT']=str(PORT);A['HOST']=B;A['UVICORN_HOST']=B;A['UVICORN_PORT']=str(PORT);from pathlib import Path;G=F if Path(F).exists()else'open-webui';H=[G,'serve','--host',B,'--port',str(PORT)];logger.info(f"{PREFIX} Starting Open WebUI on 127.0.0.1:{PORT}...")
9
+ with open(LOG_PATH,'a')as C:I=subprocess.Popen(H,stdout=C,stderr=C,env=A)
10
+ logger.success(f"{PREFIX} Open WebUI started (pid {I.pid}). Reachable at http://127.0.0.1:{PORT} exclusively over Tailscale / private overlay networks.")