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"