-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_ai_stack.ps1
More file actions
38 lines (31 loc) · 1.38 KB
/
deploy_ai_stack.ps1
File metadata and controls
38 lines (31 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# AI Stack Deployment Script (Ollama + Open WebUI)
# Führen Sie dieses Script als Administrator aus.
Write-Host "--- Starte AI Stack Deployment ---" -ForegroundColor Cyan
# 1. Prüfe ob Docker läuft
if (!(Get-Process docker -ErrorAction SilentlyContinue)) {
Write-Error "Docker Desktop läuft nicht. Bitte starten Sie Docker zuerst."
exit
}
# 2. Erstelle zentrale Ordner falls nicht vorhanden
$paths = @("C:\ProgramData\Ollama", "C:\ProgramData\OpenWebUI", "C:\ProgramData\FalkorDB")
foreach ($path in $paths) {
if (!(Test-Path $path)) {
Write-Host "Erstelle Ordner: $path"
New-Item -ItemType Directory -Path $path -Force
}
}
# 3. Starte Docker Compose
Write-Host "Starte Container via Docker Compose..." -ForegroundColor Green
docker-compose up -d
# 4. Warte bis Ollama bereit ist
Write-Host "Warte auf Ollama Container..." -ForegroundColor Yellow
$retryCount = 0
while (!(docker ps --filter "name=ollama" --filter "status=running" --format "{{.Names}}") -and $retryCount -lt 10) {
Start-Sleep -Seconds 2
$retryCount++
}
# 5. Initiales Modell laden (Mistral)
Write-Host "Lade Standard-Modell (Mistral)... Dies kann einige Minuten dauern." -ForegroundColor Yellow
docker exec -it ollama ollama run mistral
Write-Host "--- Deployment Abgeschlossen ---" -ForegroundColor Cyan
Write-Host "Open WebUI ist erreichbar unter: http://localhost:3000" -ForegroundColor Green