Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| # Set up user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Set working directory | |
| WORKDIR /app | |
| # Upgrade pip and install requirements | |
| COPY --chown=user backend/requirements.txt ./requirements.txt | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| # Copy the full project code (backend and data) | |
| COPY --chown=user . . | |
| # Expose default FastAPI port | |
| EXPOSE 7860 | |
| # Run FastAPI app | |
| CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |