forked from PufferAI/PufferLib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
260 lines (248 loc) · 6.86 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
from setuptools import find_packages, setup
from Cython.Build import cythonize
import numpy
VERSION = '1.0.1'
# Default Gym/Gymnasium/PettingZoo versions
# Gym:
# - 0.26 still has deprecation warnings and is the last version of the package
# - 0.25 adds a breaking API change to reset, step, and render_modes
# - 0.24 is broken
# - 0.22-0.23 triggers deprecation warnings by calling its own functions
# - 0.21 is the most stable version
# - <= 0.20 is missing dict methods for gym.spaces.Dict
# - 0.18-0.21 require setuptools<=65.5.0
GYMNASIUM_VERSION = '0.29.1'
GYM_VERSION = '0.23'
PETTINGZOO_VERSION = '1.24.1'
docs = [
'sphinx==5.0.0',
'sphinx-rtd-theme==0.5.1',
'sphinxcontrib-youtube==1.0.1',
'sphinx-rtd-theme==0.5.1',
'sphinx-design==0.4.1',
'furo==2023.3.27',
]
cleanrl = [
'stable_baselines3==2.1.0',
'tensorboard==2.11.2',
'torch',
'wandb==0.13.7',
'psutil==5.9.5',
'tyro==0.5.10',
'pynvml'
]
ray = [
'ray==2.23.0',
]
environments = {
'avalon': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'avalon-rl==1.0.0',
],
'atari': [
f'gym=={GYM_VERSION}',
f'gymnasium[atari,accept-rom-license]=={GYMNASIUM_VERSION}',
'stable_baselines3==2.1.0',
],
'box2d': [
f'gym=={GYM_VERSION}',
f'gymnasium[box2d]=={GYMNASIUM_VERSION}',
'swig==4.1.1',
],
'bsuite': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'bsuite==0.3.5',
],
'butterfly': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
f'pettingzoo[butterfly]=={PETTINGZOO_VERSION}',
],
'classic_control': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
],
'crafter': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'crafter==1.8.3',
],
'dm_control': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'dm_control==1.0.11',
],
'dm_lab': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'gym_deepmindlab==0.1.2',
'dm_env==1.6',
],
'griddly': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'griddly==1.6.7',
'imageio',
],
'magent': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'pettingzoo==1.19.0',
'magent==0.2.4',
# The Magent2 package is broken for now
#'magent2==0.3.2',
],
'microrts': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'ffmpeg==1.4',
'gym_microrts==0.3.2',
],
'minerl': [
'gym==0.17.0',
f'gymnasium=={GYMNASIUM_VERSION}',
'minerl==0.4.4',
# Compatiblity warning with urllib3 and chardet
'requests==2.31.0',
],
'minigrid': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'minigrid==2.3.1',
],
'minihack': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'minihack==0.1.5',
],
'nethack': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'nle>=0.9.1',
],
'nmmo': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
f'pettingzoo=={PETTINGZOO_VERSION}',
'nmmo>=2.1',
],
'open_spiel': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'open_spiel==1.3',
'pettingzoo==1.19.0',
],
'pokemon_red': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'pokegym>=0.2.0',
'einops==0.6.1',
'matplotlib',
'scikit-image',
'pyboy<2.0.0',
'hnswlib==0.7.0',
'mediapy',
'pandas==2.0.2',
'pettingzoo',
'websockets',
],
'procgen': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'procgen-mirror==0.10.7', # Procgen mirror for 3.11 and 3.12 support
# Note: You need glfw==2.7 after installing for some torch versions
],
#'smac': [
# 'git+https://github.com/oxwhirl/smac.git',
#],
#'stable-retro': [
# 'git+https://github.com/Farama-Foundation/stable-retro.git',
#]
'slimevolley': [
f'gym=={GYM_VERSION}',
f'gymnasium=={GYMNASIUM_VERSION}',
'slimevolleygym==0.1.0',
],
'vizdoom': [
'vizdoom==1.2.3',
],
}
# These are the environments that PufferLib has made
# compatible with the latest version of Gym/Gymnasium/PettingZoo
# They are included in PufferTank as a default heavy install
# We force updated versions of Gym/Gymnasium/PettingZoo here to
# ensure that users do not have issues with conflicting versions
# when switching to incompatible environments
common = cleanrl + [environments[env] for env in [
'atari',
#'box2d',
'bsuite',
#'butterfly',
'classic_control',
'crafter',
'dm_control',
'dm_lab',
'griddly',
'microrts',
'minigrid',
'minihack',
'nethack',
'nmmo',
'pokemon_red',
'procgen',
'vizdoom',
]]
setup(
name="pufferlib",
description="PufferAI Library"
"PufferAI's library of RL tools and utilities",
long_description_content_type="text/markdown",
version=VERSION,
packages=find_packages(),
include_package_data=True,
install_requires=[
'numpy==1.23.3',
'opencv-python==3.4.17.63',
'cython>=3.0.0',
'rich',
'rich_argparse',
f'gym<={GYM_VERSION}',
f'gymnasium<={GYMNASIUM_VERSION}',
f'pettingzoo<={PETTINGZOO_VERSION}',
'shimmy[gym-v21]',
'pygame==2.5.2', # Pin for now
],
extras_require={
'docs': docs,
'ray': ray,
'cleanrl': cleanrl,
'common': common,
**environments,
},
ext_modules = cythonize("pufferlib/extensions.pyx"),
include_dirs=[numpy.get_include()],
python_requires=">=3.8",
license="MIT",
author="Joseph Suarez",
author_email="[email protected]",
url="https://github.com/PufferAI/PufferLib",
keywords=["Puffer", "AI", "RL", "Reinforcement Learning"],
classifiers=[
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
)
#stable_baselines3
#supersuit==3.3.5
#'git+https://github.com/oxwhirl/smac.git',
#curl -L -o smac.zip https://blzdistsc2-a.akamaihd.net/Linux/SC2.4.10.zip
#unzip -P iagreetotheeula smac.zip
#curl -L -o maps.zip https://github.com/oxwhirl/smac/releases/download/v0.1-beta1/SMAC_Maps.zip
#unzip maps.zip && mv SMAC_Maps/ StarCraftII/Maps/