FROM python:3.10-slim WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Create directory for HF cache to ensure it's writable ENV HF_HOME=/app/.cache/huggingface RUN mkdir -p /app/.cache/huggingface && chmod 777 /app/.cache/huggingface # Run application on port 7860 (Hugging Face Spaces default) CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]