FROM python:3.11-slim WORKDIR /app ENV HF_HOME=/app/.cache/huggingface ENV HUGGINGFACE_HUB_CACHE=/app/.cache/huggingface/hub ENV TMPDIR=/app/.cache/tmp RUN mkdir -p /app/.cache/huggingface/hub /app/.cache/tmp COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 7860 CMD ["python", "app.py"]