Download brain/Dockerfile from MouleeswaranM/FairRelay: direct link, hf CLI and curl.
- Browser
- Download file 690 Bytes
-
https://huggingface.co/MouleeswaranM/FairRelay/resolve/main/brain/Dockerfile
- Command line
-
hf download hf://MouleeswaranM/FairRelay/brain/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/MouleeswaranM/FairRelay/resolve/main/brain/Dockerfile
690 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for layer caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Create data directory for SQLite fallback (writable) | |
| RUN mkdir -p /app/data && chmod 777 /app/data | |
| # Create non-root user | |
| RUN useradd --create-home appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 8000 | |
| # Use uvicorn directly for better async support | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] | |