From 299c28140e7e74e3be8ef891e53a6847b2661c35 Mon Sep 17 00:00:00 2001 From: Antonin RAFFIN Date: Mon, 11 May 2020 17:39:41 +0200 Subject: [PATCH] Use conda env for building the doc (#16) --- .readthedocs.yml | 12 ++++++++---- docs/conda_env.yml | 16 ++++++++++++++++ docs/conf.py | 4 ---- docs/requirements.txt | 3 --- setup.py | 2 +- 5 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 docs/conda_env.yml delete mode 100644 docs/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 39d81bd..857c6f9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,8 +15,12 @@ sphinx: # Optionally build your docs in additional formats such as PDF and ePub formats: all +# Set requirements using conda env +conda: + environment: docs/conda_env.yml + # Optionally set the version of Python and requirements required to build your docs -python: - version: 3.7 - install: - - requirements: docs/requirements.txt +# python: +# version: 3.7 +# install: +# - requirements: docs/requirements.txt diff --git a/docs/conda_env.yml b/docs/conda_env.yml new file mode 100644 index 0000000..fcd09c9 --- /dev/null +++ b/docs/conda_env.yml @@ -0,0 +1,16 @@ +name: root +channels: + - pytorch + - defaults +dependencies: + - cpuonly=1.0=0 + - pip=20.0 + - python=3.6 + - pytorch=1.5.0=py3.6_cpu_0 + - pip: + - gym==0.17.2 + - cloudpickle + - opencv-python-headless + - pandas + - numpy + - matplotlib diff --git a/docs/conf.py b/docs/conf.py index 41df582..5d74970 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -216,7 +216,3 @@ texinfo_documents = [ # 'numpy': ('http://docs.scipy.org/doc/numpy/', None), # 'torch': ('http://pytorch.org/docs/master/', None), # } - -# kornia's hack to get rtd builder to install latest pytorch -if on_rtd: - os.system('pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html') diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 0878e54..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -gym>=0.17 -pandas -matplotlib diff --git a/setup.py b/setup.py index 9a596db..dd1506a 100644 --- a/setup.py +++ b/setup.py @@ -104,7 +104,7 @@ setup(name='stable_baselines3', # For render 'opencv-python', # For atari games, - 'atari_py~=0.2.0', 'Pillow' + 'atari_py~=0.2.0', 'pillow' ] }, description='Pytorch version of Stable Baselines, implementations of reinforcement learning algorithms.',