Spaces:
Sleeping
Sleeping
Download Dockerfile from EAT-Prototypes/jellyscope: direct link, hf CLI and curl.
- Browser
- Download file 1.78 kB
-
https://huggingface.co/spaces/EAT-Prototypes/jellyscope/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/EAT-Prototypes/jellyscope/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/EAT-Prototypes/jellyscope/resolve/main/Dockerfile
1.78 kB
| FROM node:22-slim AS assets | |
| WORKDIR /ui | |
| COPY frontend/package.json frontend/package-lock.json ./ | |
| RUN npm ci | |
| COPY frontend/ ./ | |
| # Emits hashed bundle + manifest into ../src/... per vite.config outDir; we | |
| # redirect it into a local dist and copy it explicitly below. | |
| RUN npm run build -- --outDir dist --emptyOutDir | |
| FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS builder | |
| ENV UV_COMPILE_BYTECODE=1 \ | |
| UV_LINK_MODE=copy \ | |
| UV_PYTHON_DOWNLOADS=never | |
| WORKDIR /app | |
| COPY pyproject.toml uv.lock README.md ./ | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| uv sync --frozen --no-install-project --no-dev | |
| COPY src ./src | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| uv sync --frozen --no-dev | |
| FROM python:3.13-slim AS runtime | |
| ARG JELLYSCOPE_VERSION=dev | |
| LABEL org.opencontainers.image.version="${JELLYSCOPE_VERSION}" | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PATH="/app/.venv/bin:$PATH" \ | |
| HF_HOME=/home/jellyscope/.cache/huggingface | |
| RUN groupadd --system --gid 1000 jellyscope \ | |
| && useradd --system --uid 1000 --gid jellyscope --create-home --shell /usr/sbin/nologin jellyscope | |
| WORKDIR /app | |
| COPY --from=builder --chown=jellyscope:jellyscope /app/.venv /app/.venv | |
| COPY --from=builder --chown=jellyscope:jellyscope /app/src /app/src | |
| # Built frontend bundle from the Node stage. | |
| COPY --from=assets --chown=jellyscope:jellyscope /ui/dist /app/src/jellyscope/web/static/dist | |
| RUN mkdir -p /data && chown -R jellyscope:jellyscope /data | |
| USER jellyscope | |
| EXPOSE 5000 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/').read()" | |
| ENTRYPOINT ["jellyscope"] | |
| CMD ["--host", "0.0.0.0", "--port", "5000", "--data-dir", "/data"] | |