Qdrant
https://db-engines.com/en/ranking/vector+dbms
현재 네트워크 확인
docker network inspect bridge
# 새 네트워크 생성
docker network create --subnet=172.16.0.0/16 rag-network
새 네트워크 확인
docker network inspect rag-network
https://qdrant.tech/documentation/quickstart/
Docker 컨테이너 실행
docker pull qdrant/qdrant
docker run --name qdrant_db \
--network rag-network \
-p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage \
qdrant/qdrant
기존 docker 연결
docker network connect rag-network Sixx_Uftuning
기존 docker내에서 연결 확인
ping qdrant_db
Initialize the client
from qdrant_client import QdrantClient
client = QdrantClient(
host="qdrant_db", # 컨테이너 이름
port=6333
)
Create a collection
from qdrant_client.models import Distance, VectorParams
client.create_collection(
collection_name="test_collection",
vectors_config=VectorParams(size=4, distance=Distance.DOT),
)
UI접근