Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
# Use Python 3.9 slim image as base
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
@@ -43,5 +47,5 @@ ENV STREAMLIT_SERVER_PORT=7860
|
|
| 43 |
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 44 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 45 |
|
| 46 |
-
# Command to run the application
|
| 47 |
-
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]
|
|
|
|
| 1 |
# Use Python 3.9 slim image as base
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Install tini for proper signal handling and process reaping
|
| 5 |
+
# This is crucial for ensuring Streamlit stays alive as the main process
|
| 6 |
+
RUN apt-get update && apt-get install -y tini && rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
# Set working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
|
|
|
| 47 |
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 48 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 49 |
|
| 50 |
+
# Command to run the application using tini
|
| 51 |
+
CMD ["/usr/bin/tini", "--", "streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]
|