-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsetup.py
66 lines (58 loc) · 2.25 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from typing import List
import os
import re
from pathlib import Path
from setuptools import setup, find_packages
ROOT_DIR = os.path.dirname(__file__)
def read_readme() -> str:
"""Read the README file."""
return (Path(__file__).parent / "README.md").read_text(encoding="UTF-8")
def get_path(*filepath) -> str:
return os.path.join(ROOT_DIR, *filepath)
def find_version(filepath: str) -> str:
"""Extract version information from the given filepath.
Adapted from https://github.com/ray-project/ray/blob/0b190ee1160eeca9796bc091e07eaebf4c85b511/python/setup.py
"""
with open(filepath) as fp:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
fp.read(), re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
def get_version() -> str:
version = find_version(get_path("ray_vllm_inference", "__init__.py"))
return version
requirements = [
"ray==2.8.0",
"ray[serve]==2.8.0",
"pydantic==1.10.13", # fix problem with Ray Serve startup
"vllm==0.2.3", # vLLM requires CUDA 12
"protobuf==3.20.3"
]
setup(
name="ray_vllm_inference",
version=get_version(),
description="A service that integrates vLLM with Ray Serve for fast and scalable LLM serving.",
author="Andre Sprenger",
license="Apache 2.0",
license_files="LICENSE.txt",
long_description=read_readme(),
long_description_content_type="text/markdown",
url="https://github.com/asprenger/ray_vllm_inference",
keywords=["python", "vllm", "ray", "llm"],
platforms= ["linux"],
classifiers=[
"Environment :: GPU :: NVIDIA CUDA :: 11.8",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
],
packages=find_packages(include=['ray_vllm_inference', 'ray_vllm_inference.*']),
install_requires=requirements,
include_package_data=True,
package_data={"ray_vllm_inference": ["models/*"]},
python_requires=">=3.8.0",
)