Files
marker_api/docker-compose.yml
T
oval df8d0d6b74 Finalize local deployment config: CPU mode, persistent cache, port 8001
- docker-compose.yml: default TORCH_DEVICE=cpu, PORT=8001, named volumes
  for model cache (marker-cache) and results (marker-results) with :Z flag
- convert_both.py: API_URL defaults to port 8001, overridable via env
- TODO.md: reflect final decisions (iGPU 30x slower than CPU,
  --privileged required for GPU, CPU mode is default)
2026-06-07 23:37:04 +02:00

43 lines
1.3 KiB
YAML

# ==================================================
# docker-compose.yml -- local testing (Podman or Docker)
# ==================================================
services:
marker-api:
build:
context: .
dockerfile: Containerfile
image: marker-api:latest
env_file:
- .env
environment:
- TORCH_DEVICE=${TORCH_DEVICE:-cpu}
- MODEL_DTYPE=${MODEL_DTYPE:-float32}
- OLLAMA_HOST=${OLLAMA_HOST:-http://localhost:11435}
- DEESEEK_OCR_MODEL=${DEESEEK_OCR_MODEL:-}
- LLM_SERVICE=marker.services.openai.OpenAIService
- USE_LLM=${USE_LLM:-false}
- OPENAI_BASE_URL=http://localhost:11435/v1
- OPENAI_API_KEY=not-needed
- OPENAI_MODEL=
- PORT=${PORT:-8001}
- HOST=0.0.0.0
- GUNICORN_WORKERS=${GUNICORN_WORKERS:-1}
- GUNICORN_THREADS=${GUNICORN_THREADS:-2}
- GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-600}
ports:
- "${PORT:-8001}:${PORT:-8001}"
volumes:
- marker-results:/app/conversion_results:rw,Z
- marker-cache:/app/.cache:rw,Z
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-8001}/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
volumes:
marker-results:
marker-cache: