Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
@@ -1,13 +1,17 @@
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
-
# Install
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
chromium \
|
6 |
chromium-driver \
|
|
|
|
|
7 |
&& rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
-
# Set environment variables for
|
10 |
-
ENV
|
|
|
|
|
11 |
|
12 |
# Install Python dependencies
|
13 |
COPY requirements.txt .
|
@@ -17,5 +21,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
17 |
COPY . /app
|
18 |
WORKDIR /app
|
19 |
|
|
|
|
|
|
|
20 |
# Run application
|
21 |
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
+
# Install dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
chromium \
|
6 |
chromium-driver \
|
7 |
+
fonts-dejavu \
|
8 |
+
libfontconfig1 \
|
9 |
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
+
# Set environment variables for Matplotlib & Fontconfig
|
12 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib
|
13 |
+
ENV FONTCONFIG_PATH=/etc/fonts
|
14 |
+
ENV HOME=/root
|
15 |
|
16 |
# Install Python dependencies
|
17 |
COPY requirements.txt .
|
|
|
21 |
COPY . /app
|
22 |
WORKDIR /app
|
23 |
|
24 |
+
# Create Fontconfig cache (optional)
|
25 |
+
RUN mkdir -p /root/.cache/fontconfig && fc-cache -f -v
|
26 |
+
|
27 |
# Run application
|
28 |
CMD ["python", "app.py"]
|