77 lines
2.1 KiB
TOML
77 lines
2.1 KiB
TOML
[build-system]
|
|
requires = ["setuptools==80.9.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "modelforge-runtime-worker"
|
|
version = "1.2.2"
|
|
license = "AGPL-3.0-or-later"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"httpx==0.28.1",
|
|
"nvidia-ml-py==13.580.65",
|
|
"numpy==2.1.2",
|
|
"Pillow==12.3.0",
|
|
"protobuf==5.29.6",
|
|
"pydantic==2.13.4",
|
|
"pydantic-settings==2.10.1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# The inference stack. Imported lazily inside the adapter rather than at module scope, so the
|
|
# worker's own tests, lint and type check do not need several gigabytes of PyTorch present. The
|
|
# runtime image installs this extra; CI does not, which is the difference between a validation run
|
|
# that takes a minute and one that takes twenty.
|
|
inference = [
|
|
# Security pins include packages inherited from the PyTorch runtime image. Keeping them here
|
|
# makes the final runtime environment reproducible and prevents an old base package from
|
|
# satisfying an unconstrained transitive dependency.
|
|
"Brotli==1.2.0",
|
|
"jaraco.context==6.1.2",
|
|
"msgpack==1.2.2",
|
|
"sentencepiece==0.2.2",
|
|
"sentence-transformers==6.0.1",
|
|
"setuptools==84.0.0",
|
|
"soupsieve==2.9.2",
|
|
"transformers==5.16.1",
|
|
"urllib3==2.7.0",
|
|
"wheel==0.48.0",
|
|
]
|
|
dev = [
|
|
"pytest==8.4.2",
|
|
"ruff==0.16.5",
|
|
"mypy==1.20.2",
|
|
]
|
|
|
|
[project.scripts]
|
|
modelforge-runtime-worker = "modelforge_runtime_worker.main:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.pytest.ini_options]
|
|
pythonpath = ["src"]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.mypy]
|
|
# The images run on Linux, so that is the platform the type check must analyse. Checking on the
|
|
# developer's platform meant Windows-only branches were analysed and Linux-only ones were not —
|
|
# a winreg block type-checked cleanly here and failed in CI on identical code.
|
|
platform = "linux"
|
|
python_version = "3.11"
|
|
strict = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["numpy", "numpy.*", "PIL", "PIL.*", "pynvml", "sentence_transformers", "torch", "torch.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.ruff]
|
|
target-version = "py311"
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "B", "UP", "S"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["S101"]
|