# Use a lightweight Python base image FROM python:3.9-slim # Set the working directory WORKDIR /app # <<< ADD THIS LINE >>> # Disable Numba caching to prevent runtime errors in certain environments ENV NUMBA_DISABLE_CACHE=1 # Copy all files into the container COPY . . # Install dependencies # Consider pinning versions in requirements.txt for reproducibility RUN pip install --no-cache-dir -r requirements.txt # Expose the port (Hugging Face Spaces uses 7860 by default) EXPOSE 7860 # Run the app with Gunicorn CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]