FROM python:3.9-slim WORKDIR /app COPY requirements.txt requirements.txt RUN pip install --no-cache-dir -r requirements.txt COPY . . # Create a directory for permissions if needed (HF Spaces run as user 1000) RUN mkdir -p /app/data && chmod -R 777 /app/data EXPOSE 7860 CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]