FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . # HF Spaces expects the app to listen on 7860 ENV PORT=7860 EXPOSE 7860 # Point CACHE_DIR at /data if you enable Persistent Storage on the Space, # otherwise the cache resets every time the Space restarts/sleeps. ENV CACHE_DIR=/data/cache CMD ["python", "app.py"]