Remsky commited on
Commit
7b63696
·
verified ·
1 Parent(s): d5d6793

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -10,7 +10,12 @@ ENV ONNX_NUM_THREADS=2
10
  ENV ONNX_INTER_OP_THREADS=1
11
  ENV VOICE_CACHE_SIZE=1
12
 
 
 
 
 
 
13
  EXPOSE 7860
14
 
15
- # Run FastAPI directly on port 7860
16
- CMD ["uv", "run", "python", "-m", "uvicorn", "api.src.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
10
  ENV ONNX_INTER_OP_THREADS=1
11
  ENV VOICE_CACHE_SIZE=1
12
 
13
+ # Create startup script that mounts web UI at root
14
+ USER root
15
+ RUN echo 'from api.src.main import app; from fastapi.staticfiles import StaticFiles; app.mount("/", StaticFiles(directory="/app/web", html=True), name="web"); import uvicorn; uvicorn.run(app, host="0.0.0.0", port=7860)' > /start.py
16
+ USER appuser
17
+
18
  EXPOSE 7860
19
 
20
+ # Run FastAPI with web UI at root
21
+ CMD ["python", "/start.py"]