From 971131a3b75301080cddaf2aae90ea1a6ce4a0e3 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 12 Sep 2026 21:04:54 +0200 Subject: [PATCH] feat: 2o mirror de HF (unsloth) en el fallback del modelo Si bartowski no responde, prueba unsloth (ambos no-gated, GGUF Q4_K_M identico). Descarga en silencio (-sL) con barra previa ya mostrada. --- hermes/deploy.ps1 | 13 +++++++++++-- openclaw/deploy.ps1 | 13 +++++++++++-- openwebui/deploy.ps1 | 13 +++++++++++-- wordpress/deploy.ps1 | 13 +++++++++++-- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/hermes/deploy.ps1 b/hermes/deploy.ps1 index 6c4c2fa..d65bc1d 100644 --- a/hermes/deploy.ps1 +++ b/hermes/deploy.ps1 @@ -137,8 +137,17 @@ if (-not $PullOk) { # --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) --- Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...' $Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf' - curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' - if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) { + $Urls = @( + 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf', + 'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' + ) + $DlOk = $false + foreach ($Url in $Urls) { + curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url + if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break } + Warn "Mirror no accesible, probando el siguiente..." + } + if ($DlOk) { docker cp "$Gguf" d0a1-hermes-ollama:/root/.ollama/import.gguf docker exec d0a1-hermes-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf' $CreateOk = ($LASTEXITCODE -eq 0) diff --git a/openclaw/deploy.ps1 b/openclaw/deploy.ps1 index 2907e0a..01b41e3 100644 --- a/openclaw/deploy.ps1 +++ b/openclaw/deploy.ps1 @@ -137,8 +137,17 @@ if (-not $PullOk) { # --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) --- Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...' $Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf' - curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' - if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) { + $Urls = @( + 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf', + 'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' + ) + $DlOk = $false + foreach ($Url in $Urls) { + curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url + if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break } + Warn "Mirror no accesible, probando el siguiente..." + } + if ($DlOk) { docker cp "$Gguf" d0a1-openclaw-ollama:/root/.ollama/import.gguf docker exec d0a1-openclaw-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf' $CreateOk = ($LASTEXITCODE -eq 0) diff --git a/openwebui/deploy.ps1 b/openwebui/deploy.ps1 index 6336f13..0c647fb 100644 --- a/openwebui/deploy.ps1 +++ b/openwebui/deploy.ps1 @@ -154,8 +154,17 @@ if (-not $PullOk) { # --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) --- Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...' $Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf' - curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' - if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) { + $Urls = @( + 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf', + 'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' + ) + $DlOk = $false + foreach ($Url in $Urls) { + curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url + if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break } + Warn "Mirror no accesible, probando el siguiente..." + } + if ($DlOk) { docker cp "$Gguf" d0a1-ollama:/root/.ollama/import.gguf docker exec d0a1-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf' $CreateOk = ($LASTEXITCODE -eq 0) diff --git a/wordpress/deploy.ps1 b/wordpress/deploy.ps1 index d6355c1..532b78c 100644 --- a/wordpress/deploy.ps1 +++ b/wordpress/deploy.ps1 @@ -190,8 +190,17 @@ if (-not $PullOk) { # --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) --- Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...' $Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf' - curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' - if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) { + $Urls = @( + 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf', + 'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf' + ) + $DlOk = $false + foreach ($Url in $Urls) { + curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url + if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break } + Warn "Mirror no accesible, probando el siguiente..." + } + if ($DlOk) { docker cp "$Gguf" d0a1-wp-ollama:/root/.ollama/import.gguf docker exec d0a1-wp-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf' $CreateOk = ($LASTEXITCODE -eq 0) -- 2.54.0