188 lines
5.5 KiB
TOML
188 lines
5.5 KiB
TOML
[build-system]
|
|
# Requirements for package build
|
|
# Should be mirrored in requirements/build.txt (for builds external to setuptools)
|
|
# The recommended installation from source will avoid the requirements here in order
|
|
# to stay flexible for the torch version with `--no-build-isolation`. Thus, these packages
|
|
# should be installed before `pip install -e . --no-build-isolation`.
|
|
# However, build isolation is still used for the cibuildwheel releases
|
|
# Thus, we will still lock a torch version here because we can choose to release wheels
|
|
# in sync with vllm and update our torch version accordingly
|
|
requires = [
|
|
"ninja",
|
|
"packaging>=24.2",
|
|
"setuptools>=77.0.3,<81.0.0",
|
|
"setuptools_scm>=8",
|
|
"torch==2.11.0",
|
|
"wheel",
|
|
]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "lmcache"
|
|
authors = [{name = "LMCache Team", email = "lmcacheteam@gmail.com"}]
|
|
license = "Apache-2.0"
|
|
license-files = ["LICENSE"]
|
|
readme = "README.md"
|
|
description = "A LLM serving engine extension to reduce TTFT and increase throughput, especially under long-context scenarios."
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Environment :: GPU",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Information Technology",
|
|
"Intended Audience :: Science/Research",
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
]
|
|
requires-python = ">=3.10,<3.14"
|
|
dynamic = ["dependencies", "optional-dependencies", "version"]
|
|
|
|
[project.scripts]
|
|
lmcache="lmcache.cli.main:main"
|
|
lmcache_server="lmcache.v1.server.__main__:main"
|
|
lmcache_controller="lmcache.v1.api_server.__main__:main"
|
|
|
|
[project.urls]
|
|
homepage = "https://docs.lmcache.ai"
|
|
source = "https://github.com/LMCache/LMCache"
|
|
issues = "https://github.com/LMCache/LMCache"
|
|
|
|
[tool.setuptools_scm]
|
|
version_file = "lmcache/_version.py"
|
|
# do not include +gREV local version, required for Test PyPI upload
|
|
local_scheme = "no-local-version"
|
|
# only treat vX.Y.Z-style tags as version anchors; ignores nightly/nightly-cu129 tags
|
|
tag_regex = "^v?(?P<version>\\d+\\.\\d+\\.\\d+.*)$"
|
|
git_describe_command = ["git", "describe", "--tags", "--long", "--match", "v[0-9]*.[0-9]*", "--exclude", "v*-*"]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = [""]
|
|
include = ["lmcache", "lmcache*"]
|
|
|
|
[tool.ruff]
|
|
# same as Black's default line length
|
|
line-length = 88
|
|
exclude = [
|
|
"lmcache/integration/vllm/lmcache_mp_connector_*.py",
|
|
]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
# pycodestyle
|
|
"E",
|
|
# Pyflakes
|
|
"F",
|
|
# pyupgrade
|
|
# "UP",
|
|
# flake8-bugbear
|
|
"B",
|
|
# flake8-simplify
|
|
#"SIM",
|
|
# Ruff does not support isort's import_headings feature, yet.
|
|
# "I",
|
|
# flake8-logging-format
|
|
#"G",
|
|
# flake8-self (private member access)
|
|
"SLF",
|
|
]
|
|
ignore = [
|
|
# star imports
|
|
"F405", "F403",
|
|
# lambda expression assignment
|
|
"E731",
|
|
# Loop control variable not used within loop body
|
|
"B007",
|
|
# f-string format
|
|
"UP032",
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Ignore SLF everywhere except lmcache/v1/multiprocess/
|
|
"!lmcache/v1/multiprocess/**" = ["SLF"]
|
|
"!lmcache/v1/distributed/**" = ["SLF"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
# same as .isort.cfg
|
|
from-first = true
|
|
# not supported yet
|
|
# import-heading-future=Future
|
|
# import-heading-stdlib=Standard
|
|
# import-heading-thirdparty=Third Party
|
|
# import-heading-firstparty=First Party
|
|
# import-heading-localfolder=Local
|
|
|
|
[tool.mypy]
|
|
|
|
platform = "linux"
|
|
modules = ["lmcache", "tests", "benchmarks"]
|
|
exclude = [
|
|
'lmcache/integration/vllm/lmcache_mp_connector_.*\.py',
|
|
]
|
|
|
|
disable_error_code = [
|
|
#"annotation-unchecked",
|
|
#"union-attr",
|
|
#"var-annotated",
|
|
#"arg-type",
|
|
# "call-arg",
|
|
#"import-untyped",
|
|
#"attr-defined",
|
|
#"return-value",
|
|
#"assignment",
|
|
#"call-overload",
|
|
#"misc",
|
|
]
|
|
|
|
ignore_missing_imports = true
|
|
explicit_package_bases = true
|
|
|
|
# TODO: tighten MyPy checks by enabling these checks over time.
|
|
check_untyped_defs = false
|
|
disallow_incomplete_defs = false
|
|
disallow_untyped_defs = false
|
|
disallow_untyped_calls = false
|
|
warn_return_any = false
|
|
|
|
follow_imports = "silent"
|
|
|
|
[tool.codespell]
|
|
ignore-words-list = "afterall,allready,notin,te"
|
|
skip = "operator/config/crd/bases/*,lmcache/integration/vllm/lmcache_mp_connector_*.py"
|
|
|
|
[tool.cibuildwheel]
|
|
build = "cp3*-manylinux_x86_64"
|
|
|
|
# see https://developer.nvidia.com/cuda-gpus for compute capabilities
|
|
# "CUDA-Enabled Datacenter Products"
|
|
# 7.5: T4
|
|
# 8.0: A100, A30
|
|
# 8.6: A40, A10, A16, A2
|
|
# 8.9: L4, L40, L40S
|
|
# 9.0: GH200, H200, H100
|
|
# 10.0: GB200, B200
|
|
# 12.0: RTX 50-series (PTX)
|
|
# CUDA 13 dropped support for compute capability 7.0 (Volta).
|
|
environment = {TORCH_CUDA_ARCH_LIST = "7.5;8.0;8.6;8.9;9.0;10.0;12.0", ENABLE_CXX11_ABI = "1", PIP_EXTRA_INDEX_URL = "https://download.pytorch.org/whl/cu130"}
|
|
|
|
# Use the PyTorch manylinux image version '2_28' that contains CUDA 13.0
|
|
manylinux-x86_64-image = "docker.io/pytorch/manylinux2_28-builder:cuda13.0"
|
|
|
|
[tool.cibuildwheel.linux]
|
|
repair-wheel-command = """
|
|
auditwheel repair \
|
|
--plat manylinux_2_28_x86_64 \
|
|
--exclude libtorch.so \
|
|
--exclude libtorch_cuda.so \
|
|
--exclude libtorch_python.so \
|
|
--exclude libtorch_cpu.so \
|
|
--exclude libc10.so \
|
|
--exclude libc10_cuda.so \
|
|
--exclude libcudart.so.13 \
|
|
-w {dest_dir} {wheel}
|
|
"""
|