FROM python:3.9-slim WORKDIR /app ENV MPLCONFIGDIR=/tmp/.config/matplotlib RUN mkdir -p $MPLCONFIGDIR COPY app.py /app COPY requirements.txt /app RUN pip install --no-cache-dir -r requirements.txt EXPOSE 7860 CMD ["python", "app.py"]