-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
64 lines (55 loc) · 1.95 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
import os
import setuptools
from setuptools import setup
def version():
initPath = os.path.abspath(os.path.join(__file__, "..", "deepEMhancer", "__init__.py"))
with open(initPath) as f:
version = f.read().strip().split('"')[-2]
return version
def readme():
readmePath = os.path.abspath(os.path.join(__file__, "..", "README.md"))
try:
with open(readmePath) as f:
return f.read()
except UnicodeDecodeError:
try:
with open(readmePath, 'r', encoding='utf-8') as f:
return f.read()
except Exception as e:
return "Description not available due to unexpected error: "+str(e)
install_requires = [
'numpy==1.23.*',
'scikit-image==0.19.*',
'scipy==1.9.*',
'joblib==1.2.*',
'mrcfile==1.4.*',
'requests==2.31.*',
'tqdm==4.66.3',
]
installTfCpuOnly = os.environ.get("DEEPEMHANCER_CPU_ONLY", None)
if not installTfCpuOnly:
tfTarget='tensorflow-gpu==2.10.*'
# install_requires.append("cuda-python==11.8.*") #Install cuda. Not working
# install_requires.append("nvidia-cudnn-cu11==8.5.*") #Install cuda. Not working
else:
tfTarget='tensorflow==2.10.*'
install_requires.append(tfTarget)
setup(name='deepEMhancer',
version=version(),
description='Deep learning for cryo-EM maps post-processing',
long_description=readme(),
long_description_content_type="text/markdown",
keywords='cryo-EM deep learning',
url='https://github.com/rsanchezgarc/deepEMhancer',
author='Ruben Sanchez-Garcia',
author_email='[email protected]',
license='Apache 2.0',
packages=setuptools.find_packages(),
install_requires=install_requires,
dependency_links=[],
entry_points={
'console_scripts': ['deepemhancer=deepEMhancer.exeDeepEMhancer:commanLineFun'],
},
include_package_data=True,
zip_safe=False)
#python -c "import tensorflow as tf; tf.zeros((3,2))" && python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"