From 6fe1c6c10d1717e28926677b748b91f1da971d48 Mon Sep 17 00:00:00 2001 From: Stefano Zini Date: Wed, 4 Nov 2026 11:32:06 +0100 Subject: [PATCH] install: skip llama.cpp download/extract when llama-server.exe exists --- install.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/install.js b/install.js index bfb5e90..cddd079 100644 --- a/install.js +++ b/install.js @@ -78,8 +78,11 @@ module.exports = { message: "conda install -y -c conda-forge ffmpeg 7zip" } }, + // evaluated once, before the extract creates llama-server.exe (re-running Install must not re-download ~700 MB) + { method: "local.set", params: { have: "{{exists('app/bin/llama-server.exe') ? 'yes' : 'no'}}" } }, // llama.cpp server (CUDA 13.4 / 12.4 / CPU build, per detection above) for the Qwen VLM + bge-m3 embeddings { + when: "{{local.have !== 'yes'}}", method: "shell.run", params: { path: "app", @@ -87,7 +90,7 @@ module.exports = { } }, { - when: "{{local.build !== 'cpu'}}", + when: "{{local.build !== 'cpu' && local.have !== 'yes'}}", method: "shell.run", params: { path: "app", @@ -95,6 +98,7 @@ module.exports = { } }, { + when: "{{local.have !== 'yes'}}", method: "shell.run", params: { path: "app/bin", @@ -102,7 +106,7 @@ module.exports = { } }, { - when: "{{local.build !== 'cpu'}}", + when: "{{local.build !== 'cpu' && local.have !== 'yes'}}", method: "shell.run", params: { path: "app/bin", @@ -110,13 +114,14 @@ module.exports = { } }, { + when: "{{local.have !== 'yes'}}", method: "fs.rm", params: { path: "app/bin/llama-b11889-bin-win-{{local.build}}-x64.zip" } }, { - when: "{{local.build !== 'cpu'}}", + when: "{{local.build !== 'cpu' && local.have !== 'yes'}}", method: "fs.rm", params: { path: "app/bin/cudart-llama-bin-win-{{local.build}}-x64.zip"