update ai insight migration for all page
This commit is contained in:
1 parent
07d36081ce
commit
18790ab8f6
69 files changed
+9457
-399
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# Copy host "AI Insight/chroma_db" into the running rag container volume.
|
||||
# Named volume rag-chroma mounts over the image-baked index — seed after first up.
|
||||
$ErrorActionPreference = "Stop"
|
||||
$Root = Split-Path -Parent $PSScriptRoot
|
||||
$Src = Join-Path $Root "AI Insight\chroma_db"
|
||||
$Cid = if ($env:RAG_CONTAINER) { $env:RAG_CONTAINER } else { "dashboard-cpsp-rag" }
|
||||
|
||||
if (-not (Test-Path $Src)) {
|
||||
Write-Error "Missing $Src — run: cd 'AI Insight'; python populate_db.py"
|
||||
}
|
||||
docker inspect $Cid | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Container $Cid not found. Start with: docker compose up -d rag"
|
||||
}
|
||||
|
||||
Write-Host "Seeding Chroma into ${Cid}:/app/chroma_db from $Src"
|
||||
docker exec $Cid sh -c "rm -rf /app/chroma_db/* /app/chroma_db/.[!.]* 2>/dev/null || true"
|
||||
docker cp "${Src}/." "${Cid}:/app/chroma_db/"
|
||||
docker restart $Cid
|
||||
Write-Host "Done. Check: curl -fsS http://127.0.0.1:5002/health"
|
||||
Reference in new issue
Block a user