-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsetup.py
81 lines (78 loc) · 2.87 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
from setuptools import setup
from setuptools.command.install import install
import subprocess
import os
PACKAGES=[ 'pandas==0.25.0',
'numpy',
'dask[dataframe]',
'distributed',
'nonechucks',
'dask-image',
'opencv-python',
'scikit-learn',
'scipy',
'umap-learn',
'pysnooper',
'tifffile',
'seaborn',
'scikit-image',
'openslide-python',
'Shapely',
'click==6.7',
'torch',
'torchvision',
'albumentations',
'GPUtil',
'beautifulsoup4',
'plotly',
'xarray',
'matplotlib',
'networkx',
'shap',
'pyyaml',
'torch-encoding',
'xmltodict',
#'lightnet',
'brambox',
'blosc',
'numcodecs',
'zarr',
'pytorchcv',
'h5py',
'timm'
]
with open('README.md','r', encoding='utf-8') as f:
long_description = f.read()
class CustomInstallCommand(install):
"""Custom install setup to help run shell commands (outside shell) before installation"""
def run(self):
#for package in PACKAGES:
#os.system('pip install {}'.format(package))#install.do_egg_install(self)
self.do_egg_install()#install.run(self)
subprocess.call('rm -rf apex'.split())
os.system('git clone https://github.com/NVIDIA/apex')
#try:
#os.system('cd apex && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./')
#except:
os.system('echo pwd && cd apex && (pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ || pip install -v --no-cache-dir ./)')
subprocess.call('rm -rf apex'.split())
setup(name='pathflowai',
version='0.1.1',
description='A modular approach for preprocessing and deep learning on histopathology images.',
url='https://github.com/jlevy44/PathFlowAI',
author='Joshua Levy',
author_email='[email protected]',
license='MIT',
scripts=['bin/install_apex',
'bin/install_lightnet'],
#cmdclass={'install': CustomInstallCommand},
entry_points={
'console_scripts':['pathflowai-preprocess=pathflowai.cli_preprocessing:preprocessing',
'pathflowai-visualize=pathflowai.cli_visualizations:visualize',
'pathflowai-monitor=pathflowai.monitor_memory_usage:monitor',
'pathflowai-train_model=pathflowai.model_training:train']
},
long_description=long_description,
long_description_content_type='text/markdown',
packages=['pathflowai'],
install_requires=PACKAGES)