diff --git a/.travis.yml b/.travis.yml index c88d8ad460..049cc0ffc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ python: env: global: - - DOCKER_IMAGE=stablebaselines/stable-baselines-cpu:v2.9.0 + - DOCKER_IMAGE=stablebaselines/stable-baselines-cpu:v2.10.0 notifications: email: false @@ -39,7 +39,7 @@ jobs: - name: "Sphinx Documentation" script: - - 'docker run -it --rm --mount src=$(pwd),target=/root/code/stable-baselines,type=bind ${DOCKER_IMAGE} bash -c "cd /root/code/stable-baselines/ && pip install .[docs] && pushd docs/ && make clean && make html"' + - 'docker run -it --rm --mount src=$(pwd),target=/root/code/stable-baselines,type=bind ${DOCKER_IMAGE} bash -c "cd /root/code/stable-baselines/ && pushd docs/ && make clean && make html"' - name: "Type Checking" script: diff --git a/Dockerfile b/Dockerfile index d686538b92..24aec04624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,12 +27,13 @@ ENV VENV /root/venv COPY ./setup.py ${CODE_DIR}/stable-baselines/setup.py RUN \ + pip install pip --upgrade && \ pip install virtualenv && \ virtualenv $VENV --python=python3 && \ . $VENV/bin/activate && \ pip install --upgrade pip && \ cd ${CODE_DIR}/stable-baselines && \ - pip install -e .[mpi,tests] && \ + pip install -e .[mpi,tests,docs] && \ rm -rf $HOME/.cache/pip ENV PATH=$VENV/bin:$PATH diff --git a/Makefile b/Makefile index c8de067857..adefff3f67 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,25 @@ spelling: # Clean the doc build folder clean: cd docs && make clean + +# Build docker images +# If you do export RELEASE=True, it will also push them +docker: docker-cpu docker-gpu + +docker-cpu: + ./scripts/build_docker.sh + +docker-gpu: + USE_GPU=True ./scripts/build_docker.sh + +# PyPi package release +release: + python setup.py sdist + python setup.py bdist_wheel + twine upload dist/* + +# Test PyPi package release +test-release: + python setup.py sdist + python setup.py bdist_wheel + twine upload --repository-url https://test.pypi.org/legacy/ dist/* diff --git a/docs/guide/install.rst b/docs/guide/install.rst index 134f4a7fe2..e61d5155b6 100644 --- a/docs/guide/install.rst +++ b/docs/guide/install.rst @@ -116,13 +116,13 @@ Build GPU image (with nvidia-docker): .. code-block:: bash - USE_GPU=True ./scripts/build_docker.sh + make docker-gpu Build CPU image: .. code-block:: bash - ./scripts/build_docker.sh + make docker-cpu Note: if you are using a proxy, you need to pass extra params during build and do some `tweaks`_: diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 0b23c5f407..22379b94f7 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -6,8 +6,10 @@ Changelog For download links, please look at `Github release page `_. -Pre-Release 2.10.0a0 (WIP) --------------------------- +Release 2.10.0 (2020-03-11) +--------------------------- + +**Callback collection, cleanup and bug fixes** Breaking Changes: ^^^^^^^^^^^^^^^^^ @@ -73,6 +75,7 @@ Bug Fixes: - Fixed partial minibatch computation in ExpertDataset (@richardwu) - Fixed normalization (with ``VecNormalize``) for off-policy algorithms - Fixed ``sync_envs_normalization`` to sync the reward normalization too +- Bump minimum Gym version (>=0.11) Deprecations: ^^^^^^^^^^^^^ diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh index 69bea8b144..adca93dae0 100755 --- a/scripts/build_docker.sh +++ b/scripts/build_docker.sh @@ -4,7 +4,7 @@ CPU_PARENT=ubuntu:16.04 GPU_PARENT=nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04 TAG=stablebaselines/stable-baselines -VERSION=v2.9.0 +VERSION=v2.10.0 if [[ ${USE_GPU} == "True" ]]; then PARENT=${GPU_PARENT} diff --git a/scripts/run_docker_cpu.sh b/scripts/run_docker_cpu.sh index adda297cc0..355490e993 100755 --- a/scripts/run_docker_cpu.sh +++ b/scripts/run_docker_cpu.sh @@ -7,5 +7,5 @@ echo "Executing in the docker (cpu image):" echo $cmd_line docker run -it --rm --network host --ipc=host \ - --mount src=$(pwd),target=/root/code/stable-baselines,type=bind stablebaselines/stable-baselines-cpu:v2.9.0 \ + --mount src=$(pwd),target=/root/code/stable-baselines,type=bind stablebaselines/stable-baselines-cpu:v2.10.0 \ bash -c "cd /root/code/stable-baselines/ && $cmd_line" diff --git a/scripts/run_docker_gpu.sh b/scripts/run_docker_gpu.sh index 2022a46e88..a578347020 100755 --- a/scripts/run_docker_gpu.sh +++ b/scripts/run_docker_gpu.sh @@ -15,5 +15,5 @@ else fi docker run -it ${NVIDIA_ARG} --rm --network host --ipc=host \ - --mount src=$(pwd),target=/root/code/stable-baselines,type=bind stablebaselines/stable-baselines:v2.9.0 \ + --mount src=$(pwd),target=/root/code/stable-baselines,type=bind stablebaselines/stable-baselines:v2.10.0 \ bash -c "cd /root/code/stable-baselines/ && $cmd_line" diff --git a/setup.py b/setup.py index 075540a01d..bf3280a728 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def find_tf_dependency(): 'stable_baselines': ['py.typed'], }, install_requires=[ - 'gym[atari,classic_control]>=0.10.9', + 'gym[atari,classic_control]>=0.11', 'scipy', 'joblib', 'cloudpickle>=0.5.5', @@ -152,7 +152,7 @@ def find_tf_dependency(): license="MIT", long_description=long_description, long_description_content_type='text/markdown', - version="2.10.0a0", + version="2.10.0", ) # python setup.py sdist diff --git a/stable_baselines/__init__.py b/stable_baselines/__init__.py index 986979c7ab..bc1db0d47c 100644 --- a/stable_baselines/__init__.py +++ b/stable_baselines/__init__.py @@ -20,4 +20,4 @@ from stable_baselines.trpo_mpi import TRPO del mpi4py -__version__ = "2.10.0a0" +__version__ = "2.10.0"