Initial marker-api benchmark setup: Containerfile, app.py, convert_both.py, compare_conversions.py

This commit is contained in:
oval
2026-06-05 13:26:25 +02:00
commit 460fc0003b
33 changed files with 58290 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# gunicorn.conf.py -- production WSGI config for marker-api
import os
import multiprocessing
port = int(os.environ.get("PORT", "8000"))
workers = min(multiprocessing.cpu_count() * 2 + 1, 8)
bind = f"0.0.0.0:{port}"
workers = int(os.environ.get("GUNICORN_WORKERS", "1"))
workers = min(workers, 8)
worker_class = "gthread"
threads = int(os.environ.get("GUNICORN_THREADS", "4"))
timeout = int(os.environ.get("GUNICORN_TIMEOUT", "300"))
graceful_timeout = 60
accesslog = "-"
errorlog = "-"
loglevel = os.environ.get("GUNICORN_LOGLEVEL", "info")
# Preload so models are loaded once in master process (not duplicated per-worker)
preload_app = True
# Enable worker recycling to prevent memory leaks
max_requests = 1000
max_requests_jitter = 100
# Tempdir for marker uploads
tempdir = "/app/uploads"