FROM python:3.10 # Set working directory WORKDIR /app # Copy and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app files COPY . . # Set Hugging Face cache to writable temp directory ENV TRANSFORMERS_CACHE=/tmp/hf_cache ENV HF_HOME=/tmp/hf_cache # Expose port (matches your app) EXPOSE 7860 # Use Gunicorn for production with 2 workers CMD ["gunicorn", "--workers", "2", "--bind", "0.0.0.0:7860", "app:app"]