forked from google-deepmind/acme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·114 lines (100 loc) · 3.21 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Install script for setuptools."""
import datetime
from importlib import util as import_util
import sys
from setuptools import find_packages
from setuptools import setup
spec = import_util.spec_from_file_location('_metadata', 'acme/_metadata.py')
_metadata = import_util.module_from_spec(spec)
spec.loader.exec_module(_metadata)
reverb_requirements = [
'dm-reverb',
'tensorflow>=2.3.0',
]
tf_requirements = [
'tensorflow>=2.3.0',
'tensorflow_probability',
'dm-sonnet',
'trfl',
]
jax_requirements = [
'jax',
'jaxlib',
'dm-haiku',
'optax',
'rlax @ git+git://github.com/deepmind/rlax.git#egg=rlax',
'dataclasses', # Back-port for Python 3.6.
'typing-extensions',
]
env_requirements = [
'bsuite @ git+git://github.com/deepmind/bsuite.git#egg=bsuite',
'dm-control',
'gym',
'gym[atari]',
]
testing_requirements = [
'pytype',
'pytest-xdist',
]
# Use the first paragraph of our README as the long_description.
with open('README.md', 'r') as fh:
long_description = fh.read().split('\n\n')[4]
# Add a link to github.
long_description += '\n\nFor more information see our '
long_description += '[github repository](https://github.com/deepmind/acme).'
# Get the version from metadata.
version = _metadata.__version__
# If we're releasing a nightly/dev version append to the version string.
if '--nightly' in sys.argv:
sys.argv.remove('--nightly')
version += '.dev' + datetime.datetime.now().strftime('%Y%m%d')
setup(
name='dm-acme',
version=version,
description='A Python library for Reinforcement Learning.',
long_description=long_description,
long_description_content_type='text/markdown',
author='DeepMind',
license='Apache License, Version 2.0',
keywords='reinforcement-learning python machine learning',
packages=find_packages(),
install_requires=[
'absl-py',
'dm_env',
'dm-tree',
'numpy',
'pillow',
],
extras_require={
'jax': jax_requirements,
'tf': tf_requirements,
'envs': env_requirements,
'reverb': reverb_requirements,
'testing': testing_requirements,
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
)