Skip to content

Commit

Permalink
Fix gym installation issue
Browse files Browse the repository at this point in the history
Reference: https://stackoverflow.com/a/77205046

Full error message:

    # 23 [12/14] RUN --mount=type=secret,id=mjkey,dst=/root/.mujoco/mjkey.txt     conda env update -f /tmp/environment.yml     && conda clean --all -y
    # 23 1.237 Channels:
    # 23 1.237  - defaults
    # 23 1.237  - conda-forge
    # 23 1.237 Platform: linux-64
    # 23 1.237 Collecting package metadata (repodata.json): ...working... done
    # 23 28.13 Solving environment: ...working... done
    # 23 40.46
    # 23 40.46 Downloading and Extracting Packages: ...working... done
    # 23 40.46 Preparing transaction: ...working... done
    # 23 46.63 Verifying transaction: ...working... done
    # 23 59.13 Executing transaction: ...working... done
    # 23 337.4 Installing pip dependencies: ...working... Ran pip subprocess with arguments:
    # 23 375.7 ['/opt/conda/envs/softlearning/bin/python', '-m', 'pip', 'install', '-U', '-r', '/tmp/condaenv.y5xakg6o.requirements.txt', '--exists-action=b']
    # 23 375.7 Pip subprocess output:
    # 23 375.7 Collecting absl-py==0.11.0 (from -r /tmp/./requirements.txt (line 1))
    # 23 375.7   Downloading absl_py-0.11.0-py3-none-any.whl (127 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 127.8/127.8 kB 79.5 kB/s eta 0:00:00
    # 23 375.7 Collecting aiohttp==3.7.4 (from -r /tmp/./requirements.txt (line 2))
    # 23 375.7   Downloading aiohttp-3.7.4-cp38-cp38-manylinux2014_x86_64.whl (1.5 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 5.2 MB/s eta 0:00:00
    # 23 375.7 Collecting aiohttp-cors==0.7.0 (from -r /tmp/./requirements.txt (line 3))
    # 23 375.7   Downloading aiohttp_cors-0.7.0-py3-none-any.whl (27 kB)
    # 23 375.7 Collecting aioredis==1.3.1 (from -r /tmp/./requirements.txt (line 4))
    # 23 375.7   Downloading aioredis-1.3.1-py3-none-any.whl (65 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.3/65.3 kB 429.5 kB/s eta 0:00:00
    # 23 375.7 Collecting appnope==0.1.2 (from -r /tmp/./requirements.txt (line 5))
    # 23 375.7   Downloading appnope-0.1.2-py2.py3-none-any.whl (4.3 kB)
    # 23 375.7 Collecting astunparse==1.6.3 (from -r /tmp/./requirements.txt (line 6))
    # 23 375.7   Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
    # 23 375.7 Collecting async-timeout==3.0.1 (from -r /tmp/./requirements.txt (line 7))
    # 23 375.7   Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
    # 23 375.7 Collecting attrs==20.3.0 (from -r /tmp/./requirements.txt (line 8))
    # 23 375.7   Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.3/49.3 kB 385.4 kB/s eta 0:00:00
    # 23 375.7 Collecting backcall==0.2.0 (from -r /tmp/./requirements.txt (line 9))
    # 23 375.7   Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
    # 23 375.7 Collecting blessings==1.7 (from -r /tmp/./requirements.txt (line 10))
    # 23 375.7   Downloading blessings-1.7-py3-none-any.whl (18 kB)
    # 23 375.7 Collecting brotlipy==0.7.0 (from -r /tmp/./requirements.txt (line 11))
    # 23 375.7   Downloading brotlipy-0.7.0-cp38-cp38-manylinux1_x86_64.whl (1.1 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 5.0 MB/s eta 0:00:00
    # 23 375.7 Collecting cachetools==4.2.0 (from -r /tmp/./requirements.txt (line 12))
    # 23 375.7   Downloading cachetools-4.2.0-py3-none-any.whl (12 kB)
    # 23 375.7 Collecting certifi==2020.12.5 (from -r /tmp/./requirements.txt (line 13))
    # 23 375.7   Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 147.5/147.5 kB 920.2 kB/s eta 0:00:00
    # 23 375.7 Collecting cffi==1.14.4 (from -r /tmp/./requirements.txt (line 14))
    # 23 375.7   Downloading cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl (411 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 411.1/411.1 kB 2.4 MB/s eta 0:00:00
    # 23 375.7 Collecting chardet==3.0.4 (from -r /tmp/./requirements.txt (line 15))
    # 23 375.7   Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.4/133.4 kB 1.1 MB/s eta 0:00:00
    # 23 375.7 Collecting click==7.1.2 (from -r /tmp/./requirements.txt (line 16))
    # 23 375.7   Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.8/82.8 kB 724.3 kB/s eta 0:00:00
    # 23 375.7 Collecting cloudpickle==1.6.0 (from -r /tmp/./requirements.txt (line 17))
    # 23 375.7   Downloading cloudpickle-1.6.0-py3-none-any.whl (23 kB)
    # 23 375.7 Collecting colorama==0.4.4 (from -r /tmp/./requirements.txt (line 18))
    # 23 375.7   Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
    # 23 375.7 Collecting colorful==0.5.4 (from -r /tmp/./requirements.txt (line 19))
    # 23 375.7   Downloading colorful-0.5.4-py2.py3-none-any.whl (201 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 202.0/202.0 kB 1.4 MB/s eta 0:00:00
    # 23 375.7 Collecting cryptography==3.3.2 (from -r /tmp/./requirements.txt (line 20))
    # 23 375.7   Downloading cryptography-3.3.2-cp36-abi3-manylinux2010_x86_64.whl (2.6 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 2.8 MB/s eta 0:00:00
    # 23 375.7 Collecting cycler==0.10.0 (from -r /tmp/./requirements.txt (line 21))
    # 23 375.7   Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
    # 23 375.7 Collecting Cython==0.29.21 (from -r /tmp/./requirements.txt (line 22))
    # 23 375.7   Downloading Cython-0.29.21-cp38-cp38-manylinux1_x86_64.whl (1.9 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 1.5 MB/s eta 0:00:00
    # 23 375.7 Collecting decorator==4.4.2 (from -r /tmp/./requirements.txt (line 23))
    # 23 375.7   Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
    # 23 375.7 Collecting dm-control==0.0.322773188 (from -r /tmp/./requirements.txt (line 24))
    # 23 375.7   Downloading dm_control-0.0.322773188-py3-none-any.whl (18.6 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.6/18.6 MB 2.3 MB/s eta 0:00:00
    # 23 375.7 Collecting dm-env==1.3 (from -r /tmp/./requirements.txt (line 25))
    # 23 375.7   Downloading dm_env-1.3-py3-none-any.whl (24 kB)
    # 23 375.7 Collecting dm-tree==0.1.5 (from -r /tmp/./requirements.txt (line 26))
    # 23 375.7   Downloading dm_tree-0.1.5-cp38-cp38-manylinux2014_x86_64.whl (91 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 91.6/91.6 kB 1.1 MB/s eta 0:00:00
    # 23 375.7 Collecting fasteners==0.16 (from -r /tmp/./requirements.txt (line 27))
    # 23 375.7   Downloading fasteners-0.16-py2.py3-none-any.whl (28 kB)
    # 23 375.7 Collecting filelock==3.0.12 (from -r /tmp/./requirements.txt (line 28))
    # 23 375.7   Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
    # 23 375.7 Collecting flatbuffers==1.12 (from -r /tmp/./requirements.txt (line 29))
    # 23 375.7   Downloading flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
    # 23 375.7 Collecting future==0.18.2 (from -r /tmp/./requirements.txt (line 30))
    # 23 375.7   Downloading future-0.18.2.tar.gz (829 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 829.2/829.2 kB 4.9 MB/s eta 0:00:00
    # 23 375.7   Preparing metadata (setup.py): started
    # 23 375.7   Preparing metadata (setup.py): finished with status 'done'
    # 23 375.7 Collecting gast==0.3.3 (from -r /tmp/./requirements.txt (line 31))
    # 23 375.7   Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
    # 23 375.7 Collecting gitdb==4.0.5 (from -r /tmp/./requirements.txt (line 32))
    # 23 375.7   Downloading gitdb-4.0.5-py3-none-any.whl (63 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 kB 438.3 kB/s eta 0:00:00
    # 23 375.7 Collecting GitPython==3.1.12 (from -r /tmp/./requirements.txt (line 33))
    # 23 375.7   Downloading GitPython-3.1.12-py3-none-any.whl (159 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 159.5/159.5 kB 1.2 MB/s eta 0:00:00
    # 23 375.7 Collecting glfw==2.0.0 (from -r /tmp/./requirements.txt (line 34))
    # 23 375.7   Downloading glfw-2.0.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-manylinux2014_x86_64.whl (203 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 203.9/203.9 kB 168.7 kB/s eta 0:00:00
    # 23 375.7 Collecting google-api-core==1.25.0 (from -r /tmp/./requirements.txt (line 35))
    # 23 375.7   Downloading google_api_core-1.25.0-py2.py3-none-any.whl (92 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.3/92.3 kB 592.3 kB/s eta 0:00:00
    # 23 375.7 Collecting google-auth==1.24.0 (from -r /tmp/./requirements.txt (line 36))
    # 23 375.7   Downloading google_auth-1.24.0-py2.py3-none-any.whl (114 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.7/114.7 kB 810.5 kB/s eta 0:00:00
    # 23 375.7 Collecting google-auth-oauthlib==0.4.2 (from -r /tmp/./requirements.txt (line 37))
    # 23 375.7   Downloading google_auth_oauthlib-0.4.2-py2.py3-none-any.whl (18 kB)
    # 23 375.7 Collecting google-pasta==0.2.0 (from -r /tmp/./requirements.txt (line 38))
    # 23 375.7   Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB 403.6 kB/s eta 0:00:00
    # 23 375.7 Collecting googleapis-common-protos==1.52.0 (from -r /tmp/./requirements.txt (line 39))
    # 23 375.7   Downloading googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.2/100.2 kB 616.4 kB/s eta 0:00:00
    # 23 375.7 Collecting gpustat==0.6.0 (from -r /tmp/./requirements.txt (line 40))
    # 23 375.7   Downloading gpustat-0.6.0.tar.gz (78 kB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.1/78.1 kB 482.5 kB/s eta 0:00:00
    # 23 375.7   Preparing metadata (setup.py): started
    # 23 375.7   Preparing metadata (setup.py): finished with status 'done'
    # 23 375.7 Collecting grpcio==1.32.0 (from -r /tmp/./requirements.txt (line 41))
    # 23 375.7   Downloading grpcio-1.32.0-cp38-cp38-manylinux2014_x86_64.whl (3.8 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 2.7 MB/s eta 0:00:00
    # 23 375.7 Collecting gtimer==1.0.0b5 (from -r /tmp/./requirements.txt (line 42))
    # 23 375.7   Downloading gtimer-1.0.0b5.tar.gz (23 kB)
    # 23 375.7   Preparing metadata (setup.py): started
    # 23 375.7   Preparing metadata (setup.py): finished with status 'done'
    # 23 375.7 Collecting gym==0.18.0 (from -r /tmp/./requirements.txt (line 43))
    # 23 375.7   Downloading gym-0.18.0.tar.gz (1.6 MB)
    # 23 375.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 5.4 MB/s eta 0:00:00
    # 23 375.7   Preparing metadata (setup.py): started
    # 23 375.7   Preparing metadata (setup.py): finished with status 'error'
    # 23 375.7 Pip subprocess error:
    # 23 375.7   error: subprocess-exited-with-error
    # 23 375.7
    # 23 375.7   × python setup.py egg_info did not run successfully.
    # 23 375.7   │ exit code: 1
    # 23 375.7   ╰─> [1 lines of output]
    # 23 375.7       error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
    # 23 375.7       [end of output]
    # 23 375.7
    # 23 375.7   note: This error originates from a subprocess, and is likely not a problem with pip.
    # 23 375.7 error: metadata-generation-failed
    # 23 375.7
    # 23 375.7 × Encountered error while generating package metadata.
    # 23 375.7 ╰─> See above for output.
    # 23 375.7
    # 23 375.7 note: This is an issue with the package mentioned above, not pip.
    # 23 375.7 hint: See above for details.
    # 23 375.7
    # 23 375.7
    # 23 375.7 failed
    # 23 375.7
    # 23 375.7 CondaEnvException: Pip failed
    # 23 375.7
    # 23 ERROR: process "/bin/bash -c conda env update -f /tmp/environment.yml     && conda clean --all -y" did not complete successfully: exit code: 1
    ------
     > [12/14] RUN --mount=type=secret,id=mjkey,dst=/root/.mujoco/mjkey.txt     conda env update -f /tmp/environment.yml     && conda clean --all -y:
    # 23 375.7 ╰─> See above for output.
    # 23 375.7
    # 23 375.7 note: This is an issue with the package mentioned above, not pip.
    # 23 375.7 hint: See above for details.
    # 23 375.7
    # 23 375.7
    # 23 375.7 failed
    # 23 375.7
    # 23 375.7 CondaEnvException: Pip failed
    # 23 375.7
    ------
    ERROR: failed to solve: process "/bin/bash -c conda env update -f /tmp/environment.yml     && conda clean --all -y" did not complete successfully: exit code: 1

Note that an extra space is added after the pound symbol `#` in the error message to prevent github linking issues.
  • Loading branch information
j3soon committed Nov 29, 2023
1 parent a529513 commit a28f203
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docker/Dockerfile.softlearning.base.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ COPY ./requirements.txt /tmp/
# NOTE: Fetch `mjkey.txt` from secret mount to avoid writing it to the build
# history. For details, see:
# https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information
RUN --mount=type=secret,id=mjkey,dst=/root/.mujoco/mjkey.txt \
conda env update -f /tmp/environment.yml \
RUN conda env update -f /tmp/environment.yml \
&& conda clean --all -y
RUN source activate softlearning \
&& pip install setuptools==65.5.0 wheel==0.38.0 \
&& pip install gym==0.18.0

RUN echo "conda activate softlearning" >> ~/.bashrc \
&& echo "cd ~/softlearning" >> ~/.bashrc
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ googleapis-common-protos==1.52.0
gpustat==0.6.0
grpcio==1.32.0
gtimer==1.0.0b5
gym==0.18.0
h5py==2.10.0
hiredis==1.1.0
idna==2.10
Expand Down

0 comments on commit a28f203

Please sign in to comment.