Spaces:
Runtime error
Runtime error
Commit
·
19f7544
1
Parent(s):
982555b
update dockerfile
Browse files- Dockerfile +32 -0
Dockerfile
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.13.5-slim
|
| 2 |
+
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Install system dependencies
|
| 7 |
+
RUN apt-get update && apt-get install -y \
|
| 8 |
+
build-essential \
|
| 9 |
+
curl \
|
| 10 |
+
git \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
# Disable Streamlit telemetry
|
| 14 |
+
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 15 |
+
|
| 16 |
+
# Copy project files (frontend.py and others) into container
|
| 17 |
+
COPY pyproject.toml ./
|
| 18 |
+
COPY frontend.py ./
|
| 19 |
+
COPY model_utils/ ./model_utils/
|
| 20 |
+
COPY data/ ./data/
|
| 21 |
+
|
| 22 |
+
# Install Python dependencies
|
| 23 |
+
RUN pip3 install .
|
| 24 |
+
|
| 25 |
+
# Expose Streamlit's default port
|
| 26 |
+
EXPOSE 8501
|
| 27 |
+
|
| 28 |
+
# Healthcheck for container monitoring
|
| 29 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 30 |
+
|
| 31 |
+
# Start the Streamlit app
|
| 32 |
+
ENTRYPOINT ["streamlit", "run", "frontend.py", "--server.port=8501", "--server.address=0.0.0.0"]
|