@@ -36,7 +36,6 @@ git config --global --add safe.directory '*'
3636root_dir=" $( git rev-parse --show-toplevel) "
3737conda_dir=" ${root_dir} /conda"
3838env_dir=" ${root_dir} /env"
39- lib_dir=" ${env_dir} /lib"
4039
4140cd " ${root_dir} "
4241
7271printf " * Verified Python implementation: %s\n" " $python_impl "
7372
7473# 3. Install mujoco
75- printf " * Installing mujoco and related\n"
76- mkdir -p $root_dir /.mujoco
77- cd $root_dir /.mujoco/
78- # wget https://github.com/deepmind/mujoco/releases/download/2.1.1/mujoco-2.1.1-linux-x86_64.tar.gz
79- # tar -xf mujoco-2.1.1-linux-x86_64.tar.gz
80- wget https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz
81- tar -xf mujoco210-linux-x86_64.tar.gz
82- cd " ${root_dir} "
8374
8475# 4. Install Conda dependencies
8576printf " * Installing dependencies (except PyTorch)\n"
@@ -89,9 +80,6 @@ if ! grep -q "python=${PYTHON_VERSION}" "${this_dir}/environment.yml"; then
8980fi
9081cat " ${this_dir} /environment.yml"
9182
92- export MUJOCO_PY_MUJOCO_PATH=$root_dir /.mujoco/mujoco210
93- # export MJLIB_PATH=$root_dir/.mujoco/mujoco-2.1.1/lib/libmujoco.so.2.1.1
94- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH :$root_dir /.mujoco/mujoco210/bin
9583export SDL_VIDEODRIVER=dummy
9684export MUJOCO_GL=egl
9785export PYOPENGL_PLATFORM=egl
@@ -100,9 +88,7 @@ export COMPOSITE_LP_AGGREGATE=0
10088
10189conda env config vars set \
10290 MAX_IDLE_COUNT=1000 \
103- MUJOCO_PY_MUJOCO_PATH=$root_dir /.mujoco/mujoco210 \
10491 DISPLAY=:99 \
105- LD_LIBRARY_PATH=$LD_LIBRARY_PATH :$root_dir /.mujoco/mujoco210/bin \
10692 SDL_VIDEODRIVER=dummy \
10793 MUJOCO_GL=egl \
10894 PYOPENGL_PLATFORM=egl \
@@ -116,10 +102,6 @@ conda env update --file "${this_dir}/environment.yml" --prune
116102conda deactivate
117103conda activate " ${env_dir} "
118104
119- # install d4rl
120- pip install free-mujoco-py
121- pip install git+https://github.com/Farama-Foundation/d4rl@master#egg=d4rl
122-
123105# TODO: move this down -- will break torchrl installation
124106conda install -y -c conda-forge libstdcxx-ng=12
125107# # find libstdc - search in the env's lib directory first, then fall back to conda packages
144126conda deactivate
145127conda activate " ${env_dir} "
146128
147- # compile mujoco-py (bc it's done at runtime for whatever reason someone thought it was a good idea)
148- python -c " " " import gym;import d4rl" " "
149-
150129# install ale-py: manylinux names are broken for CentOS so we need to manually download and
151130# rename them
152131
@@ -160,13 +139,11 @@ elif [[ ${#CU_VERSION} -eq 5 ]]; then
160139 CUDA_VERSION=" ${CU_VERSION: 2: 2} .${CU_VERSION: 4: 1} "
161140fi
162141echo " Using CUDA $CUDA_VERSION as determined by CU_VERSION ($CU_VERSION )"
163- version=" $( python -c " print('.'.join(\" ${CUDA_VERSION} \" .split('.')[:2]))" ) "
164-
165142# submodules
166143git submodule sync && git submodule update --init --recursive
167144
168145pip3 install ale-py -U
169- pip3 install " gym [atari,accept-rom-license] " " gymnasium >=1.1.0" -U
146+ pip3 install " gymnasium [atari,accept-rom-license,mujoco] >=1.1.0" -U
170147
171148printf " Installing PyTorch with %s\n" " ${CU_VERSION} "
172149if [[ " $TORCH_VERSION " == " nightly" ]]; then
0 commit comments