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,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# 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.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SRC="$ROOT/AI Insight/chroma_db"
|
||||
CID="${RAG_CONTAINER:-dashboard-cpsp-rag}"
|
||||
|
||||
if [[ ! -d "$SRC" ]]; then
|
||||
echo "Missing $SRC — run: cd \"AI Insight\" && python populate_db.py" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! docker inspect "$CID" >/dev/null 2>&1; then
|
||||
echo "Container $CID not found. Start with: docker compose up -d rag" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "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"
|
||||
echo "Done. Check: curl -fsS http://127.0.0.1:5002/health"
|
||||
Reference in new issue
Block a user