-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Configure pytype in CI * Fix pytype types * gitignore: ignore pytype cache * Update Docker * fix stray import error * PEP 561 compliance * Update changelog * [Temporary] Explicitly install pytype * Simplify Dockerfile * Set appropriate python_version for pytype * Update Docker * Lint * Update Docker tags * Fix type error (mujoco_py not available in Docker) * [Temporary] Use my Docker image * Fix cmd_util after Gym upgrade * Use new JRE so that Codacy Coverage uploader can function * Update Docker tags * Change return type to float * try-except for backward compatibility * add error message * Update Docker tag for Travis * fix type errors * Update Docker install instructions * Document type checking * Do Codacy uploads from PR build (unless in fork)
- Loading branch information
1 parent
be6ef31
commit d8cc795
Showing
43 changed files
with
179 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ARG PARENT_IMAGE | ||
ARG USE_GPU | ||
FROM $PARENT_IMAGE | ||
|
||
RUN apt-get -y update \ | ||
&& apt-get -y install \ | ||
curl \ | ||
cmake \ | ||
default-jre \ | ||
git \ | ||
jq \ | ||
python-dev \ | ||
python-pip \ | ||
python3-dev \ | ||
libfontconfig1 \ | ||
libglib2.0-0 \ | ||
libsm6 \ | ||
libxext6 \ | ||
libxrender1 \ | ||
libopenmpi-dev \ | ||
zlib1g-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CODE_DIR /root/code | ||
ENV VENV /root/venv | ||
|
||
COPY ./setup.py /root/code/setup.py | ||
RUN \ | ||
mkdir -p ${CODE_DIR}/stable_baselines && \ | ||
pip install virtualenv && \ | ||
virtualenv $VENV --python=python3 && \ | ||
. $VENV/bin/activate && \ | ||
cd $CODE_DIR && \ | ||
pip install --upgrade pip && \ | ||
if [[ $USE_GPU == "True" ]]; then \ | ||
TENSORFLOW_PACKAGE="tensorflow-gpu==1.8.0"; \ | ||
else \ | ||
TENSORFLOW_PACKAGE="tensorflow==1.8.0"; \ | ||
fi; \ | ||
pip install ${TENSORFLOW_PACKAGE} && \ | ||
pip install -e .[mpi,tests] && \ | ||
pip install codacy-coverage && \ | ||
rm -rf $HOME/.cache/pip | ||
|
||
ENV PATH=$VENV/bin:$PATH | ||
|
||
# Codacy code coverage report: used for partial code coverage reporting | ||
RUN cd $CODE_DIR && \ | ||
curl -Ls -o codacy-coverage-reporter.jar "$(curl -Ls https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({name, browser_download_url} | select(.name | (contains("codacy-coverage-reporter") and endswith("assembly.jar")))) | .[0].browser_download_url')" | ||
|
||
CMD /bin/bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
CPU_PARENT=ubuntu:16.04 | ||
GPU_PARENT=nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04 | ||
|
||
TAG=stablebaselines/stable-baselines | ||
VERSION=v2.9.0 | ||
|
||
if [[ ${USE_GPU} == "True" ]]; then | ||
PARENT=${GPU_PARENT} | ||
else | ||
PARENT=${CPU_PARENT} | ||
TAG="${TAG}-cpu" | ||
fi | ||
|
||
docker build --build-arg PARENT_IMAGE=${PARENT} -t ${TAG}:${VERSION} . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/bash | ||
python -m pytest --cov-config .coveragerc --cov-report html --cov-report term --cov=. -v | ||
pytype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.