absiitr commited on
Commit
c0dd4f4
·
verified ·
1 Parent(s): c0e1610

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -19
Dockerfile CHANGED
@@ -11,28 +11,13 @@ RUN apt-get update && apt-get install -y \
11
 
12
  # Copy requirements
13
  COPY requirements.txt .
14
-
15
- # Install Python packages
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy all application files
19
- COPY backend.py .
20
- COPY app.py .
21
-
22
- # Create entrypoint script
23
- RUN echo '#!/bin/bash\n\
24
- # Start FastAPI backend\n\
25
- python -m uvicorn backend:app --host 0.0.0.0 --port 8000 &\n\
26
- # Wait for backend to start\n\
27
- sleep 3\n\
28
- # Start Streamlit frontend\n\
29
- streamlit run app.py --server.port 7860 --server.address 0.0.0.0\n\
30
- ' > /app/entrypoint.sh
31
-
32
- RUN chmod +x /app/entrypoint.sh
33
 
34
  # Hugging Face Spaces uses port 7860
35
  EXPOSE 7860
36
- EXPOSE 8000
37
 
38
- CMD ["/app/entrypoint.sh"]
 
 
11
 
12
  # Copy requirements
13
  COPY requirements.txt .
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy application files
17
+ COPY . .
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  # Hugging Face Spaces uses port 7860
20
  EXPOSE 7860
 
21
 
22
+ # Use this startup command
23
+ CMD streamlit run app.py --server.port 7860 --server.address 0.0.0.0