FROM python:3.10-slim WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy source code COPY app.py . RUN mkdir -p /app/cache # Set env vars to avoid permission issues and suppress deprecation warnings ENV HF_HOME=/app/cache \ PYTHONUNBUFFERED=1 # ENV HF_HOME=/tmp/.cache EXPOSE 7860 CMD ["python", "app.py"]