Spaces:
Running
Running
Update Dockerfile
Browse files- 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
|
| 19 |
-
COPY
|
| 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 |
-
|
|
|
|
|
|
| 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
|