Fix excessive disk usage from redundant .cache dirs in local provider runs#1610
Fix excessive disk usage from redundant .cache dirs in local provider runs#1610
Conversation
… runs Set HF_HOME and XDG_CACHE_HOME to the real user's cache directories so that Hugging Face models and other cached assets are shared across job runs instead of being re-downloaded into each job's remapped HOME. Fixes #1604
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Paragon SummaryThis pull request review analyzed 1 file and found no issues. The review examined code changes, potential bugs, security vulnerabilities, performance issues, and code quality concerns using automated analysis tools. Paragon did not detect any problems in the current diff. Proceed with merge after your normal checks. This PR fixes excessive disk usage by configuring local provider jobs to share the host user's Hugging Face and XDG cache directories instead of creating redundant per-job caches that require re-downloading large model files for each run. Key changes:
Confidence score: 5/5
1 file reviewed, 0 comments Tip: |
Summary
HF_HOMEandXDG_CACHE_HOMEto the real user's cache directories when launching local provider jobs, so Hugging Face models and other cached assets are shared across runs instead of being re-downloaded into each job's remappedHOME.UV_CACHE_DIRwas already shared; this closes the gap for HF and XDG caches.setdefaultso explicit user overrides viaconfig.env_varsstill take precedence.Fixes #1604
Test plan
local_provider_runs/<job_id>/workspace/.cacheis no longer created with large HF model files~/.cache/huggingfaceHF_HOMEexplicitly in env_vars still overrides the default