Files
marker_api/docker-compose.yml
T
oval 33997778f6 Prepare for public git: .gitignore, .env, sanitized configs
- Add .gitignore excluding .env, __pycache__, test_files (copyrighted PDFs),
  session logs, marker/ submodule, and other generated/private files
- Add .env with local config (gitignored); expand .env.example with all
  supported environment variables
- docker-compose.yml: all hardcoded values now use default pattern
- Containerfile: install marker-pdf from GitHub instead of local submodule;
  fix AMD_COMPUTE default to false; sanitize default OLLAMA_HOST
- Remove marker/ submodule from git tracking (keep local checkout via .gitignore)
- Remove session transcript and copyrighted ENISA PDFs from git tracking
- Sanitize local IPs in README, kubernetes deployment, deploy-podman.sh
- Fix hardcoded paths in convert_both.py and compare_conversions.py
- Update requirements.txt to reference GitHub instead of local --editable
2026-06-08 12:29:43 +02:00

49 lines
1.7 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:-}
- 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}
- DEEPSEEK_OCR_PROMPT=${DEEPSEEK_OCR_PROMPT:-<|grounding|>Free OCR.}
- API_KEY=${API_KEY:-}
- SELF_URL=${SELF_URL:-http://localhost:8001}
- LLM_SERVICE=${LLM_SERVICE:-marker.services.ollama.OllamaService}
- USE_LLM=${USE_LLM:-false}
- OPENAI_BASE_URL=${OPENAI_BASE_URL:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- OPENAI_MODEL=${OPENAI_MODEL:-}
- PORT=${PORT:-8001}
- HOST=0.0.0.0
- GUNICORN_WORKERS=${GUNICORN_WORKERS:-3}
- 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: