Spaces:
Sleeping
Sleeping
Download Dockerfile from pardeep-singh/reading-list: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/spaces/pardeep-singh/reading-list/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/pardeep-singh/reading-list/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/pardeep-singh/reading-list/resolve/main/Dockerfile
793 Bytes
| # Hugging Face Docker Space image for the Reading List app. | |
| FROM python:3.12-slim | |
| COPY --from=ghcr.io/astral-sh/uv:0.8.14 /uv /uvx /bin/ | |
| # HF Spaces run containers as uid 1000. | |
| RUN useradd --create-home --uid 1000 user \ | |
| && mkdir /home/user/app && chown user:user /home/user/app | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/app/.venv/bin:$PATH \ | |
| UV_COMPILE_BYTECODE=1 \ | |
| UV_LINK_MODE=copy \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR /home/user/app | |
| # Dependency layer: cached until pyproject.toml / uv.lock change. | |
| COPY --chown=user pyproject.toml uv.lock .python-version ./ | |
| RUN uv sync --frozen --no-dev --no-install-project | |
| # App code. | |
| COPY --chown=user app ./app | |
| RUN uv sync --frozen --no-dev | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |