Spaces:
Runtime error
Runtime error
File size: 725 Bytes
20a1340 39f1cb1 20a1340 6db5220 8cbd526 20a1340 39f1cb1 8cbd526 20a1340 39f1cb1 6db5220 20a1340 6db5220 20a1340 6db5220 20a1340 39f1cb1 8cbd526 6db5220 20a1340 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
FROM python:3.9-slim
# Install required packages
RUN apt-get update && apt-get install -y \
chromium \
chromium-driver \
fonts-dejavu \
libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables for Fontconfig and Matplotlib
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV FONTCONFIG_PATH=/etc/fonts
ENV HOME=/root
# Create Fontconfig cache directory and set permissions
RUN mkdir -p /root/.cache/fontconfig && chmod -R 777 /root/.cache/fontconfig
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . /app
WORKDIR /app
# Generate Fontconfig cache
RUN fc-cache -f -v
# Run application
CMD ["python", "app.py"] |