Persist Qdrant to host: bind-mount ./data/qdrant; add data dir ignore; update docs

This commit is contained in:
2026-03-23 19:52:43 +01:00
parent 8f758cf3b5
commit b8c44bd1b2
8 changed files with 264 additions and 48 deletions

View File

@@ -16,19 +16,35 @@ services:
- VISION_TIMEOUT=300
- MAX_IMAGE_BYTES=52428800
depends_on:
- clip
- blip
- yolo
- qdrant-svc
clip:
condition: service_healthy
blip:
condition: service_healthy
yolo:
condition: service_healthy
qdrant-svc:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
qdrant:
image: qdrant/qdrant:latest
ports:
- "6333:6333"
volumes:
- qdrant_data:/qdrant/storage
- ./data/qdrant:/qdrant/storage
environment:
- QDRANT__SERVICE__GRPC_PORT=6334
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:6333/collections"]
interval: 30s
timeout: 10s
retries: 5
start_period: 15s
qdrant-svc:
build:
@@ -41,8 +57,16 @@ services:
- COLLECTION_NAME=images
- VECTOR_DIM=512
depends_on:
- qdrant
- clip
qdrant:
condition: service_healthy
clip:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
clip:
build:
@@ -52,6 +76,12 @@ services:
- MODEL_NAME=ViT-B-32
- MODEL_PRETRAINED=openai
- HUGGINGFACE_TOKEN=${HUGGINGFACE_TOKEN}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
blip:
build:
@@ -61,6 +91,12 @@ services:
#- BLIP_MODEL=Salesforce/blip-image-captioning-base
- BLIP_MODEL=Salesforce/blip-image-captioning-small
- HUGGINGFACE_TOKEN=${HUGGINGFACE_TOKEN}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
yolo:
build:
@@ -68,6 +104,10 @@ services:
dockerfile: yolo/Dockerfile
environment:
- YOLO_MODEL=yolov8n.pt
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5).read()"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
volumes:
qdrant_data: