FROM python:3.10-slim # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ git \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements and install Python deps COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY . . # Expose FastAPI on port 7860 EXPOSE 7860 # Set env to disable numba caching (prevents UMAP error) ENV NUMBA_DISABLE_JIT=1 # Disable cache (prevents UMAP error) ENV NUMBA_DISABLE_CACHE=1 # Run the FastAPI app with uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]