Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -11
Dockerfile
CHANGED
|
@@ -2,30 +2,32 @@ FROM python:3.9-slim
|
|
| 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 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
-
HEALTHCHECK CMD curl --fail http://localhost:8050 || exit 1
|
| 29 |
|
| 30 |
-
|
| 31 |
-
CMD ["python", "src/streamlit_app.py"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Set the timezone to Central European Time
|
| 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 |
RUN apt-get update && apt-get install -y \
|
| 13 |
build-essential \
|
| 14 |
curl \
|
| 15 |
+
software-properties-common \
|
| 16 |
git \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
|
|
|
|
| 19 |
COPY requirements.txt ./
|
| 20 |
COPY src/ ./src/
|
| 21 |
|
| 22 |
+
RUN pip3 install -r requirements.txt
|
| 23 |
+
|
| 24 |
+
EXPOSE 8501
|
| 25 |
+
|
| 26 |
+
ENV HOME=/app
|
| 27 |
|
| 28 |
+
# Create submissions directory
|
| 29 |
+
RUN mkdir -p /app/submissions
|
| 30 |
|
| 31 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
|
|
|
| 32 |
|
| 33 |
+
ENTRYPOINT ["panel", "serve", "src/streamlit_app.py", "--address=0.0.0.0", "--port=8501"]
|
|
|