Download Dockerfile from MGZON/Veltrix: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/MGZON/Veltrix/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/MGZON/Veltrix/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/MGZON/Veltrix/resolve/main/Dockerfile
1.09 kB
| FROM python:3.12-slim AS base | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=7860 \ | |
| DEBIAN_FRONTEND=noninteractive | |
| # System dependencies for WeasyPrint and Arabic RTL fonts | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libpango-1.0-0 \ | |
| libpangoft2-1.0-0 \ | |
| libpangocairo-1.0-0 \ | |
| libharfbuzz0b \ | |
| libffi-dev \ | |
| libjpeg62-turbo \ | |
| libopenjp2-7 \ | |
| libcairo2 \ | |
| libgdk-pixbuf-2.0-0 \ | |
| shared-mime-info \ | |
| fontconfig \ | |
| fonts-noto-core \ | |
| fonts-noto-cjk \ | |
| fonts-noto-color-emoji \ | |
| fonts-hosny-amiri \ | |
| curl \ | |
| && fc-cache -f \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application | |
| COPY app.py . | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ | |
| CMD curl -f http://127.0.0.1:${PORT}/health || exit 1 | |
| # Start application | |
| CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT} --workers 2"] |