-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 2.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 2.02 KB
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
45
46
47
48
49
50
51
52
53
services:
qdrant:
image: qdrant/qdrant:v1.18.2
restart: unless-stopped
ports:
# Loopback only: Qdrant has no auth configured — binding to 0.0.0.0 would
# let anyone on the network read/delete every vector, bypassing markdex.
- "127.0.0.1:6333:6333"
volumes:
- qdrant_storage:/qdrant/storage
embedder:
build: ./services/embedder
restart: unless-stopped
environment:
# fp16 is faster here — Apple Silicon (arm64) has native fp16; measured ~5x vs fp32.
USE_FP16: "true"
# rerank short topic chunks; halves cross-encoder cost vs the 512 default.
RERANK_MAX_LENGTH: "256"
# English MiniLM cross-encoder: ~55x faster on CPU than bge-reranker-v2-m3
# (0.1s vs 6s for a 24-doc pool). For multilingual/highest quality on a GPU,
# set BAAI/bge-reranker-v2-m3 instead.
RERANK_MODEL: cross-encoder/ms-marco-MiniLM-L-6-v2
volumes:
# persists the BGE-M3 + reranker models (~4.5GB, downloaded on first start)
- hf_cache:/root/.cache/huggingface
app:
build: .
restart: unless-stopped
depends_on:
- qdrant
- embedder
environment:
QDRANT_URL: http://qdrant:6333
EMBEDDER_URL: http://embedder:8000
# Optional: raises GitHub's 60/hr unauthenticated limit and enables private
# repos for repo ingestion. Passed through from the host env if set.
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
# Optional: when set, mutating API routes require "Authorization: Bearer <token>".
# Unset keeps the API open (single-user default).
MARKDEX_API_TOKEN: ${MARKDEX_API_TOKEN:-}
# Optional: TurboQuant scalar quantization on the dense vector for collections
# created from now on (0=off, 2=near-lossless ~16x). ON_DISK is required for the
# RAM savings (stores float32 originals on disk). See README "TurboQuant".
MARKDEX_QUANT_BITS: ${MARKDEX_QUANT_BITS:-0}
MARKDEX_QUANT_ON_DISK: ${MARKDEX_QUANT_ON_DISK:-false}
ports:
- "4334:4334"
volumes:
qdrant_storage:
hf_cache: