File size: 1,190 Bytes
017e961 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | services:
# Vector Search API
vector-api:
env_file:
- .env
build:
context: .
dockerfile: Dockerfile
image: vector-search-api:v1.0.1
container_name: vector-search-api
ports:
- "5200:5200"
environment:
- QDRANT_URL=http://localhost:6333
- DEFAULT_COLLECTION=docs_2025
- ALLOW_MODELS=all
- API_KEY=
- CORS_ALLOW_ORIGINS=*
- DEVICE=auto
- TORCH_NUM_THREADS=4
- API_HOST=0.0.0.0
- API_PORT=5200
- HF_HOME=/app/.cache/huggingface
- TRANSFORMERS_CACHE=/app/.cache/huggingface
- SENTENCE_TRANSFORMERS_HOME=/app/.cache/huggingface
# Offline mode for closed network
- HF_HUB_OFFLINE=1
- TRANSFORMERS_OFFLINE=1
volumes:
- ./app:/app/app:rw
- ./models:/app/models:ro
- ./models_config.yaml:/app/models_config.yaml:ro
- model_cache:/app/.cache/huggingface
- ./logs:/app/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5200/health"]
interval: 30s
timeout: 10s
retries: 5
volumes:
model_cache:
driver: local |