Spaces:
Build error
Build error
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy source code | |
| COPY . /app | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=8000 | |
| ENV WORKERS=1 | |
| ENV MAX_CONCURRENT_ENVS=16 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ | |
| CMD curl -f http://localhost:${PORT}/health || exit 1 | |
| # Run FastAPI app | |
| EXPOSE ${PORT} | |
| ENV ENABLE_WEB_INTERFACE=true | |
| CMD ["python", "-m", "server.app"] | |