Spaces:
Sleeping
Sleeping
| # Use official Python image | |
| FROM python:3.9 | |
| # Create non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Set working dir | |
| WORKDIR /app | |
| # Install requirements | |
| COPY --chown=user requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy project files | |
| COPY --chown=user . . | |
| # Run FastAPI app | |
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |