-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (33 loc) · 960 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (33 loc) · 960 Bytes
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
services:
embeddings:
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.8
container_name: embeddings_server
platform: linux/amd64
command:
- --model-id
- ${EMBEDDING_MODEL_ID:-unsloth/embeddinggemma-300m}
- --dtype
- float32
environment:
EMBEDDING_MODEL_ID: ${EMBEDDING_MODEL_ID:-unsloth/embeddinggemma-300m}
EMBEDDING_DIMENSION: ${EMBEDDING_DIMENSION:-768}
ports:
- "8080:80"
volumes:
- embeddings_cache:/data
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"curl -sf http://localhost:80/v1/embeddings \
-H 'Content-Type: application/json' \
-d '{\"model\":\"${EMBEDDING_MODEL_ID:-unsloth/embeddinggemma-300m}\",\"input\":\"hello\"}' \
| grep -q '\"embedding\"'"
]
interval: 30s
timeout: 15s
retries: 5
start_period: 120s
volumes:
embeddings_cache: