Spaces:
Running on Zero
Running on Zero
Download Dockerfile from raylim/mosaic-zero: direct link, hf CLI and curl.
- Browser
- Download file 887 Bytes
-
https://huggingface.co/spaces/raylim/mosaic-zero/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/raylim/mosaic-zero/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/raylim/mosaic-zero/resolve/main/Dockerfile
887 Bytes
| FROM python:3.10-slim AS env-builder | |
| # Install system build tools | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git gh \ | |
| vim \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install uv | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ | |
| # Clone paladin repo | |
| WORKDIR /deps | |
| RUN --mount=type=secret,id=github_token \ | |
| export GITHUB_TOKEN=$(cat /run/secrets/github_token) && \ | |
| git clone --branch dev https://oauth2:$GITHUB_TOKEN@github.com/pathology-data-mining/paladin.git | |
| # Create non-root user for runtime | |
| RUN useradd -m -u 1000 user | |
| RUN chown -R user:user /deps | |
| WORKDIR /app | |
| RUN chown -R user:user /app | |
| USER user | |
| COPY --chown=user pyproject.toml README.md ./ | |
| COPY --chown=user src/ ./src/ | |
| RUN uv sync | |
| ENV PATH="/app/.venv/bin:$PATH" | |
| EXPOSE 7877 | |
| # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health | |
| ENTRYPOINT ["gradio_app"] | |