feat(installer): Lemonade system prerequisites + FLM .deb (PR-4)#157
Merged
Conversation
Add a new install.sh step that lands Lemonade's system-level prereqs
before PR-5 drops the lemond binary, config.json, and systemd unit:
1. ppa:lemonade-team/stable — provides libxrt-npu2 (NPU runtime)
2. FLM transitive runtime libs (apt) — ffmpeg6, boost1.83, fftw3
3. FastFlowLM .deb v0.9.42 — pinned URL + SHA-256, fail-soft if
unreachable; `flm validate` smoke-test post-install
Idempotent (PPA dedup via add-apt-repository, apt no-ops on installed
packages, dpkg-query short-circuits the .deb fetch). Dev mode skips
all apt + curl steps and logs what would have happened. Non-apt hosts
warn + continue (NPU surface unavailable, GPU paths still work).
FLM_DEB_SHA256 ships as the placeholder for now; a `HAL0_SKIP_FLM_SHA=1`
env var unblocks the install path until the real checksum is pinned
in lockstep with v0.2 ship.
Refs: lemonade-adoption-plan §11 PR-4, ADR-0008 (Lemonade adoption),
ADR-0009 (FLM trio NPU packing), memory `hal0_lemonade_flm_npu_install`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
PR-4 of the Lemonade migration (
docs/internal/lemonade-adoption-plan-2026-05-22.md§11). Adds a new install.sh step that lands Lemonade's system-level prerequisites BEFORE PR-5 drops the lemond binary,config.json, and systemd unit.Three pieces, in order:
ppa:lemonade-team/stable— provideslibxrt-npu2, the AMDXDNA NPU runtime FLM dlopen()s at start. Without itflm servefails withcannot open shared object libxrt_coreutil.so.2.libxrt-npu2+ ffmpeg6 (libavformat60/libavcodec60/libavutil58/libswscale7/libswresample4) +libboost-program-options1.83.0+libfftw3-single3. Listed explicitly so a future ABI bump is a visible single-line edit, not silent metapackage drift.dpkginstalls; fail-soft if unreachable or checksum mismatches; smoke-tested withflm validatepost-install (soft on failure — NPU-absent hosts stay viable for GPU-only hal0).Constraints honoured
add-apt-repository -ydedups, apt no-ops on installed packages,dpkg-queryshort-circuits the .deb fetch when v0.9.42 is already installed.--devlogs what would have happened, never touches the host's apt or third-party sources.flm validatefailure all warn + continue. NPU paths gate onflm validatesucceeding later; GPU-only hal0 still ships.UI_STEP_TOTALfrom 8 → 9 (base) for the new step.Open follow-ups
FLM_DEB_SHA256ships as the all-zeroes placeholder.HAL0_SKIP_FLM_SHA=1unblocks the install path; the real checksum needs to be pinned in lockstep with the v0.2 ship cut (tracked in the v0.2 release checklist).libxrt-npu2+flmbeing on PATH before it writesflm.args = "--asr 1 --embed 1"intoconfig.json.Anti-scope (deferred to PR-5 / PR-6)
config.jsonwriter.hal0-lemonade.servicesystemd unit.server_models.jsonblock (PR feat(lemonade): server_models.json generator from registry.toml (#141) #151 already in main).Refs
docs/internal/lemonade-adoption-plan-2026-05-22.md§11 PR-4 + §3 (service topology) + §5 (NPU + FLM trio)hal0_lemonade_flm_npu_install— the manual install recipe this section automatesTest plan
bash -n installer/install.sh— syntax OKshellcheck installer/install.sh— no new warnings on the added sectionpytest tests/ -q— 1443 passed, no regressionsruff check src tests— cleanruff format --check src tests— cleansudo bash installer/install.shon a fresh container; assert PPA added, libs installed,flm validatesucceeds (deferred until PR-5 lands lemond — until then verify the step runs cleanly + is idempotent on re-run)🤖 Generated with Claude Code