-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
39 lines (36 loc) · 935 Bytes
/
docker-compose.yaml
File metadata and controls
39 lines (36 loc) · 935 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
35
36
37
38
39
services:
ollama:
image: ollama/ollama:latest
container_name: glm-ocr-ollama
restart: unless-stopped
volumes:
- ollama_models:/root/.ollama
ports:
- "11434:11434"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434"]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
glm-ocr-server:
image: python:3.12-slim
container_name: glm-ocr-api
restart: unless-stopped
depends_on:
ollama:
condition: service_healthy
volumes:
- ./config/config.yaml:/app/config.yaml:ro
- ./results:/app/results
- ./examples:/app/examples:ro
working_dir: /app
environment:
- GLMOCR_CONFIG=/app/config.yaml
command: >
bash -c "pip install --no-cache-dir 'glmocr[server,selfhosted]' &&
python -m glmocr.server --log-level INFO"
ports:
- "5002:5002"
volumes:
ollama_models: