-
Notifications
You must be signed in to change notification settings - Fork 138
/
setup.py
59 lines (49 loc) · 1.62 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
from setuptools import setup
import os
here = os.path.dirname(os.path.realpath(__file__))
HAS_CUDA = os.system("nvidia-smi > /dev/null 2>&1") == 0
VERSION = "0.0.4"
DESCRIPTION = "ChatLLaMA: Open and Efficient Foundation Language Models Runnable In A Single GPU"
packages = [
"chatllama",
]
def read_file(filename: str):
try:
lines = []
with open(filename) as file:
lines = file.readlines()
lines = [line.rstrip() for line in lines if not line.startswith('#')]
return lines
except:
return []
def package_files(ds):
paths = []
for d in ds:
for (path, directories, filenames) in os.walk(d):
for filename in filenames:
if '__pycache__' not in str(filename):
paths.append(str(os.path.join(path, filename))[len('chatllama/'):])
return paths
extra_files = package_files(['chatllama/'])
setup(
name="chatllama",
version=VERSION,
author_email="<[email protected]>",
description=DESCRIPTION,
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
install_requires=read_file(f"{here}/requirements.txt"),
keywords=[
"ChatLLaMA", "LLaMA"
],
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
packages=packages,
package_data={"chatllama": extra_files},
url="https://github.com/juncongmoo/chatllama"
)