Repository navigation
fix(docker): ship the hf CLI for "cache to public" jobs - #133
Merged
Merged
Conversation
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
self-requested a review
October 15, 2026 03:03
cooocy
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
"Cache to public" runs
hf downloadinside the container (internal/service/task/mount_cache_task.go). Thedebian:bookworm-slimruntime image has nohf, so every mount failed withexec: "hf": executable file not found in $PATH.Fix
python:3.12-slim-bookworm(same Debian base) withpip install huggingface_hub==1.2.3 click typer(1.2.3 does not pull in the CLI's own dependencies).PIP_INDEX_URLbuild arg (default: a public PyPI mirror) for environments without direct PyPI access.hf version, so a missing CLI fails the build.Verification
Full
docker buildsucceeds andhf versionprints 1.2.3 in the image; a mount completed with this runtime.🤖 Generated with Claude Code