From 1182c1cbcc7957bb30bb2aaabb66ef524932f94c Mon Sep 17 00:00:00 2001 From: Hasan Basbunar Date: Mon, 23 Nov 2026 03:26:25 +0100 Subject: [PATCH] install-speech: the llama.cpp build downloads no web UI (issue #75) Every new install of the speech lane failed since upstream changed its web UI: llama.cpp's build fetches a prebuilt UI from a Hugging Face bucket by build number, a shallow fetch of the pin has build number 1, which is not there, so the build took "latest", and the pinned commit's own check refused the new files ("UI: missing required asset(s): bundle[hash].js, bundle[hash].css, workbox[hash].js"). Reproduced on 2026-11-23 at the pin with the script's flags. The lane serves an API, never that page: the build now passes -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_BUILD_UI=OFF, and removes build/tools/ui first, because a build directory that failed that way keeps the downloaded files and embeds them again even with the download off (measured: "embedding stale assets", same error). Test red on the old script, green now. Co-Authored-By: Claude Fable 5.2 --- install-speech.sh | 9 ++++++++- tests/test_install_speech.py | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/install-speech.sh b/install-speech.sh index 5196e2a8..f857257d 100755 --- a/install-speech.sh +++ b/install-speech.sh @@ -204,8 +204,15 @@ else # memory edge is the one place a compile could hurt it. JOBS=$(( $(awk '/^MemAvailable:/ { print int($2 / 1048576) }' /proc/meminfo) / 3 )) [ "$JOBS" -ge 1 ] || JOBS=1; [ "$JOBS" -le "${#CORE_LIST[@]}" ] || JOBS=${#CORE_LIST[@]} + # And no web UI: llama.cpp's build downloads a prebuilt one from a Hugging Face bucket by build number, + # and a shallow fetch has build number 1, which is not there, so it took "latest". The day upstream's + # UI changed its files, this commit's own check refused them ("UI: missing required asset(s)") and + # every new install failed (issue #75, 2026-11-22). The lane serves an API, never that page. A build + # directory that failed that way keeps the downloaded files and would embed them again: they go first. + rm -rf "$LLAMA_DIR/build/tools/ui" cmake -S "$LLAMA_DIR" -B "$LLAMA_DIR/build" -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=OFF \ - -DLLAMA_OPENSSL=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF > "$BUILD_LOG" 2>&1 \ + -DLLAMA_OPENSSL=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF \ + -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_BUILD_UI=OFF > "$BUILD_LOG" 2>&1 \ && taskset -c "$ASR_CPUS,$TTS_CPUS" cmake --build "$LLAMA_DIR/build" -j "$JOBS" --target llama-server \ >> "$BUILD_LOG" 2>&1 \ || { tail -20 "$BUILD_LOG"; die "the llama.cpp build failed; the lines above and $BUILD_LOG say why."; } diff --git a/tests/test_install_speech.py b/tests/test_install_speech.py index d3cd7027..39ac0532 100644 --- a/tests/test_install_speech.py +++ b/tests/test_install_speech.py @@ -211,6 +211,20 @@ class TheGuards(unittest.TestCase): self.assertIn("-DGGML_CUDA=OFF", SCRIPT) self.assertNotRegex(SCRIPT, r"GGML_CUDA=ON") + def test_the_build_downloads_no_web_ui(self): + # issue #75 (2026-11-22): llama.cpp's build fetches a prebuilt web UI from a Hugging Face bucket, by + # build number, and a shallow fetch of the pin has build number 1, which is not there, so it took + # "latest": the day upstream's UI changed its files, the pinned commit's own check refused them + # ("UI: missing required asset(s)") and every new install of the lane failed. The lane serves an API, + # never that page: the build asks for no prebuilt UI, and none is built with npm either. + build = SCRIPT[SCRIPT.index('cmake -S "$LLAMA_DIR"'):SCRIPT.index("--target llama-server")] + self.assertIn("-DLLAMA_USE_PREBUILT_UI=OFF", build) + self.assertIn("-DLLAMA_BUILD_UI=OFF", build) + # a build directory that failed on those files keeps them, and the build embeds what it finds + # there even with the download off (measured 2026-11-23: "embedding stale assets", same error): + # they are removed before the configure step + self.assertLess(SCRIPT.index('rm -rf "$LLAMA_DIR/build/tools/ui"'), SCRIPT.index('cmake -S "$LLAMA_DIR"')) + def test_it_is_not_started_at_boot_unless_asked(self): self.assertIn('if [ "${SPEECH_BOOT:-0}" = "1" ]; then sudo systemctl enable', SCRIPT) self.assertEqual(len(re.findall(r"systemctl enable", SCRIPT)), 1)