Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2037ee290 |
No files matched your search
+2
-11
@@ -96,7 +96,6 @@ Write-Host ''
|
||||
|
||||
# --- 1. Arrancar Ollama (Docker) -------------------------------------------
|
||||
Warn '[1/3] Arrancando Ollama (IA local)...'
|
||||
cmd /c docker rm -f d0a1-hermes-ollama '>' NUL '2>&1'
|
||||
$running = docker ps --format '{{.Names}}' | Select-String -Quiet 'd0a1-hermes-ollama'
|
||||
if (-not $running) {
|
||||
docker run -d --name d0a1-hermes-ollama `
|
||||
@@ -122,25 +121,17 @@ 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") }
|
||||
$PullOk = $false
|
||||
foreach ($Attempt in 1..3) {
|
||||
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
|
||||
docker exec @ProxyEnv d0a1-hermes-ollama ollama pull llama3.2:3b
|
||||
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 'Fallo la descarga del modelo tras 3 intentos.'
|
||||
if (-not $env:HTTPS_PROXY) {
|
||||
Write-Host ' Tu red no llega al registry de Ollama. Si tienes proxy/VPN, lanzalo y:'
|
||||
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (ajusta al puerto de tu proxy)'
|
||||
Write-Host ' .\deploy.ps1 vps'
|
||||
}
|
||||
Write-Host ' O reintenta a mano:'
|
||||
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
|
||||
}
|
||||
|
||||
+2
-11
@@ -96,7 +96,6 @@ Write-Host ''
|
||||
|
||||
# --- 1. Arrancar Ollama (Docker) -------------------------------------------
|
||||
Warn '[1/3] Arrancando Ollama (IA local)...'
|
||||
cmd /c docker rm -f d0a1-openclaw-ollama '>' NUL '2>&1'
|
||||
$running = docker ps --format '{{.Names}}' | Select-String -Quiet 'd0a1-openclaw-ollama'
|
||||
if (-not $running) {
|
||||
docker run -d --name d0a1-openclaw-ollama `
|
||||
@@ -122,25 +121,17 @@ 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") }
|
||||
$PullOk = $false
|
||||
foreach ($Attempt in 1..3) {
|
||||
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
|
||||
docker exec @ProxyEnv d0a1-openclaw-ollama ollama pull llama3.2:3b
|
||||
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 'Fallo la descarga del modelo tras 3 intentos.'
|
||||
if (-not $env:HTTPS_PROXY) {
|
||||
Write-Host ' Tu red no llega al registry de Ollama. Si tienes proxy/VPN, lanzalo y:'
|
||||
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (ajusta al puerto de tu proxy)'
|
||||
Write-Host ' .\deploy.ps1 vps'
|
||||
}
|
||||
Write-Host ' O reintenta a mano:'
|
||||
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
|
||||
}
|
||||
|
||||
+2
-13
@@ -116,9 +116,6 @@ if ($WebUiPort -ne 3000) { Warn "Puerto 3000 ocupado, usando $WebUiPort" }
|
||||
Write-Host ''
|
||||
|
||||
# --- Deploy ----------------------------------------------------------------
|
||||
# Si hay un deploy previo del pack, tumbarlo primero (mantiene los volumenes:
|
||||
# el modelo ya descargado no se re-descarga) para que los nuevos puertos apliquen.
|
||||
cmd /c docker compose -f $ComposeFile down '>' NUL '2>&1'
|
||||
Warn 'Descargando contenedores (2-3 min la primera vez)...'
|
||||
$env:OLLAMA_PORT = "$OllamaPort"
|
||||
$env:WEBUI_PORT = "$WebUiPort"
|
||||
@@ -139,25 +136,17 @@ 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") }
|
||||
$PullOk = $false
|
||||
foreach ($Attempt in 1..3) {
|
||||
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
|
||||
docker exec @ProxyEnv d0a1-ollama ollama pull llama3.2:3b
|
||||
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 'Fallo la descarga del modelo tras 3 intentos.'
|
||||
if (-not $env:HTTPS_PROXY) {
|
||||
Write-Host ' Tu red no llega al registry de Ollama. Si tienes proxy/VPN, lanzalo y:'
|
||||
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (ajusta al puerto de tu proxy)'
|
||||
Write-Host ' .\deploy.ps1 vps'
|
||||
}
|
||||
Write-Host ' O reintenta a mano:'
|
||||
Write-Host ' Revisa tu red (VPN/proxy) y reintenta a mano:'
|
||||
Write-Host ' docker exec d0a1-ollama ollama pull llama3.2:3b'
|
||||
exit 1
|
||||
}
|
||||
|
||||
+2
-11
@@ -154,7 +154,6 @@ 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"
|
||||
@@ -175,25 +174,17 @@ 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") }
|
||||
$PullOk = $false
|
||||
foreach ($Attempt in 1..3) {
|
||||
if ($Attempt -gt 1) { Warn "Reintento $Attempt de 3..." }
|
||||
docker exec @ProxyEnv d0a1-wp-ollama ollama pull llama3.2:3b
|
||||
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 'Fallo la descarga del modelo tras 3 intentos.'
|
||||
if (-not $env:HTTPS_PROXY) {
|
||||
Write-Host ' Tu red no llega al registry de Ollama. Si tienes proxy/VPN, lanzalo y:'
|
||||
Write-Host ' $env:HTTPS_PROXY = "http://127.0.0.1:7890" # (ajusta al puerto de tu proxy)'
|
||||
Write-Host ' .\deploy.ps1 vps'
|
||||
}
|
||||
Write-Host ' O reintenta a mano:'
|
||||
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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user