Last active
April 14, 2018 01:36
-
-
Save zafarali/242ac90ba8a91fc9d1652cc733ef0bc3 to your computer and use it in GitHub Desktop.
Install Roboschool on ComputeCanda Clusters. See comments for how to use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a special thanks to the ComputeCanada support team for making available these modules on the cluster! | |
# using this script is pretty easy, just `wget` this into a server and then `bash RoboschoolCluster.sh` | |
module load python/3.5.2 | |
module load qt | |
module load gcc/6.4.0 | |
module load boost/1.65.1 | |
# this command should not fail | |
pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.5 tinyxml | |
#source $RVI_ENV | |
INSTALLDIR="$(pwd)/roboschool_installation" | |
echo "installing roboschool at $INSTALLDIR" | |
mkdir $INSTALLDIR | |
cd $INSTALLDIR | |
echo "Now cloning roboschool from github." | |
git clone https://github.com/openai/roboschool | |
ROBOSCHOOL_PATH="${INSTALLDIR}/roboschool" | |
echo "ROBOSCHOOL_PATH was set to $ROBOSCHOOL_PATH" | |
cd "$ROBOSCHOOL_PATH" | |
git clone https://github.com/olegklimov/bullet3 -b roboschool_self_collision | |
# patch makefile | |
cd roboschool/cpp-household | |
sed -i s'!-I/usr/include!!' Makefile | |
sed -i s'!moc -qt=5!moc!' Makefile | |
sed -i s'!LINK=gcc!LINK=g++!' Makefile | |
sed -i s'!POSTFIX = -py!POSTFIX = !' Makefile | |
cd ../.. | |
mkdir -p bullet3/build | |
cd bullet3/build | |
echo "making bullet3" | |
CC=gcc CXX=g++ cmake -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=1 -DCMAKE_INSTALL_PREFIX:PATH=$ROBOSCHOOL_PATH/roboschool/cpp-household/bullet_local_install -DBUILD_CPU_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_EXTRAS=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_CLSOCKET=OFF -DBUILD_ENET=OFF -DBUILD_OPENGL3_DEMOS=OFF .. | |
make -j4 | |
make install | |
cd $INSTALLDIR/ | |
echo "installing roboschool" | |
python -m venv roboschool_venv | |
source roboschool_venv/bin/activate | |
pip install -e roboschool/ | |
pip install gym | |
echo "installation complete. To test you can try running: python roboschool/agent_zoo/demo_race2.py" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use:
mkdir openai
or something where you have an empty directory andcd
into it. Usewget
to obtain this gist into that folder.Then you can just to
bash RoboschoolCluster.sh
and it will install roboschool into a new virtual environmentroboschool_venv
that is found in your installation directory. I tried it and it works (I can useimport roboschool
with no problems)If you want to install it into your current environment I think if you change the part in the install script where you create a new venv to loading your current venv it, in theory, should work?
I will update this file with some plots that I make.
Testing it
Modules needed
Common issues:
Boost failed to work at this line:
You're probably having a disk quota issue (see if you can manually copy it.) For possible solutions see here: https://docs.computecanada.ca/wiki/Frequently_Asked_Questions#Disk_quota_exceeded_error_on_.2Fproject_filesystems
Thank you
A big thank you to the ComputeCanada team for making this easier to install. I'm sure we are really going to enjoy testing our algorithms on open source domains :)