forked from vllm-project/vllm-gaudi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
73 lines (62 loc) · 2.27 KB
/
setup.py
File metadata and controls
73 lines (62 loc) · 2.27 KB
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
67
68
69
70
71
72
73
import logging
import os
from setuptools import setup, find_packages
from setuptools_scm import get_version
try:
VERSION = get_version(write_to="vllm_gaudi/_version.py")
except LookupError:
# The checkout action in github action CI does not checkout the tag. It
# only checks out the commit. In this case, we set a dummy version.
VERSION = "0.0.0"
ROOT_DIR = os.path.dirname(__file__)
logger = logging.getLogger(__name__)
ext_modules = []
def get_path(*filepath) -> str:
return os.path.join(ROOT_DIR, *filepath)
def get_requirements() -> list[str]:
"""Get Python package dependencies from requirements.txt."""
def _read_requirements(filename: str) -> list[str]:
with open(get_path(filename)) as f:
requirements = f.read().strip().split("\n")
resolved_requirements = []
for line in requirements:
if line.startswith("-r "):
resolved_requirements += _read_requirements(line.split()[1])
elif line.startswith("--"):
continue
else:
resolved_requirements.append(line)
return resolved_requirements
try:
requirements = _read_requirements("requirements.txt")
except ValueError:
print("Failed to read requirements.txt in vllm_gaudi.")
return requirements
setup(
name="vllm_gaudi",
version=VERSION,
author="Intel",
long_description="Intel Gaudi plugin package for vLLM.",
long_description_content_type="text/markdown",
url="https://github.com/vllm-project/vllm-gaudi",
project_urls={
"Homepage": "https://github.com/vllm-project/vllm-gaudi",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache 2.0",
"Operating System :: OS Independent",
],
packages=find_packages(exclude=("docs", "examples", "tests*", "csrc")),
install_requires=get_requirements(),
ext_modules=ext_modules,
extras_require={},
entry_points={
"vllm.platform_plugins": ["hpu = vllm_gaudi:register"],
"vllm.general_plugins": [
"01.hpu_custom_utils = vllm_gaudi:register_utils",
"02.hpu_custom_ops = vllm_gaudi:register_ops",
"03.hpu_custom_models = vllm_gaudi:register_models",
],
},
)