Replace uvicorn with gunicorn + UvicornWorker in backend, runtime, and schedule Dockerfiles. New gunicorn.conf.py per service exposes bind/workers/timeout/graceful_timeout as GUNICORN_* env knobs. Notable details: - schedule: timeout=0 (disables gunicorn worker heartbeat) so long notebook execution isn't killed by gunicorn's silent-worker kill. - All three configs: drop dead threads=4 setting; UvicornWorker is async and ignores threads. - Pin gunicorn>=26.0.0 in each pyproject; uv.lock regenerated. - Drop stale 'COPY contracts ./contracts' from runtime and schedule Dockerfiles (contracts dir was deleted in an earlier refactor; builds would have failed). - backend Dockerfile: switch to uv sync layout matching runtime/ schedule; add build deps for native wheels. Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
513 B
TOML
28 lines
513 B
TOML
[project]
|
|
name = "runtime"
|
|
version = "0.2.0"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"common",
|
|
"fastapi==0.116.1",
|
|
"uvicorn[standard]==0.35.0",
|
|
"httpx==0.28.1",
|
|
"loguru==0.7.2",
|
|
"notebook",
|
|
"gunicorn>=26.0.0",
|
|
]
|
|
|
|
[tool.uv.sources]
|
|
common = { workspace = true }
|
|
|
|
[[tool.uv.index]]
|
|
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
|
|
default = true
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/runtime"]
|