- Install XQuartz (https://www.xquartz.org/)
- Enable GLX for XQuartz, by running following in terminal;
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
- Start AWS EC2 p3.2xlarge instance
- SSH onto instance using
-X
option, e.g.ssh -X -i keypair.pem ubuntu@instance-ip.com
- XQuartz window should open on local machine
- Confirm X is working correctly (you should see 3d gears appear in an XQuartz window)
sudo apt-get install mesa-utils
glxgears
- Create environment for
coach
conda create --name coach_env --yes python=3.6 pip jupyter
source activate coach_env
# currently wxpython build is breaking, so use pre-built wheel instead (before pip install rl_coach)
# see https://extras.wxpython.org/wxPython4/extras/linux/ for correct version
wget https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.1-cp36-cp36m-linux_x86_64.whl
pip install wxPython-4.0.1-cp36-cp36m-linux_x86_64.whl
# add pygame requirements (from coach readme)
sudo -E apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev -y
# add dashboard requirements (from coach readme)
sudo -E apt-get install dpkg-dev build-essential python3.5-dev libjpeg-dev libtiff-dev libsdl1.2-dev libnotify-dev freeglut3 freeglut3-dev libsm-dev libgtk2.0-dev libgtk-3-dev libwebkitgtk-dev libgtk-3-dev libwebkitgtk-3.0-dev libgstreamer-plugins-base1.0-dev -y
# add gym requirements (from coach readme)
sudo -E apt-get install libav-tools libsdl2-dev swig cmake -y
# install coach package (in development mode)
git clone https://github.com/NervanaSystems/coach.git
cd coach
pip install -e .
# force upgrade of tensorflow package (that uses correct version of CUDA, i.e. 9.0)
# coach's setup.py is pinned to tensorflow-gpu==1.4.0 which looks for CUDA 8.0
# -I ignores the `tensorflow-gpu` current package, and overwrites.
pip install -I tensorflow-gpu==1.5.0
# Install Atari evironment (optional)
pip install gym[atari]
-
Quit SSH session, restart, and
source activate coach_env
. -
Confirm
coach
is working correctly (super slow rendering!)
coach -r -p CartPole_PG
- Without rendering, training is much quicker.
coach -p CartPole_PG