Skip to content

os/v3/puppy: keep downloaded models on /data (HF_HOME), not in RAM - #3290

Merged
bong-water-water-bong merged 1 commit into
mainfrom
os/hf-home-on-data
Nov 22, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
os/hf-home-on-data

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Part of #3287.

What happened on the board (v2026.47, 2026-11-22): 10lemonade keeps Lemonade's cache and config on /data/lemonade/{cache,config}, but Lemonade downloads models through the Hugging Face cache. With no HF_HOME that is $HOME/.cache/huggingface, and HOME=/ in the init, so on the live stick the demo models went to RAM (/.cache/huggingface, 4 GB within minutes) and a reboot would have erased them. The night's workaround was an export HF_HOME=… line in /data/lemonade/lemond.conf.

Change: after the data-contract block, export HF_HOME="${HF_HOME:-$LEM/huggingface}" + mkdir -p. With a data partition that is /data/lemonade/huggingface (the path the release check's hrx-placement row already looks under); without one it stays in RAM, which the script already announces. A value set in lemond.conf (sourced earlier) still wins, so the night's workaround keeps working.

Verified: sh -n clean; on the installed appliance the same setting (via lemond.conf) kept the three demo models and the 27B across reboots.

🤖 Generated with Claude Code

…ngine#3287)

10lemonade puts Lemonade's cache and config on /data/lemonade, but Lemonade downloads models through the
Hugging Face cache, and with no HF_HOME that is $HOME/.cache/huggingface. HOME=/ in the init, so on the
live stick the v2026.47 board run downloaded its demo models into RAM and a reboot would have erased them.
HF_HOME now defaults to $LEM/huggingface (/data/lemonade/huggingface with a data partition, which is also
where the release check's hrx-placement row looks); a value set in lemond.conf still wins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

3287 - Fully compliant

Compliant requirements:

  • Models download into RAM on the live stick. 10lemonade keeps Lemonade's cache and config on /data/lemonade/{cache,config} but sets no HF_HOME, so model downloads land in $HOME/.cache/huggingface (HOME=/, RAM) and vanish on reboot. Fix: export HF_HOME=/data/lemonade/huggingface in 10lemonade when /data is mounted.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

HF_HOME default path

The default path for HF_HOME is set to $LEM/huggingface, which assumes that $LEM is always set to /data/lemonade when a data partition exists. If the logic for determining $LEM changes in the future, this could lead to models being downloaded to an unexpected location or potentially in RAM if $LEM resolves to a path that doesn't persist across reboots.

export HF_HOME="${HF_HOME:-$LEM/huggingface}"
mkdir -p "$HF_HOME"

@bong-water-water-bong
bong-water-water-bong merged commit bff70ed into main Nov 22, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the os/hf-home-on-data branch November 22, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant