From 1e5f770044d97c3609c24deb53d3c6e0387c204a Mon Sep 17 00:00:00 2001 From: pzhokhov Date: Fri, 18 Dec 2020 15:31:58 -0800 Subject: [PATCH] fix build - only install mujoco for python 3.6, 3.7, (#2133) * reverting to older version of 3.6 python to test if the build is failing because of that * revert 3.7 to 3.7.3 for the build * revert python 3.8 version to 3.8.1 * do not install mujoco on 3.8 and 3.9 * enable mujoco for 3.7 * . * . * . * use regex to navigate python version dependent package installation * . --- .travis.yml | 6 +++--- py.Dockerfile | 4 ++-- setup.py | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f051ec59bda..5d73324ef4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ python: services: - docker env: - - PY_VER=3.6.12 - - PY_VER=3.7.9 + - PY_VER=3.6.8 + - PY_VER=3.7.3 - PY_VER=3.8.6 - PY_VER=3.9.0 @@ -21,4 +21,4 @@ deploy: password: $TWINE_PASSWORD on: tags: true - condition: $PY_VER = 3.6.12 + condition: $PY_VER = 3.6.8 diff --git a/py.Dockerfile b/py.Dockerfile index 2074bb33c65..ef6bd0d8b1a 100644 --- a/py.Dockerfile +++ b/py.Dockerfile @@ -9,8 +9,8 @@ RUN \ curl -O https://www.roboti.us/download/mjpro150_linux.zip && \ unzip mjpro150_linux.zip -ARG MUJOCO_KEY ARG PYTHON_VER +ARG MUJOCO_KEY ENV MUJOCO_KEY=$MUJOCO_KEY ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/.mujoco/mjpro150/bin @@ -19,7 +19,7 @@ RUN pip install pytest pytest-forked lz4 COPY . /usr/local/gym/ WORKDIR /usr/local/gym/ -RUN pip install .[all] +RUN bash -c "[[ $PYTHON_VER =~ 3\.[6-7]\.[0-9] ]] && pip install -e .[all] || pip install -e .[nomujoco]" ENTRYPOINT ["/usr/local/gym/bin/docker_entrypoint"] CMD ["pytest","--forked"] diff --git a/setup.py b/setup.py index 3f661828a6d..7236d8d5dc0 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,8 @@ } # Meta dependency groups. -extras['all'] = [item for group in extras.values() for item in group] +extras['nomujoco'] = list(set([item for name, group in extras.items() if name != 'mujoco' and name != "robotics" for item in group])) +extras['all'] = list(set([item for group in extras.values() for item in group])) setup(name='gym', version=VERSION,