Files
sunnypilot/scripts
Harald Schäfer 493ae5ad0e Replace Git LFS with a custom Hugging Face bucket client (#39206)
* Replace Git LFS with a custom Hugging Face bucket client

* Address review findings in the custom LFS client

- A failed download leaves the pointer (also for delayed blobs) and
  filter.lfs.required is false, so git commands finish and ./lfs.py pull
  fills the files in later.
- install() also replaces the unquoted pre-push hook from #38775 and a stock
  git-lfs hook that `op post-commit` moved into post-commit.d.
- .git/lfs.py and the pre-push hook are replaced atomically.
- Pushing LFS objects without a token prints a one-line hint.
- op warns when the installed LFS client is missing or outdated.
- Ranged downloads write into one preallocated file instead of
  concatenating parts.
- hf-xet moves from the core dependencies to the tools extra.

* Drop the ~/.local/bin PATH addition left from the uv-run transfer agent

* Keep filter.lfs.required so a broken LFS client can't commit raw files

* Keep shipping .lfsconfig only with the big model

* Keep a custom pre-push hook instead of failing the LFS pull

* Let the setup clone use the configured LFS client

The HF LFS repo is mirrored from the bucket, so stock Git LFS can smudge the clone.

* Keep git working without python3 with an sh LFS filter

scripts/lfs-filter runs lfs.py, or without python3 has git abort LFS filtering and keep the pointer files, like the git-lfs shim did. A process filter that can't start otherwise makes git fail regardless of filter.lfs.required. The abort only lets git continue when the filter isn't required.

* Drop the sh LFS filter and require the LFS filter again

lfs.py lives in the git dir and only needs python3, so a missing or rebuilt
venv, or a worktree without one, can't break git like the old git-lfs shim
guarded against. The sh fallback for a machine without python3 needed
filter.lfs.required=false, which also let a failing clean commit the raw file.

This reverts commit 437711998981c8c7bf65c2878881c547516d681a.
2026-11-04 18:40:27 -08:00
..
2020-01-17 10:41:41 -08:00
2026-06-21 18:28:35 -07:00
2024-12-04 15:34:54 -08:00