install: skip llama.cpp download/extract when llama-server.exe exists

This commit is contained in:
Stefano Zini
2026-11-04 11:32:06 +01:00
parent 5341f6c704
commit 6fe1c6c10d
+8 -3
View File
@@ -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"