Commit c28d618
Document reusing image-baked libraries with hf jobs uv run (#2517)
* Document reusing image-baked libraries with `hf jobs uv run`
Add a "Reusing image-baked libraries with uv run" section to the Popular Images
page. By default `hf jobs uv run` resolves a script's dependencies from PyPI and
does not use the libraries already in the image; for images that ship prebuilt,
CUDA-matched builds (vLLM, PyTorch, FlashInfer) you usually want to reuse them
via `--python` + `PYTHONPATH`.
The section covers:
- the two-flag recipe, with vLLM as the worked example
- a cpu-basic probe to discover the interpreter / site-packages paths per image
- the `RuntimeError: Could not find nvcc` symptom (FlashInfer JIT) as one example
- that this applies only to `uv run`, not generic `hf jobs run`, plus the upstream
uv issue (astral-sh/uv#7999)
Also adds a short cross-link tip in the vLLM section.
* Move image-baked libraries section to bottom, add top warning
Address review: relocate the detailed "Reusing image-baked libraries
with uv run" section to the end of the page, and add a warning callout
near the top so the naive `hf jobs uv run` failure mode is flagged
before the framework list.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Reframe around using a framework image; demote Python-package reuse
GPU-tested the claims on HF Jobs (l4x1/a100, Qwen2.5-0.5B):
- Reproduced `Could not find nvcc` ONLY on the default uv image
(no CUDA toolkit). With --image vllm/vllm-openai it works, because
the image provides nvcc + the CUDA system stack.
- So the real fix is using the framework image, not the --python +
PYTHONPATH recipe; "usually all you need" is just --image.
- Reuse via PYTHONPATH does not skip the PyPI install (same ~3.5GB
downloaded), so it's not a speed-up — demoted to an optional
sub-section for ABI/CUDA-mismatch cases.
Lead the section with the system-stack point and the nvcc repro;
keep the probe (paths/uv vary per image, verified across vLLM, sglang,
unsloth, trl, transformers, axolotl).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Apply suggestion from @davanstrien
* Apply suggestion from @davanstrien
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ce1364d commit c28d618
1 file changed
Lines changed: 74 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
0 commit comments