Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -15
Dockerfile
CHANGED
|
@@ -2,34 +2,30 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Set
|
| 6 |
ENV TZ=Europe/Paris
|
| 7 |
-
|
| 8 |
-
# Install tzdata to apply timezone config
|
| 9 |
RUN apt-get update && apt-get install -y tzdata && \
|
| 10 |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
| 11 |
|
| 12 |
-
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
build-essential \
|
| 15 |
curl \
|
| 16 |
-
software-properties-common \
|
| 17 |
git \
|
| 18 |
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
|
|
|
|
| 20 |
COPY requirements.txt ./
|
| 21 |
COPY src/ ./src/
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
EXPOSE 8501
|
| 26 |
-
|
| 27 |
-
ENV HOME=/app
|
| 28 |
-
ENV STREAMLIT_HOME=/app/.streamlit
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
|
| 32 |
|
| 33 |
-
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Set timezone
|
| 6 |
ENV TZ=Europe/Paris
|
|
|
|
|
|
|
| 7 |
RUN apt-get update && apt-get install -y tzdata && \
|
| 8 |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
| 9 |
|
| 10 |
+
# Install system dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
build-essential \
|
| 13 |
curl \
|
|
|
|
| 14 |
git \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
+
# Copy source code
|
| 18 |
COPY requirements.txt ./
|
| 19 |
COPY src/ ./src/
|
| 20 |
|
| 21 |
+
# Install Python dependencies
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
# Expose Dash default port
|
| 25 |
+
EXPOSE 8050
|
| 26 |
|
| 27 |
+
# Healthcheck (adjust endpoint as needed for your Dash app)
|
| 28 |
+
HEALTHCHECK CMD curl --fail http://localhost:8050 || exit 1
|
| 29 |
|
| 30 |
+
# Start the Dash app
|
| 31 |
+
CMD ["python", "src/streamlit_app.py"]
|