Spaces:
Sleeping
Sleeping
Download Dockerfile from AnesKAM/Genisi: direct link, hf CLI and curl.
- Browser
- Download file 940 Bytes
-
https://huggingface.co/spaces/AnesKAM/Genisi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AnesKAM/Genisi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AnesKAM/Genisi/resolve/main/Dockerfile
940 Bytes
| FROM python:3.11-slim-bookworm | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=7860 \ | |
| HOME=/home/user \ | |
| CODEX_DOCKER=0 | |
| # System fonts / PDF dependencies. Docker-in-Docker is deliberately not installed. | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b libharfbuzz-subset0 \ | |
| libffi8 libjpeg62-turbo libopenjp2-7 fonts-noto-core fonts-dejavu-core \ | |
| ca-certificates tzdata \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && useradd --create-home --uid 1000 user | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user:user main.py ./main.py | |
| COPY --chown=user:user static/ ./static/ | |
| RUN mkdir -p /app/workspace && chown -R user:user /app/workspace | |
| USER user | |
| EXPOSE 7860 | |
| # One worker: in-flight request guards / rate limits are process-local. | |
| CMD ["python", "main.py"] | |