Download Dockerfile from False45/math-api: direct link, hf CLI and curl.
- Browser
- Download file 694 Bytes
-
https://huggingface.co/spaces/False45/math-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/False45/math-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/False45/math-api/resolve/main/Dockerfile
694 Bytes
| # Build stage | |
| FROM python:3.11-slim as builder | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --user --no-cache-dir -r requirements.txt | |
| # Run stage | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Copy dependencies from builder | |
| COPY --from=builder /root/.local /root/.local | |
| ENV PATH=/root/.local/bin:$PATH | |
| # Copy application code | |
| COPY src /app/backend/src | |
| # Copy knowledge base for quiz parsing | |
| COPY knowledge-base /app/knowledge-base | |
| # Set environment variables | |
| ENV PYTHONPATH=/app | |
| ENV ENVIRONMENT=production | |
| # Cloud Run injects PORT, but default to 8080 | |
| ENV PORT=8080 | |
| EXPOSE $PORT | |
| # Start FastAPI application | |
| CMD ["sh", "-c", "uvicorn backend.src.main:app --host 0.0.0.0 --port ${PORT}"] | |