Files
marker_api/.env.example
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

68 lines
2.2 KiB
Bash

# ============== ENVIRONMENT VARIABLES for marker-api ========================
#
# Copy to .env and edit as needed:
# cp .env.example .env
#
# All variables can also be passed via K8s ConfigMap/Secret,
# podman --env, or docker-compose environment.
# -----------------------------------
# Authentication
# -----------------------------------
API_KEY= # API key for X-API-Key auth (empty = disabled)
SELF_URL=http://localhost:8001 # Public URL for file download/upload links
# -----------------------------------
# OCR Backend
# -----------------------------------
OCR_BACKEND=marker # "marker" (marker-pdf) or "deepseek" (deepseek-ocr via ollama)
# -----------------------------------
# DeepSeek OCR (via Ollama)
# -----------------------------------
DEEPSEEK_OLLAMA_HOST=http://localhost:11434
DEEPSEEK_OCR_MODEL=deepseek-ocr:latest
DEEPSEEK_OCR_PROMPT=<|grounding|>Free OCR.
# -----------------------------------
# Ollama (LLM correction)
# -----------------------------------
OLLAMA_HOST=http://localhost:11434
DEESEEK_OCR_MODEL=deepseek-ocr
USE_LLM=false # Use an LLM to improve conversion accuracy
LLM_SERVICE=marker.services.ollama.OllamaService
OPENAI_BASE_URL= # For OpenAI-compatible LLM API
OPENAI_API_KEY= # API key for OpenAI-compatible service
OPENAI_MODEL= # Model name for OpenAI-compatible service
# -----------------------------------
# AMD GPU (set to true on AMD/ROCm systems)
# -----------------------------------
AMD_COMPUTE=false # set to "true" to enable ROCm
TORCH_DEVICE= # override PyTorch device ("rocm", "cuda", "cpu")
MODEL_DTYPE=float32 # "float32" or "bfloat16" (bfloat16 on capable GPUs)
# -----------------------------------
# Application
# -----------------------------------
PORT=8001
HOST=0.0.0.0
FLASK_APP=app
FLASK_DEBUG=0
# -----------------------------------
# Gunicorn (production)
# -----------------------------------
GUNICORN_WORKERS=3
GUNICORN_THREADS=4
GUNICORN_TIMEOUT=600
GUNICORN_LOGLEVEL=info
# -----------------------------------
# Paths
# -----------------------------------
RESULTS_DIR=/app/conversion_results
UPLOAD_DIR=/app/uploads