training-monkey/dataoncallenv
0
1# Dockerfile2# HuggingFace Spaces runs this container.3# Must expose port 7860 — that's the HF default.4 5FROM python:3.11-slim6 7# Set working directory inside the container8WORKDIR /app9 10# Copy requirements first — Docker caches this layer11# so rebuilds are fast if only your code changed12COPY requirements.txt .13RUN pip install --no-cache-dir -r requirements.txt14 15# Copy all project files16COPY . .17 18# HuggingFace Spaces expects port 786019EXPOSE 786020 21# Start the FastAPI server22# --host 0.0.0.0 makes it accessible outside the container23# --port 7860 matches what HF expects24ENV ENABLE_WEB_INTERFACE=true25CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860"]