my experience of building this repo locally on Ubuntu 16.04
Closed this issue · 2 comments
Hello there, thanks for doing this research project and open source your result. I found it super interesting and decided to try it on my own. Since you guys didn't talk much about building this repo locally, I thought I'd just share my experience here.
I checked the dependencies in the Dockerfile and sudo apt-get
from line 14 to 34. Namely:
sudo apt-get install build-essential \
curl \
ffmpeg \
git \
libgl1-mesa-dev \
libgl1-mesa-glx \
libglew-dev \
libosmesa6-dev \
net-tools \
parallel \
python3.7 \
python3.7-dev \
python3-pip \
rsync \
software-properties-common \
unzip \
vim \
virtualenv \
And, it turns out that the package manager cannot find python3.7 related packages (python3.7, python3.7-dev, python3-pip) so I installed them based on this link. Namely,
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7
sudo apt install python3.7-dev
sudo apt install python3-pip
We'll also need cffi
. Install it by pip3 install cffi
.
The next step is to install MUJOCO. I installed it based on this link.
- get a valid license through this link
- Download MUJOCO pro from here. You'll need
mjpro131
andmujoco200
. - Unzip mjpro131 and mujoco200 by:
unzip mjpro131_linux.zip -d ~/.mujoco
unzip mujoco200_linux.zip -d ~/.mujoco
- move the
mjkey.txt
file that should be sent to your email to the hidden folder~/.mujoco
bymv DOWNLOAD_LOCATION/mjkey.txt ~/.mujoco
- put the following lines into your
bashrc
file.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/(username)/.mujoco/mjpro131/bin
I suspect that I'll need to change the environment variable to point to .../mojoco200/bin
when training with other gym environment but the above works for replicating one of the experiments in the paper ( python -m aprl.train with env_name=multicomp/SumoHumans-v0 paper
)
- execute step 9 and 10 in the tutorial above.
That's it for installing MUJOCO. The next step is just training the agent.
-
As indicated in the README file of this repo, after cloning this repo, run
ci/build_venv.sh
, activate it by. ./venv/bin/activate
, runpip install -e
. -
As indicated in the README file of this repo, train with
python -m aprl.train with env_name=multicomp/SumoHumans-v0 paper
Thanks for the guide. We emphasized Docker in the README over a local install since it's more replicable, but a local install is certainly convenient for development, so I'm sure this will be useful to people.
Thank you. I was having some issues with Docker not recognizing my student MUJOCO license. I did a bit of searching and found out the hardware locking mechanism in MUJOCO does not work with Docker as stated in this discussion. That's why I attempted to build it locally.