Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,35 @@ repos:
args:
- --ignore-words-list=nd,reacher,thist,ths,magent
- --skip=docs/css/termynal.css,docs/js/termynal.js
- repo: https://github.com/python-poetry/poetry
rev: 1.2.0b1
hooks:
- id: poetry-export
name: poetry-export requirements.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements.txt"]
stages: [manual]
- id: poetry-export
name: poetry-export requirements-atari.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements-atari.txt", "-E", "atari"]
stages: [manual]
- id: poetry-export
name: poetry-export requirements-pybullet.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements-pybullet.txt", "-E", "pybullet"]
stages: [manual]
- id: poetry-export
name: poetry-export requirements-mujoco.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements-mujoco.txt", "-E", "mujoco"]
stages: [manual]
- id: poetry-export
name: poetry-export requirements-procgen.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements-procgen.txt", "-E", "procgen"]
stages: [manual]
- id: poetry-export
name: poetry-export requirements-envpool.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements-envpool.txt", "-E", "envpool"]
stages: [manual]
- id: poetry-export
name: poetry-export requirements-pettingzoo.txt
args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements/requirements-pettingzoo.txt", "-E", "pettingzoo"]
stages: [manual]

34 changes: 29 additions & 5 deletions docs/get-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ poetry install

<script id="asciicast-443647" src="https://asciinema.org/a/443647.js" async></script>


!!! note "Working with PyPI mirrors"

Users in some countries (e.g., China) can usually speed up package installation via faster PyPI mirrors. If this helps you, try appending the following lines to the [pyproject.toml](https://github.com/vwxyzjn/cleanrl/blob/master/pyproject.toml) at the root of this repository and run `poetry install`

```toml
[[tool.poetry.source]]
name = "douban"
url = "https://pypi.doubanio.com/simple/"
default = true
```

## Optional Dependencies

CleanRL makes it easy to install optional dependencies for common RL environments
Expand All @@ -34,13 +46,25 @@ spyder = ["spyder"]

You can install them using the following command

```
```bash
poetry install -E atari
poetry install -E pybullet
poetry install -E mujoco
poetry install -E procgen
poetry install -E envpool
poetry install -E pettingzoo
poetry install -E plot
poetry install -E cloud
poetry install -E docs
poetry install -E spyder
```

## Install via `pip`

While we recommend using `poetry` to manage environments and dependencies, the traditional `requirements.txt` are available:

```bash
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-atari.txt
pip install -r requirements/requirements-pybullet.txt
pip install -r requirements/requirements-mujoco.txt
pip install -r requirements/requirements-procgen.txt
pip install -r requirements/requirements-envpool.txt
pip install -r requirements/requirements-pettingzoo.txt
```
67 changes: 67 additions & 0 deletions requirements/requirements-atari.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
absl-py==1.0.0 ; python_version >= "3.6"
ale-py==0.7.4
autorom.accept-rom-license==0.4.2 ; python_version >= "3.6"
autorom==0.4.2
cachetools==5.0.0 ; python_version >= "3.7" and python_version < "4.0"
certifi==2021.10.8 ; python_version >= "3.6"
charset-normalizer==2.0.12 ; python_version >= "3.6"
click==8.0.4 ; python_version >= "3.6"
cloudpickle==2.0.0 ; python_version >= "3.6"
colorama==0.4.3 ; platform_system == "Windows" and python_version >= "3.6"
cycler==0.11.0 ; python_version >= "3.7"
docker-pycreds==0.4.0 ; python_version >= "3.6"
fonttools==4.29.1 ; python_version >= "3.7"
gitdb==4.0.9 ; python_version >= "3.7"
gitpython==3.1.27 ; python_version >= "3.7"
google-auth-oauthlib==0.4.6 ; python_version >= "3.6"
google-auth==2.6.0 ; python_full_version >= "3.6.0"
grpcio==1.44.0 ; python_version >= "3.6"
gym-notices==0.0.5 ; python_version >= "3.7"
gym==0.23.1
idna==3.3 ; python_version >= "3.6"
importlib-metadata==4.11.2 ; python_version < "3.8" and python_version >= "3.7" or python_version < "3.10" and python_version >= "3.7"
importlib-resources==5.4.0 ; python_version < "3.9" and python_version >= "3.6" or python_version >= "3.7"
kiwisolver==1.3.2 ; python_version >= "3.7"
markdown==3.3.6 ; python_version >= "3.6"
matplotlib==3.5.1 ; python_version >= "3.7"
numpy==1.21.5 ; python_version >= "3.7" and python_version < "3.11" or python_version >= "3.7" and python_version < "3.11" and platform_system == "Darwin" and platform_machine == "arm64" or python_version >= "3.7" and python_version < "3.11" and (python_version >= "3.6" and platform_system == "Linux" and platform_machine == "aarch64" or python_version >= "3.9") or python_version >= "3.8" and python_version < "3.11" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine != "aarch64" and platform_machine != "arm64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "aarch64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "arm64"
oauthlib==3.2.0 ; python_version >= "3.6"
opencv-python==3.4.17.61
packaging==21.3 ; python_version >= "3.7"
pandas==1.3.5
pathtools==0.1.2 ; python_version >= "3.6"
pillow==9.0.1 ; python_version >= "3.7"
promise==2.3 ; python_version >= "3.6"
protobuf==3.19.4 ; python_version >= "3.6"
psutil==5.9.0 ; python_version >= "3.6"
pyasn1-modules==0.2.8 ; python_full_version >= "3.6.0"
pyasn1==0.4.8 ; python_version >= "3.6" and python_version < "4" or python_full_version >= "3.6.0"
pygame==2.1.0
pyglet==1.5.22
pyparsing==3.0.7 ; python_version >= "3.7"
python-dateutil==2.8.2 ; python_version >= "3.6"
pytz==2021.3 ; python_full_version >= "3.7.1"
pyyaml==5.4.1 ; python_full_version >= "3.6.0"
requests-oauthlib==1.3.1 ; python_version >= "3.6"
requests==2.27.1 ; python_version >= "3.6"
rsa==4.7.2 ; python_version >= "3.6" and python_version < "4"
sentry-sdk==1.5.7 ; python_version >= "3.6"
setproctitle==1.2.2 ; python_version >= "3.6"
setuptools-scm==6.4.2 ; python_version >= "3.7"
shortuuid==1.0.8 ; python_version >= "3.6"
six==1.16.0 ; python_version >= "3.6"
smmap==5.0.0 ; python_version >= "3.7"
stable-baselines3==1.2.0
tensorboard-data-server==0.6.1 ; python_version >= "3.6"
tensorboard-plugin-wit==1.8.1 ; python_version >= "3.6"
tensorboard==2.8.0
termcolor==1.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
tomli==2.0.1 ; python_version >= "3.7"
torch==1.10.2
tqdm==4.63.0 ; python_version >= "3.6"
typing-extensions==4.1.1 ; python_version < "3.8" and python_version >= "3.7" or python_full_version >= "3.6.2"
urllib3==1.26.8 ; python_full_version >= "3.6.0" and python_version < "4" or python_version >= "3.6" and python_version < "4"
wandb==0.12.11
werkzeug==2.0.3 ; python_version >= "3.6"
yaspin==2.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
zipp==3.7.0 ; python_version < "3.8" and python_version >= "3.7" or python_version < "3.9" and python_version >= "3.7"
66 changes: 66 additions & 0 deletions requirements/requirements-envpool.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
absl-py==1.0.0 ; python_version >= "3.6"
cachetools==5.0.0 ; python_version >= "3.7" and python_version < "4.0"
certifi==2021.10.8 ; python_full_version >= "3.6.0"
charset-normalizer==2.0.12 ; python_full_version >= "3.6.0"
click==8.0.4 ; python_version >= "3.6"
cloudpickle==2.0.0 ; python_version >= "3.6"
colorama==0.4.3 ; platform_system == "Windows" and python_version >= "3.6"
cycler==0.11.0 ; python_version >= "3.7"
dm-env==1.5 ; python_version >= "3.7"
dm-tree==0.1.6 ; python_version >= "3.7"
docker-pycreds==0.4.0 ; python_version >= "3.6"
envpool==0.4.5
fonttools==4.29.1 ; python_version >= "3.7"
gitdb==4.0.9 ; python_version >= "3.7"
gitpython==3.1.27 ; python_version >= "3.7"
google-auth-oauthlib==0.4.6 ; python_version >= "3.6"
google-auth==2.6.0 ; python_full_version >= "3.6.0"
grpcio==1.44.0 ; python_version >= "3.6"
gym-notices==0.0.5 ; python_version >= "3.7"
gym==0.23.1
idna==3.3 ; python_full_version >= "3.6.0"
importlib-metadata==4.11.2 ; python_version < "3.10" and python_version >= "3.7" or python_version < "3.8" and python_version >= "3.7"
kiwisolver==1.3.2 ; python_version >= "3.7"
markdown==3.3.6 ; python_version >= "3.6"
matplotlib==3.5.1 ; python_version >= "3.7"
numpy==1.21.5 ; python_version >= "3.7" and python_version < "3.11" or python_version >= "3.7" and python_version < "3.11" and platform_system == "Darwin" and platform_machine == "arm64" or python_version >= "3.7" and python_version < "3.11" and (python_version >= "3.6" and platform_system == "Linux" and platform_machine == "aarch64" or python_version >= "3.9") or python_version >= "3.8" and python_version < "3.11" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine != "aarch64" and platform_machine != "arm64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "aarch64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "arm64"
oauthlib==3.2.0 ; python_version >= "3.6"
opencv-python==3.4.17.61
packaging==21.3 ; python_version >= "3.7"
pandas==1.3.5
pathtools==0.1.2 ; python_version >= "3.6"
pillow==9.0.1 ; python_version >= "3.7"
promise==2.3 ; python_version >= "3.6"
protobuf==3.19.4 ; python_version >= "3.6"
psutil==5.9.0 ; python_version >= "3.6"
pyasn1-modules==0.2.8 ; python_full_version >= "3.6.0"
pyasn1==0.4.8 ; python_version >= "3.6" and python_version < "4" or python_full_version >= "3.6.0"
pygame==2.1.0
pyglet==1.5.22
pyparsing==3.0.7 ; python_version >= "3.7"
python-dateutil==2.8.2 ; python_version >= "3.6"
pytz==2021.3 ; python_full_version >= "3.7.1"
pyyaml==5.4.1 ; python_full_version >= "3.6.0"
requests-oauthlib==1.3.1 ; python_version >= "3.6"
requests==2.27.1 ; python_full_version >= "3.6.0"
rsa==4.7.2 ; python_version >= "3.6" and python_version < "4"
sentry-sdk==1.5.7 ; python_version >= "3.6"
setproctitle==1.2.2 ; python_version >= "3.6"
setuptools-scm==6.4.2 ; python_version >= "3.7"
shortuuid==1.0.8 ; python_version >= "3.6"
six==1.16.0 ; python_version >= "3.6"
smmap==5.0.0 ; python_version >= "3.7"
stable-baselines3==1.2.0
tensorboard-data-server==0.6.1 ; python_version >= "3.6"
tensorboard-plugin-wit==1.8.1 ; python_version >= "3.6"
tensorboard==2.8.0
termcolor==1.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
tomli==2.0.1 ; python_version >= "3.7"
torch==1.10.2
types-protobuf==3.19.12 ; python_version >= "3.7"
typing-extensions==4.1.1 ; python_version < "3.8" and python_version >= "3.7" or python_full_version >= "3.6.2"
urllib3==1.26.8 ; python_full_version >= "3.6.0" and python_version < "4" or python_version >= "3.6" and python_version < "4"
wandb==0.12.11
werkzeug==2.0.3 ; python_version >= "3.6"
yaspin==2.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
zipp==3.7.0 ; python_version < "3.8" and python_version >= "3.7"
70 changes: 70 additions & 0 deletions requirements/requirements-mujoco.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
absl-py==1.0.0 ; python_version >= "3.6"
cachetools==5.0.0 ; python_version >= "3.7" and python_version < "4.0"
certifi==2021.10.8 ; python_full_version >= "3.6.0"
cffi==1.15.0 ; python_full_version >= "3.7.1" and python_version < "3.11"
charset-normalizer==2.0.12 ; python_full_version >= "3.6.0"
click==8.0.4 ; python_version >= "3.6"
cloudpickle==2.0.0 ; python_version >= "3.6"
colorama==0.4.3 ; platform_system == "Windows" and python_version >= "3.6"
cycler==0.11.0 ; python_version >= "3.7"
cython==0.29.28 ; python_full_version >= "3.7.1" and python_version < "3.11"
docker-pycreds==0.4.0 ; python_version >= "3.6"
fasteners==0.15 ; python_full_version >= "3.7.1" and python_version < "3.11"
fonttools==4.29.1 ; python_version >= "3.7"
free-mujoco-py==2.1.6
gitdb==4.0.9 ; python_version >= "3.7"
gitpython==3.1.27 ; python_version >= "3.7"
glfw==1.12.0 ; python_full_version >= "3.7.1" and python_version < "3.11"
google-auth-oauthlib==0.4.6 ; python_version >= "3.6"
google-auth==2.6.0 ; python_full_version >= "3.6.0"
grpcio==1.44.0 ; python_version >= "3.6"
gym-notices==0.0.5 ; python_version >= "3.7"
gym==0.23.1
idna==3.3 ; python_full_version >= "3.6.0"
imageio==2.16.1 ; python_full_version >= "3.7.1" and python_version < "3.11"
importlib-metadata==4.11.2 ; python_version < "3.10" and python_version >= "3.7" or python_version < "3.8" and python_version >= "3.7"
kiwisolver==1.3.2 ; python_version >= "3.7"
markdown==3.3.6 ; python_version >= "3.6"
matplotlib==3.5.1 ; python_version >= "3.7"
monotonic==1.6 ; python_full_version >= "3.7.1" and python_version < "3.11"
numpy==1.21.5 ; python_version >= "3.7" and python_version < "3.11" or python_version >= "3.7" and python_version < "3.11" and platform_system == "Darwin" and platform_machine == "arm64" or python_version >= "3.7" and python_version < "3.11" and (python_version >= "3.6" and platform_system == "Linux" and platform_machine == "aarch64" or python_version >= "3.9") or python_version >= "3.8" and python_version < "3.11" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine != "aarch64" and platform_machine != "arm64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "aarch64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "arm64" or python_full_version >= "3.7.1" and python_version < "3.11"
oauthlib==3.2.0 ; python_version >= "3.6"
opencv-python==3.4.17.61
packaging==21.3 ; python_version >= "3.7"
pandas==1.3.5
pathtools==0.1.2 ; python_version >= "3.6"
pillow==9.0.1 ; python_full_version >= "3.7.1" and python_version < "3.11" or python_version >= "3.7"
promise==2.3 ; python_version >= "3.6"
protobuf==3.19.4 ; python_version >= "3.6"
psutil==5.9.0 ; python_version >= "3.6"
pyasn1-modules==0.2.8 ; python_full_version >= "3.6.0"
pyasn1==0.4.8 ; python_version >= "3.6" and python_version < "4" or python_full_version >= "3.6.0"
pycparser==2.21 ; python_full_version >= "3.7.1" and python_version < "3.11"
pygame==2.1.0
pyglet==1.5.22
pyparsing==3.0.7 ; python_version >= "3.7"
python-dateutil==2.8.2 ; python_version >= "3.6"
pytz==2021.3 ; python_full_version >= "3.7.1"
pyyaml==5.4.1 ; python_full_version >= "3.6.0"
requests-oauthlib==1.3.1 ; python_version >= "3.6"
requests==2.27.1 ; python_full_version >= "3.6.0"
rsa==4.7.2 ; python_version >= "3.6" and python_version < "4"
sentry-sdk==1.5.7 ; python_version >= "3.6"
setproctitle==1.2.2 ; python_version >= "3.6"
setuptools-scm==6.4.2 ; python_version >= "3.7"
shortuuid==1.0.8 ; python_version >= "3.6"
six==1.16.0 ; python_full_version >= "3.7.1" and python_version < "3.11" or python_version >= "3.6"
smmap==5.0.0 ; python_version >= "3.7"
stable-baselines3==1.2.0
tensorboard-data-server==0.6.1 ; python_version >= "3.6"
tensorboard-plugin-wit==1.8.1 ; python_version >= "3.6"
tensorboard==2.8.0
termcolor==1.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
tomli==2.0.1 ; python_version >= "3.7"
torch==1.10.2
typing-extensions==4.1.1 ; python_version < "3.8" and python_version >= "3.7" or python_full_version >= "3.6.2"
urllib3==1.26.8 ; python_full_version >= "3.6.0" and python_version < "4" or python_version >= "3.6" and python_version < "4"
wandb==0.12.11
werkzeug==2.0.3 ; python_version >= "3.6"
yaspin==2.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
zipp==3.7.0 ; python_version < "3.8" and python_version >= "3.7"
66 changes: 66 additions & 0 deletions requirements/requirements-pettingzoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
absl-py==1.0.0 ; python_version >= "3.6"
cachetools==5.0.0 ; python_version >= "3.7" and python_version < "4.0"
certifi==2021.10.8 ; python_full_version >= "3.6.0"
cffi==1.15.0 ; python_version >= "3.6"
charset-normalizer==2.0.12 ; python_full_version >= "3.6.0"
click==8.0.4 ; python_version >= "3.6"
cloudpickle==2.0.0 ; python_version >= "3.6"
colorama==0.4.3 ; platform_system == "Windows" and python_version >= "3.6"
cycler==0.11.0 ; python_version >= "3.7"
docker-pycreds==0.4.0 ; python_version >= "3.6"
fonttools==4.29.1 ; python_version >= "3.7"
gitdb==4.0.9 ; python_version >= "3.7"
gitpython==3.1.27 ; python_version >= "3.7"
google-auth-oauthlib==0.4.6 ; python_version >= "3.6"
google-auth==2.6.0 ; python_full_version >= "3.6.0"
grpcio==1.44.0 ; python_version >= "3.6"
gym-notices==0.0.5 ; python_version >= "3.7"
gym==0.23.1
idna==3.3 ; python_full_version >= "3.6.0"
importlib-metadata==4.11.2 ; python_version < "3.10" and python_version >= "3.7" or python_version < "3.8" and python_version >= "3.7"
kiwisolver==1.3.2 ; python_version >= "3.7"
markdown==3.3.6 ; python_version >= "3.6"
matplotlib==3.5.1 ; python_version >= "3.7"
numpy==1.21.5 ; python_version >= "3.7" and python_version < "3.11" or python_version >= "3.7" and python_version < "3.11" and platform_system == "Darwin" and platform_machine == "arm64" or python_version >= "3.7" and python_version < "3.11" and (python_version >= "3.6" and platform_system == "Linux" and platform_machine == "aarch64" or python_version >= "3.9") or python_version >= "3.8" and python_version < "3.11" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine != "aarch64" and platform_machine != "arm64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "aarch64" or python_full_version >= "3.7.1" and python_version < "3.10" and platform_machine == "arm64"
oauthlib==3.2.0 ; python_version >= "3.6"
opencv-python==3.4.17.61
packaging==21.3 ; python_version >= "3.7"
pandas==1.3.5
pathtools==0.1.2 ; python_version >= "3.6"
pettingzoo==1.16.0
pillow==9.0.1 ; python_version >= "3.7"
promise==2.3 ; python_version >= "3.6"
protobuf==3.19.4 ; python_version >= "3.6"
psutil==5.9.0 ; python_version >= "3.6"
pyasn1-modules==0.2.8 ; python_full_version >= "3.6.0"
pyasn1==0.4.8 ; python_version >= "3.6" and python_version < "4" or python_full_version >= "3.6.0"
pycparser==2.21 ; python_version >= "3.6"
pygame==2.1.0
pyglet==1.5.22
pymunk==6.2.1
pyparsing==3.0.7 ; python_version >= "3.7"
python-dateutil==2.8.2 ; python_version >= "3.6"
pytz==2021.3 ; python_full_version >= "3.7.1"
pyyaml==5.4.1 ; python_full_version >= "3.6.0"
requests-oauthlib==1.3.1 ; python_version >= "3.6"
requests==2.27.1 ; python_full_version >= "3.6.0"
rsa==4.7.2 ; python_version >= "3.6" and python_version < "4"
sentry-sdk==1.5.7 ; python_version >= "3.6"
setproctitle==1.2.2 ; python_version >= "3.6"
setuptools-scm==6.4.2 ; python_version >= "3.7"
shortuuid==1.0.8 ; python_version >= "3.6"
six==1.16.0 ; python_version >= "3.6"
smmap==5.0.0 ; python_version >= "3.7"
stable-baselines3==1.2.0
tensorboard-data-server==0.6.1 ; python_version >= "3.6"
tensorboard-plugin-wit==1.8.1 ; python_version >= "3.6"
tensorboard==2.8.0
termcolor==1.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
tomli==2.0.1 ; python_version >= "3.7"
torch==1.10.2
typing-extensions==4.1.1 ; python_version < "3.8" and python_version >= "3.7" or python_full_version >= "3.6.2"
urllib3==1.26.8 ; python_full_version >= "3.6.0" and python_version < "4" or python_version >= "3.6" and python_version < "4"
wandb==0.12.11
werkzeug==2.0.3 ; python_version >= "3.6"
yaspin==2.1.0 ; python_full_version >= "3.6.2" and python_full_version < "4.0.0"
zipp==3.7.0 ; python_version < "3.8" and python_version >= "3.7"
Loading