This repository was archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
42 lines (37 loc) · 1.36 KB
/
setup.py
File metadata and controls
42 lines (37 loc) · 1.36 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
#!/usr/bin/env python
import os
from typing import List
from setuptools import find_packages, setup
def _load_requirements(path_dir: str, file_name: str = "requirements.txt", comment_char: str = "#") -> List[str]:
"""Load requirements from a file."""
with open(os.path.join(path_dir, file_name)) as file:
lines = [ln.strip() for ln in file.readlines()]
reqs = []
for ln in lines:
# filer all comments
if comment_char in ln:
ln = ln[: ln.index(comment_char)].strip()
# skip directly installed dependencies
if ln.startswith("http"):
continue
# skip index url
if ln.startswith("--extra-index-url"):
continue
if ln: # if requirement is not empty
reqs.append(ln)
return reqs
setup(
name="diffusion_with_autoscaler",
version="0.0.1",
description="⚡ AutoScaler in Lightning.AI ⚡",
long_description="⚡ Deploy models with AutoScaler using Lightning ⚡",
author="Lightning et al.",
author_email="sherin@lightning.ai",
url="https://github.com/Lightning-AI/LAI-Triton-Serve-Component",
packages=find_packages(exclude=["tests", "docs"]),
include_package_data=True,
keywords=["lightning"],
python_requires=">=3.7",
setup_requires=["wheel"],
install_requires=_load_requirements(os.path.dirname(__file__)),
)