forked from ludwig-ai/ludwig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
82 lines (57 loc) · 2.53 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# coding=utf-8
'''Ludwig: a deep learning experimentation toolbox
'''
from codecs import open
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README.md file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
requirements = [line.strip() for line in f if line]
extra_requirements = {}
with open(path.join(here, 'requirements_audio.txt'), encoding='utf-8') as f:
extra_requirements['audio'] = [line.strip() for line in f if line]
with open(path.join(here, 'requirements_image.txt'), encoding='utf-8') as f:
extra_requirements['image'] = [line.strip() for line in f if line]
with open(path.join(here, 'requirements_serve.txt'), encoding='utf-8') as f:
extra_requirements['serve'] = [line.strip() for line in f if line]
with open(path.join(here, 'requirements_text.txt'), encoding='utf-8') as f:
extra_requirements['text'] = [line.strip() for line in f if line]
with open(path.join(here, 'requirements_viz.txt'), encoding='utf-8') as f:
extra_requirements['viz'] = [line.strip() for line in f if line]
extra_requirements['full'] = [item for sublist in extra_requirements.values()
for item in sublist]
with open(path.join(here, 'requirements_test.txt'), encoding='utf-8') as f:
extra_requirements['test'] = (
extra_requirements['full'] + [line.strip() for line in f if line]
)
tensorflow_gpu = 'tensorflow-gpu'
for req in requirements:
if req.startswith('tensorflow'):
tensorflow_gpu = req.replace('tensorflow', 'tensorflow-gpu')
extra_requirements['gpu'] = [tensorflow_gpu]
setup(
name='ludwig',
version='0.2.1',
description='A deep learning experimentation toolbox',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://ludwig.ai',
author='Piero Molino',
author_email='[email protected]',
license='Apache 2.0',
keywords='ludwig deep learning deep_learning machine machine_learning natural language processing computer vision',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
python_requires='>=3',
include_package_data=True,
package_data={'ludwig': ['etc/*', 'examples/*.py']},
install_requires=requirements,
extras_require=extra_requirements,
entry_points={
'console_scripts': [
'ludwig=ludwig.cli:main'
]
}
)