agAdvisor / start_qdrant.sh
tirtho149's picture
Deploy AgAdvisor
b30f068 verified
Raw
History Blame Contribute Delete
1.53 kB
#!/bin/bash
# Quick Qdrant Docker Start Script
echo "πŸš€ Starting Qdrant with Docker..."
echo ""
# Check if container exists
if docker ps -a | grep -q qdrant; then
echo "πŸ“¦ Qdrant container found"
if docker ps | grep -q qdrant; then
echo "βœ… Qdrant is already running!"
else
echo "πŸ”„ Starting existing container..."
docker start qdrant
sleep 2
echo "βœ… Qdrant started!"
fi
else
echo "πŸ“¦ Creating new Qdrant container..."
docker run -d \
--name qdrant \
-p 6333:6333 \
-p 6334:6334 \
-v "$(pwd)/qdrant_storage:/qdrant/storage" \
qdrant/qdrant
echo "⏳ Waiting for Qdrant to start..."
sleep 3
echo "βœ… Qdrant container created and started!"
fi
echo ""
echo "πŸ“ Qdrant Dashboard: http://localhost:6333/dashboard"
echo "πŸ“ Qdrant API: http://localhost:6333"
echo ""
echo "πŸ§ͺ Testing connection..."
python3 -c "
try:
from qdrant_client import QdrantClient
client = QdrantClient(host='localhost', port=6333, timeout=5)
collections = client.get_collections().collections
print(f'βœ… Connection successful!')
print(f'πŸ“¦ Collections: {len(collections)}')
for coll in collections:
coll_info = client.get_collection(coll.name)
print(f' - {coll.name}: {coll_info.points_count} points')
except Exception as e:
print(f'❌ Connection failed: {e}')
print(' Make sure Docker is running and Qdrant container started')
"
echo ""
echo "βœ… Done!"