-
Notifications
You must be signed in to change notification settings - Fork 41
/
setup.py
41 lines (36 loc) · 1.06 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
#!/usr/bin/env python
import os
from setuptools import find_packages, setup
# Check environment variable for the backend choice
ml_backend = os.getenv('ML_BACKEND', 'tensorflow').lower()
# Base requirements
install_requires = [
"xarray",
"numpy",
"pandas",
"matplotlib",
"netCDF4",
"h5py",
"tqdm",
]
# Conditional requirements based on the backend choice
if ml_backend == 'pytorch':
install_requires.append('torch')
elif ml_backend == 'tensorflow':
install_requires.append('tensorflow')
else:
raise ValueError(f"Unsupported ML_BACKEND value: {ml_backend}. Choose 'tensorflow' or 'pytorch'.")
setup(
name="climsim_utils",
version="0.0.1",
description="""
Tools for working with ClimSim, an open large-scale dataset for training
high-resolution physics emulators in hybrid multi-scale climate simulators.
""",
author="Jerry Lin",
author_email="[email protected]",
url="https://github.com/leap-stc/ClimSim",
python_requires=">=3.9",
install_requires=install_requires,
packages=find_packages(),
)