tiffany101 commited on
Commit
fe76c13
·
verified ·
1 Parent(s): 2f0ab95

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,12 +1,14 @@
1
  FROM python:3.11-slim
 
2
  WORKDIR /app
 
3
  COPY requirements.txt .
4
- RUN pip install -r requirements.txt
5
 
6
  COPY . .
7
 
8
- # Start both FastAPI and Streamlit
9
- CMD bash -c "uvicorn app.api_fastapi:app --host 0.0.0.0 --port 8000 & \
10
- sleep 5 && \
11
- streamlit run app/app_chat.py --server.port=7860 --server.address=0.0.0.0"
12
 
 
 
 
1
  FROM python:3.11-slim
2
+
3
  WORKDIR /app
4
+
5
  COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  COPY . .
9
 
10
+ # Spaces expect Streamlit on port 7860
11
+ EXPOSE 7860
 
 
12
 
13
+ # Start Streamlit only
14
+ CMD ["streamlit", "run", "app/app_chat.py", "--server.port=7860", "--server.address=0.0.0.0"]