From a52ac6822bcdcd857c39a6d981b14186f53a6896 Mon Sep 17 00:00:00 2001 From: Wei Hong <49374928+ChangWeiHong@users.noreply.github.com> Date: Fri, 19 Jun 2026 03:29:47 +0800 Subject: [PATCH] fix(cookbook): pull llama.cpp from the ggml-org GHCR namespace (#4457) (#4490) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Dependencies tab's llama.cpp docker recipe surfaced \`docker pull ghcr.io/ggerganov/llama.cpp:server-cuda\`. The upstream repo moved from github.com/ggerganov/llama.cpp to github.com/ggml-org/llama.cpp and the old GHCR namespace no longer publishes images, so copying the recipe failed with: failed to resolve reference "ghcr.io/ggerganov/llama.cpp:server-cuda": not found Point the recipe at \`ghcr.io/ggml-org/llama.cpp:server-cuda\`, which is already the namespace routes/cookbook_routes.py uses for the source clone. Adds a regression test in the same shape as test_cookbook_diagnosis_js.py asserting the new namespace and forbidding the dead one. No CSS/HTML/SVG/style changes — the file is a pure data module (no DOM access) consumed by other renderers; only the displayed command text changes. --- static/js/cookbook-deps-recipes.js | 2 +- tests/test_cookbook_deps_recipes.py | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/test_cookbook_deps_recipes.py diff --git a/static/js/cookbook-deps-recipes.js b/static/js/cookbook-deps-recipes.js index afb1b7287..ba4f1b444 100644 --- a/static/js/cookbook-deps-recipes.js +++ b/static/js/cookbook-deps-recipes.js @@ -56,7 +56,7 @@ const _RECIPES = [ match: () => true, variants: { pip: { commands: ['CMAKE_ARGS="-DGGML_CUDA=on" uv pip install -U "llama-cpp-python[server]"'] }, - docker: { commands: ['docker pull ghcr.io/ggerganov/llama.cpp:server-cuda'] }, + docker: { commands: ['docker pull ghcr.io/ggml-org/llama.cpp:server-cuda'] }, }, }, ]; diff --git a/tests/test_cookbook_deps_recipes.py b/tests/test_cookbook_deps_recipes.py new file mode 100644 index 000000000..9bc02b0df --- /dev/null +++ b/tests/test_cookbook_deps_recipes.py @@ -0,0 +1,27 @@ +"""Guard the llama.cpp Docker pull recipe surfaced in Cookbook → Dependencies. + +The upstream repo moved from github.com/ggerganov/llama.cpp to +github.com/ggml-org/llama.cpp. The old GHCR namespace +(ghcr.io/ggerganov/llama.cpp) no longer publishes images, so the +docker variant in the Dependencies panel returned +"failed to resolve reference … not found" when copied verbatim (#4457). +The other llama.cpp reference in routes/cookbook_routes.py already uses +ggml-org; this guards the JS recipe so the two stay aligned. +""" +from pathlib import Path + +RECIPES_JS = ( + Path(__file__).resolve().parent.parent / "static" / "js" / "cookbook-deps-recipes.js" +) + + +def test_llama_cpp_docker_recipe_uses_ggml_org_namespace(): + source = RECIPES_JS.read_text(encoding="utf-8") + + assert "ghcr.io/ggml-org/llama.cpp:server-cuda" in source, ( + "Expected the llama.cpp docker recipe to pull from the ggml-org namespace." + ) + assert "ghcr.io/ggerganov/llama.cpp" not in source, ( + "The ggerganov GHCR namespace no longer publishes llama.cpp images. " + "Use ghcr.io/ggml-org/llama.cpp:server-cuda." + )