2026-06-05 13:26:25 +02:00
|
|
|
# ==================================================
|
|
|
|
|
# docker-compose.yml -- local testing (Podman or Docker)
|
|
|
|
|
# ==================================================
|
|
|
|
|
services:
|
|
|
|
|
marker-api:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Containerfile
|
|
|
|
|
image: marker-api:latest
|
|
|
|
|
env_file:
|
2026-06-07 23:37:04 +02:00
|
|
|
- .env
|
2026-06-05 13:26:25 +02:00
|
|
|
environment:
|
2026-06-07 23:37:04 +02:00
|
|
|
- TORCH_DEVICE=${TORCH_DEVICE:-cpu}
|
2026-06-05 13:26:25 +02:00
|
|
|
- MODEL_DTYPE=${MODEL_DTYPE:-float32}
|
2026-06-07 23:37:04 +02:00
|
|
|
- OLLAMA_HOST=${OLLAMA_HOST:-http://localhost:11435}
|
|
|
|
|
- DEESEEK_OCR_MODEL=${DEESEEK_OCR_MODEL:-}
|
2026-06-08 11:12:55 +02:00
|
|
|
- OCR_BACKEND=${OCR_BACKEND:-marker}
|
|
|
|
|
- DEEPSEEK_OLLAMA_HOST=${DEEPSEEK_OLLAMA_HOST:-http://host.containers.internal:11434}
|
|
|
|
|
- DEEPSEEK_OCR_MODEL=${DEEPSEEK_OCR_MODEL:-deepseek-ocr:latest}
|
2026-06-08 12:29:43 +02:00
|
|
|
- DEEPSEEK_OCR_PROMPT=${DEEPSEEK_OCR_PROMPT:-<|grounding|>Free OCR.}
|
2026-06-08 11:12:55 +02:00
|
|
|
- API_KEY=${API_KEY:-}
|
2026-06-08 12:29:43 +02:00
|
|
|
- SELF_URL=${SELF_URL:-http://localhost:8001}
|
|
|
|
|
- LLM_SERVICE=${LLM_SERVICE:-marker.services.ollama.OllamaService}
|
2026-06-07 23:37:04 +02:00
|
|
|
- USE_LLM=${USE_LLM:-false}
|
2026-06-08 12:29:43 +02:00
|
|
|
- OPENAI_BASE_URL=${OPENAI_BASE_URL:-}
|
|
|
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
|
|
|
- OPENAI_MODEL=${OPENAI_MODEL:-}
|
2026-06-07 23:37:04 +02:00
|
|
|
- PORT=${PORT:-8001}
|
2026-06-05 13:26:25 +02:00
|
|
|
- HOST=0.0.0.0
|
2026-06-08 11:12:55 +02:00
|
|
|
- GUNICORN_WORKERS=${GUNICORN_WORKERS:-3}
|
2026-06-07 23:37:04 +02:00
|
|
|
- GUNICORN_THREADS=${GUNICORN_THREADS:-2}
|
|
|
|
|
- GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-600}
|
2026-06-05 13:26:25 +02:00
|
|
|
ports:
|
2026-06-07 23:37:04 +02:00
|
|
|
- "${PORT:-8001}:${PORT:-8001}"
|
2026-06-05 13:26:25 +02:00
|
|
|
volumes:
|
2026-06-07 23:37:04 +02:00
|
|
|
- marker-results:/app/conversion_results:rw,Z
|
|
|
|
|
- marker-cache:/app/.cache:rw,Z
|
2026-06-05 13:26:25 +02:00
|
|
|
restart: unless-stopped
|
|
|
|
|
healthcheck:
|
2026-06-07 23:37:04 +02:00
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-8001}/health"]
|
2026-06-05 13:26:25 +02:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 120s
|
|
|
|
|
|
|
|
|
|
volumes:
|
2026-06-07 23:37:04 +02:00
|
|
|
marker-results:
|
|
|
|
|
marker-cache:
|