Skip to content

fix(docker): ship the hf CLI for "cache to public" jobs - #133

Merged
mangoknight merged 1 commit into
dingodb:mainfrom
mangoknight:fix/docker-hf-cli
Oct 15, 2026
Merged

mangoknight merged 1 commit into
dingodb:mainfrom
mangoknight:fix/docker-hf-cli

Conversation

@mangoknight

@mangoknight mangoknight commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

"Cache to public" runs hf download inside the container (internal/service/task/mount_cache_task.go). The debian:bookworm-slim runtime image has no hf, so every mount failed with exec: "hf": executable file not found in $PATH.

Fix

  • Runtime base python:3.12-slim-bookworm (same Debian base) with pip install huggingface_hub==1.2.3 click typer (1.2.3 does not pull in the CLI's own dependencies).
  • PIP_INDEX_URL build arg (default: a public PyPI mirror) for environments without direct PyPI access.
  • The build runs hf version, so a missing CLI fails the build.
  • Image grows by about 130 MB.

Verification

Full docker build succeeds and hf version prints 1.2.3 in the image; a mount completed with this runtime.

🤖 Generated with Claude Code

The offline instance's mount job runs `hf download` against its own endpoint
to copy a cached repository into the public directory. Since the
bookworm-slim runtime image (2026-10-10), `hf` is missing and every mount
failed with `exec: "hf": executable file not found in $PATH`; only the May
alpine image had it.

Use python:3.12-slim-bookworm (same Debian base) and pip-install
huggingface_hub 1.2.3 with click/typer from a domestic mirror, overridable
via PIP_INDEX_URL. Verified: full docker build succeeds on the internal build
host and the image runs `hf version` (1.2.3); bj-11 mounted cais/mmlu
(181 files) to /mnt/public with this runtime.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cooocy
cooocy self-requested a review October 15, 2026 03:03
@mangoknight
mangoknight added this pull request to the merge queue Oct 15, 2026
Merged via the queue into dingodb:main with commit 2c0b10d Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants