Joshua Sears commited on
Commit
0390acb
·
1 Parent(s): 23a2fcd

Fix HF Spaces: run Streamlit on port 7860

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -4
  2. docker-compose.yml +1 -0
Dockerfile CHANGED
@@ -18,8 +18,8 @@ COPY . .
18
  # Create data directory for ChromaDB persistence
19
  RUN mkdir -p /app/data/chroma_db
20
 
21
- # Expose FastAPI port
22
- EXPOSE 8000
23
 
24
- # Default: run API server
25
- CMD ["python", "main.py", "serve", "--host", "0.0.0.0", "--port", "8000"]
 
18
  # Create data directory for ChromaDB persistence
19
  RUN mkdir -p /app/data/chroma_db
20
 
21
+ # HF Spaces requires port 7860
22
+ EXPOSE 7860
23
 
24
+ # Default: Streamlit demo (HF Spaces). docker-compose overrides this for local API use.
25
+ CMD ["streamlit", "run", "hf_space/app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
docker-compose.yml CHANGED
@@ -3,6 +3,7 @@ version: "3.9"
3
  services:
4
  rag-api:
5
  build: .
 
6
  ports:
7
  - "8000:8000"
8
  volumes:
 
3
  services:
4
  rag-api:
5
  build: .
6
+ command: ["python", "main.py", "serve", "--host", "0.0.0.0", "--port", "8000"]
7
  ports:
8
  - "8000:8000"
9
  volumes: