Compare commits

..
Author SHA1 Message Date
hermes a2037ee290 fix: IP del modo VPS via interfaz de la ruta por defecto
10.5.0.2 (vEthernet WSL) salia como URL: el filtro por rango 172.16-31
no cubre las IPs internas 10.x de WSL/Hyper-V. Ahora se coge la IP de la
interfaz que tiene la ruta 0.0.0.0/0 — la que de verdad va a la LAN.
Fallback TU_IP si no hay ruta.
2026-09-12 20:49:16 +02:00
6 changed files with 46 additions and 257 deletions

No files matched your search

+11 -59
View File
@@ -80,22 +80,6 @@ if ($TotalRamGb -lt 3.5) {
}
Ok "RAM: $TotalRamGb GB"
# --- Tumbar deploy previo (antes de detectar puertos) -----------------------
cmd /c docker rm -f d0a1-hermes-ollama '>' NUL '2>&1'
# --- GPU NVIDIA? (si hay, Ollama la usa y va 5-10x mas rapido) ---------------
$HasGpu = $false
if (Get-Command nvidia-smi -ErrorAction SilentlyContinue) {
$GpuInfo = & nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>$null
if ($LASTEXITCODE -eq 0 -and $GpuInfo) {
$HasGpu = $true
$GpuName = ($GpuInfo -split ',')[0].Trim()
Info "GPU NVIDIA detectada: $GpuName (aceleracion activada)"
}
}
if (-not $HasGpu) {
Warn 'Sin GPU NVIDIA: modo CPU (~10-20 tokens/s). Con una GPU NVIDIA va 5-10x mas rapido.'
}
# --- Auto-detect Ollama port ------------------------------------------------
$OllamaPort = Find-FreePort 11434
@@ -114,9 +98,7 @@ Write-Host ''
Warn '[1/3] Arrancando Ollama (IA local)...'
$running = docker ps --format '{{.Names}}' | Select-String -Quiet 'd0a1-hermes-ollama'
if (-not $running) {
$GpuArgs = @()
if ($HasGpu) { $GpuArgs = @('--gpus', 'all') }
docker run -d --name d0a1-hermes-ollama --memory 6g @GpuArgs `
docker run -d --name d0a1-hermes-ollama `
-p "${OllamaPort}:11434" `
-v d0a1_hermes_ollama:/root/.ollama `
-e OLLAMA_HOST=0.0.0.0 `
@@ -139,48 +121,18 @@ while ($true) {
}
}
Warn ' Descargando modelo (llama3.2:3b, ~2 GB)...'
# Si el usuario define $env:HTTPS_PROXY, Ollama lo usa para el pull (doc oficial):
$ProxyEnv = @()
if ($env:HTTPS_PROXY) { $ProxyEnv = @('-e', "HTTPS_PROXY=$env:HTTPS_PROXY", '-e', "HTTP_PROXY=$env:HTTP_PROXY") }
# --- Modelo: HF primero (CDN propio, rapido) y registry de Ollama como ultimo recurso ---
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
$HfUrls = @(
'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'
)
Info 'Descargando modelo de IA (llama3.2:3b, ~2 GB)...'
foreach ($Url in $HfUrls) {
curl.exe -# -L --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { break }
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
if ($Url -ne $HfUrls[-1]) { Warn 'Mirror no accesible, probando el siguiente...' }
}
if ((Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) {
Info 'Importando modelo en Ollama...'
docker cp "$Gguf" d0a1-hermes-ollama:/root/.ollama/import.gguf
docker exec d0a1-hermes-ollama sh -c 'printf "FROM /root/.ollama/import.gguf\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
docker exec d0a1-hermes-ollama rm -f /root/.ollama/import.gguf | Out-Null
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
$PullOk = $CreateOk
if (-not $CreateOk) { Err 'Fallo al importar el modelo desde el GGUF.' }
} else {
# Ultimo recurso: pull directo (1 intento, ya sin esperar 3 rondas)
Warn 'HuggingFace no accesible. Probando el registry de Ollama (ultimo recurso)...'
docker exec @ProxyEnv d0a1-hermes-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) {
$PullOk = $true
# Contexto ampliado (el default 4096 da 400 en Open WebUI con prompts largos)
docker exec d0a1-hermes-ollama sh -c 'printf "FROM llama3.2:3b\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
}
$PullOk = $false
foreach ($Attempt in 1..3) {
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
docker exec d0a1-hermes-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) { $PullOk = $true; break }
Warn 'Descarga interrumpida (red). Reintentando en 5 s...'
Start-Sleep -Seconds 5
}
if (-not $PullOk) {
Err 'No se pudo descargar el modelo (ni HuggingFace ni registry).'
if (-not $env:HTTPS_PROXY) {
Write-Host ' Tu red bloquea ambos. Si tienes proxy/VPN:'
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (puerto de tu proxy)'
Write-Host ' .\deploy.ps1 vps'
}
Err 'Fallo la descarga del modelo tras 3 intentos.'
Write-Host ' Revisa tu red (VPN/proxy) y reintenta a mano:'
Write-Host ' docker exec d0a1-hermes-ollama ollama pull llama3.2:3b'
exit 1
}
Ok "Ollama corriendo en http://localhost:${OllamaPort}"
+11 -59
View File
@@ -80,22 +80,6 @@ if ($TotalRamGb -lt 3.5) {
}
Ok "RAM: $TotalRamGb GB"
# --- Tumbar deploy previo (antes de detectar puertos) -----------------------
cmd /c docker rm -f d0a1-openclaw-ollama '>' NUL '2>&1'
# --- GPU NVIDIA? (si hay, Ollama la usa y va 5-10x mas rapido) ---------------
$HasGpu = $false
if (Get-Command nvidia-smi -ErrorAction SilentlyContinue) {
$GpuInfo = & nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>$null
if ($LASTEXITCODE -eq 0 -and $GpuInfo) {
$HasGpu = $true
$GpuName = ($GpuInfo -split ',')[0].Trim()
Info "GPU NVIDIA detectada: $GpuName (aceleracion activada)"
}
}
if (-not $HasGpu) {
Warn 'Sin GPU NVIDIA: modo CPU (~10-20 tokens/s). Con una GPU NVIDIA va 5-10x mas rapido.'
}
# --- Auto-detect Ollama port ------------------------------------------------
$OllamaPort = Find-FreePort 11434
@@ -114,9 +98,7 @@ Write-Host ''
Warn '[1/3] Arrancando Ollama (IA local)...'
$running = docker ps --format '{{.Names}}' | Select-String -Quiet 'd0a1-openclaw-ollama'
if (-not $running) {
$GpuArgs = @()
if ($HasGpu) { $GpuArgs = @('--gpus', 'all') }
docker run -d --name d0a1-openclaw-ollama --memory 6g @GpuArgs `
docker run -d --name d0a1-openclaw-ollama `
-p "${OllamaPort}:11434" `
-v d0a1_openclaw_ollama:/root/.ollama `
-e OLLAMA_HOST=0.0.0.0 `
@@ -139,48 +121,18 @@ while ($true) {
}
}
Warn ' Descargando modelo (llama3.2:3b, ~2 GB)...'
# Si el usuario define $env:HTTPS_PROXY, Ollama lo usa para el pull (doc oficial):
$ProxyEnv = @()
if ($env:HTTPS_PROXY) { $ProxyEnv = @('-e', "HTTPS_PROXY=$env:HTTPS_PROXY", '-e', "HTTP_PROXY=$env:HTTP_PROXY") }
# --- Modelo: HF primero (CDN propio, rapido) y registry de Ollama como ultimo recurso ---
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
$HfUrls = @(
'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'
)
Info 'Descargando modelo de IA (llama3.2:3b, ~2 GB)...'
foreach ($Url in $HfUrls) {
curl.exe -# -L --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { break }
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
if ($Url -ne $HfUrls[-1]) { Warn 'Mirror no accesible, probando el siguiente...' }
}
if ((Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) {
Info 'Importando modelo en Ollama...'
docker cp "$Gguf" d0a1-openclaw-ollama:/root/.ollama/import.gguf
docker exec d0a1-openclaw-ollama sh -c 'printf "FROM /root/.ollama/import.gguf\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
docker exec d0a1-openclaw-ollama rm -f /root/.ollama/import.gguf | Out-Null
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
$PullOk = $CreateOk
if (-not $CreateOk) { Err 'Fallo al importar el modelo desde el GGUF.' }
} else {
# Ultimo recurso: pull directo (1 intento, ya sin esperar 3 rondas)
Warn 'HuggingFace no accesible. Probando el registry de Ollama (ultimo recurso)...'
docker exec @ProxyEnv d0a1-openclaw-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) {
$PullOk = $true
# Contexto ampliado (el default 4096 da 400 en Open WebUI con prompts largos)
docker exec d0a1-openclaw-ollama sh -c 'printf "FROM llama3.2:3b\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
}
$PullOk = $false
foreach ($Attempt in 1..3) {
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
docker exec d0a1-openclaw-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) { $PullOk = $true; break }
Warn 'Descarga interrumpida (red). Reintentando en 5 s...'
Start-Sleep -Seconds 5
}
if (-not $PullOk) {
Err 'No se pudo descargar el modelo (ni HuggingFace ni registry).'
if (-not $env:HTTPS_PROXY) {
Write-Host ' Tu red bloquea ambos. Si tienes proxy/VPN:'
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (puerto de tu proxy)'
Write-Host ' .\deploy.ps1 vps'
}
Err 'Fallo la descarga del modelo tras 3 intentos.'
Write-Host ' Revisa tu red (VPN/proxy) y reintenta a mano:'
Write-Host ' docker exec d0a1-openclaw-ollama ollama pull llama3.2:3b'
exit 1
}
Ok "Ollama corriendo en http://localhost:${OllamaPort}"
+12 -66
View File
@@ -86,24 +86,6 @@ if ($TotalRamGb -lt 3.5) {
}
Ok "RAM: $TotalRamGb GB"
# --- Tumbar deploy previo (antes de detectar puertos) ----------------------
# Mantiene los volumenes (el modelo ya descargado no se re-descarga) y libera
# los puertos para que Find-FreePort vea el estado REAL tras el down.
cmd /c docker compose -f $ComposeFile down '>' NUL '2>&1'
# --- GPU NVIDIA? (si hay, Ollama la usa y va 5-10x mas rapido) ---------------
$HasGpu = $false
if (Get-Command nvidia-smi -ErrorAction SilentlyContinue) {
$GpuInfo = & nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>$null
if ($LASTEXITCODE -eq 0 -and $GpuInfo) {
$HasGpu = $true
$GpuName = ($GpuInfo -split ',')[0].Trim()
Info "GPU NVIDIA detectada: $GpuName (aceleracion activada)"
}
}
if (-not $HasGpu) {
Warn 'Sin GPU NVIDIA: modo CPU (~10-20 tokens/s). Con una GPU NVIDIA va 5-10x mas rapido.'
}
# --- Auto-detect ports ----------------------------------------------------
$OllamaPort = Find-FreePort 11434
$WebUiPort = Find-FreePort 3000
@@ -137,17 +119,11 @@ Write-Host ''
Warn 'Descargando contenedores (2-3 min la primera vez)...'
$env:OLLAMA_PORT = "$OllamaPort"
$env:WEBUI_PORT = "$WebUiPort"
$ComposeArgs = @('-f', $ComposeFile)
if ($HasGpu) {
$OverrideFile = Join-Path $ScriptDir 'docker-compose.gpu.yml'
Set-Content -Path $OverrideFile -Value "services:`r`n ollama:`r`n gpus: all`r`n"
$ComposeArgs += @('-f', $OverrideFile)
}
docker compose @ComposeArgs up -d
docker compose -f $ComposeFile up -d
if ($LASTEXITCODE -ne 0) { Err "docker compose up fallo (exit $LASTEXITCODE)."; exit 1 }
# --- Pull model -------------------------------------------------------------
Info 'Esperando a que Ollama arranque...'
Warn 'Descargando modelo de IA (llama3.2:3b, ~2 GB)...'
$MaxWait = 60; $Waited = 0
while ($true) {
# Descarte de stderr via cmd /c (ver nota de PS 5.1 / PS #4002 arriba)
@@ -160,48 +136,18 @@ while ($true) {
exit 1
}
}
# Si el usuario define $env:HTTPS_PROXY, Ollama lo usa para el pull (doc oficial):
$ProxyEnv = @()
if ($env:HTTPS_PROXY) { $ProxyEnv = @('-e', "HTTPS_PROXY=$env:HTTPS_PROXY", '-e', "HTTP_PROXY=$env:HTTP_PROXY") }
# --- Modelo: HF primero (CDN propio, rapido) y registry de Ollama como ultimo recurso ---
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
$HfUrls = @(
'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'
)
Info 'Descargando modelo de IA (llama3.2:3b, ~2 GB)...'
foreach ($Url in $HfUrls) {
curl.exe -# -L --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { break }
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
if ($Url -ne $HfUrls[-1]) { Warn 'Mirror no accesible, probando el siguiente...' }
}
if ((Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) {
Info 'Importando modelo en Ollama...'
docker cp "$Gguf" d0a1-ollama:/root/.ollama/import.gguf
docker exec d0a1-ollama sh -c 'printf "FROM /root/.ollama/import.gguf\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
docker exec d0a1-ollama rm -f /root/.ollama/import.gguf | Out-Null
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
$PullOk = $CreateOk
if (-not $CreateOk) { Err 'Fallo al importar el modelo desde el GGUF.' }
} else {
# Ultimo recurso: pull directo (1 intento, ya sin esperar 3 rondas)
Warn 'HuggingFace no accesible. Probando el registry de Ollama (ultimo recurso)...'
docker exec @ProxyEnv d0a1-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) {
$PullOk = $true
# Contexto ampliado (el default 4096 da 400 en Open WebUI con prompts largos)
docker exec d0a1-ollama sh -c 'printf "FROM llama3.2:3b\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
}
$PullOk = $false
foreach ($Attempt in 1..3) {
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
docker exec d0a1-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) { $PullOk = $true; break }
Warn 'Descarga interrumpida (red). Reintentando en 5 s...'
Start-Sleep -Seconds 5
}
if (-not $PullOk) {
Err 'No se pudo descargar el modelo (ni HuggingFace ni registry).'
if (-not $env:HTTPS_PROXY) {
Write-Host ' Tu red bloquea ambos. Si tienes proxy/VPN:'
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (puerto de tu proxy)'
Write-Host ' .\deploy.ps1 vps'
}
Err 'Fallo la descarga del modelo tras 3 intentos.'
Write-Host ' Revisa tu red (VPN/proxy) y reintenta a mano:'
Write-Host ' docker exec d0a1-ollama ollama pull llama3.2:3b'
exit 1
}
-4
View File
@@ -26,10 +26,6 @@ services:
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
memory: 6G
openwebui:
container_name: d0a1-openwebui
+12 -65
View File
@@ -119,23 +119,7 @@ if (-not (Test-Path $EnvFile)) {
Info "Contrasenas generadas en $EnvFile"
}
# --- GPU NVIDIA? (si hay, Ollama la usa y va 5-10x mas rapido) ---------------
$HasGpu = $false
if (Get-Command nvidia-smi -ErrorAction SilentlyContinue) {
$GpuInfo = & nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>$null
if ($LASTEXITCODE -eq 0 -and $GpuInfo) {
$HasGpu = $true
$GpuName = ($GpuInfo -split ',')[0].Trim()
Info "GPU NVIDIA detectada: $GpuName (aceleracion activada)"
}
}
if (-not $HasGpu) {
Warn 'Sin GPU NVIDIA: modo CPU (~10-20 tokens/s). Con una GPU NVIDIA va 5-10x mas rapido.'
}
# --- Auto-detect ports ----------------------------------------------------
# --- Tumbar deploy previo (antes de detectar puertos) ----------------------
cmd /c docker compose -f $ComposeFile down '>' NUL '2>&1'
$OllamaPort = Find-FreePort 11434
$WpPort = Find-FreePort 8080
$WebUiPort = Find-FreePort 3000
@@ -170,21 +154,14 @@ Write-Host ''
# --- Deploy ----------------------------------------------------------------
Warn 'Descargando contenedores (3-5 min la primera vez)...'
cmd /c docker compose -f $ComposeFile down '>' NUL '2>&1'
$env:OLLAMA_PORT = "$OllamaPort"
$env:WP_PORT = "$WpPort"
$env:WEBUI_PORT = "$WebUiPort"
$ComposeArgs = @('-f', $ComposeFile)
if ($HasGpu) {
$OverrideFile = Join-Path $ScriptDir 'docker-compose.gpu.yml'
Set-Content -Path $OverrideFile -Value "services:`r`n ollama:`r`n gpus: all`r`n"
$ComposeArgs += @('-f', $OverrideFile)
}
docker compose @ComposeArgs up -d
docker compose -f $ComposeFile up -d
if ($LASTEXITCODE -ne 0) { Err "docker compose up fallo (exit $LASTEXITCODE)."; exit 1 }
# --- Pull model -------------------------------------------------------------
Info 'Esperando a que Ollama arranque...'
Warn 'Descargando modelo de IA (llama3.2:3b, ~2 GB)...'
$MaxWait = 60; $Waited = 0
while ($true) {
# Descarte de stderr via cmd /c (ver nota de PS 5.1 / PS #4002 arriba)
@@ -197,48 +174,18 @@ while ($true) {
exit 1
}
}
# Si el usuario define $env:HTTPS_PROXY, Ollama lo usa para el pull (doc oficial):
$ProxyEnv = @()
if ($env:HTTPS_PROXY) { $ProxyEnv = @('-e', "HTTPS_PROXY=$env:HTTPS_PROXY", '-e', "HTTP_PROXY=$env:HTTP_PROXY") }
# --- Modelo: HF primero (CDN propio, rapido) y registry de Ollama como ultimo recurso ---
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
$HfUrls = @(
'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'
)
Info 'Descargando modelo de IA (llama3.2:3b, ~2 GB)...'
foreach ($Url in $HfUrls) {
curl.exe -# -L --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { break }
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
if ($Url -ne $HfUrls[-1]) { Warn 'Mirror no accesible, probando el siguiente...' }
}
if ((Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) {
Info 'Importando modelo en Ollama...'
docker cp "$Gguf" d0a1-wp-ollama:/root/.ollama/import.gguf
docker exec d0a1-wp-ollama sh -c 'printf "FROM /root/.ollama/import.gguf\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
docker exec d0a1-wp-ollama rm -f /root/.ollama/import.gguf | Out-Null
Remove-Item "$Gguf" -Force -ErrorAction SilentlyContinue
$PullOk = $CreateOk
if (-not $CreateOk) { Err 'Fallo al importar el modelo desde el GGUF.' }
} else {
# Ultimo recurso: pull directo (1 intento, ya sin esperar 3 rondas)
Warn 'HuggingFace no accesible. Probando el registry de Ollama (ultimo recurso)...'
docker exec @ProxyEnv d0a1-wp-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) {
$PullOk = $true
# Contexto ampliado (el default 4096 da 400 en Open WebUI con prompts largos)
docker exec d0a1-wp-ollama sh -c 'printf "FROM llama3.2:3b\\nPARAMETER num_ctx 16384\\n" > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
}
$PullOk = $false
foreach ($Attempt in 1..3) {
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
docker exec d0a1-wp-ollama ollama pull llama3.2:3b
if ($LASTEXITCODE -eq 0) { $PullOk = $true; break }
Warn 'Descarga interrumpida (red). Reintentando en 5 s...'
Start-Sleep -Seconds 5
}
if (-not $PullOk) {
Err 'No se pudo descargar el modelo (ni HuggingFace ni registry).'
if (-not $env:HTTPS_PROXY) {
Write-Host ' Tu red bloquea ambos. Si tienes proxy/VPN:'
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (puerto de tu proxy)'
Write-Host ' .\deploy.ps1 vps'
}
Err 'Fallo la descarga del modelo tras 3 intentos.'
Write-Host ' Revisa tu red (VPN/proxy) y reintenta a mano:'
Write-Host ' docker exec d0a1-wp-ollama ollama pull llama3.2:3b'
exit 1
}
-4
View File
@@ -59,10 +59,6 @@ services:
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
memory: 6G
openwebui:
container_name: d0a1-wp-openwebui