-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
62 lines (53 loc) · 1.5 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
from distutils.core import setup
from setuptools import find_packages
import os
# Package Metadata
NAME = 'MVSNet'
VERSION = '0.1.4'
def ml_engine():
""" Checks whether this package is being installed on a Google AI Platform machine """
if 'CLOUD_ML_JOB_ID' in os.environ:
return True
else:
return False
def required_packages_ml_engine():
# ml-engine already has tensorflow-gpu installed, and a few other
# packages require different versions on ml-engine
PACKAGES = [
'progressbar2>=3.0',
'numpy>=1.13',
'opencv-python>=3.2',
'scikit-learn>=0.18',
'scipy>=0.18',
'matplotlib>=1.5',
'Pillow>=3.1.2',
'imageio',
'wandb',
]
return PACKAGES
def required_packages():
if ml_engine():
return required_packages_ml_engine()
else:
PACKAGES = [
'progressbar2==3.0.1',
'numpy==1.16.2',
'opencv-python-headless==4.1.0.25',
'scikit-learn==0.18',
'scipy==0.18',
'matplotlib==1.5',
'tensorflow==1.12.0',
'funcsigs==1.0.2',
'Pillow==6.1.0',
'imageio==2.5.0',
'wandb==0.8.4',
'Click==0.7',
]
return PACKAGES
setup(
name=NAME,
version=VERSION,
packages=find_packages(exclude=['datasets*', 'scripts*']),
install_requires=required_packages(),
license='Creative Commons Attribution-Noncommercial-Share Alike license',
)