ktejeshnaidu commited on
Commit
463568d
·
verified ·
1 Parent(s): 8cbbd4c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -15,8 +15,12 @@ RUN pip install --no-cache-dir -r requirements.txt
15
  # Copy application files
16
  COPY . .
17
 
18
- # Expose ports
19
- EXPOSE 8501 8000
20
 
21
- # Run Streamlit app
22
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
 
 
 
15
  # Copy application files
16
  COPY . .
17
 
18
+ # HuggingFace Spaces requires port 7860
19
+ EXPOSE 7860
20
 
21
+ # Start FastAPI backend on 8000 (background) + Streamlit on 7860 (foreground)
22
+ CMD uvicorn main:app --host 0.0.0.0 --port 8000 & \
23
+ streamlit run app.py \
24
+ --server.port=7860 \
25
+ --server.address=0.0.0.0 \
26
+ --server.headless=true