FROM python:3.11-slim WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ git \ curl \ && rm -rf /var/lib/apt/lists/* # Install Node.js for building frontend RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get install -y nodejs && \ rm -rf /var/lib/apt/lists/* # Copy all source files first COPY . . # Install Python dependencies RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt && \ pip install --no-cache-dir -r backend/requirements.txt # Build frontend RUN cd frontend && npm ci && npm run build ENV PYTHONPATH=/app ENV UVMGEN_OUTPUT_DIR=/tmp/uvmgen_output EXPOSE 7860 CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--log-level", "info"]