-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from flow-project/install_sumo_binaries
Install sumo binaries - modified the setup instructions to install sumo binaries into flow/bin. The binaries were built on my and Eugene's machines, as well as on AWS instances. - sumo tools (e.g. traci) are installed in `setup.py` via a wheel. The wheel works for all operating systems (as far as I can tell so far) - we need many people to test that the binaries work for them before this is merged. There may be some dependencies that won't work, and we can only really find out by testing this multiple times and finding the discrepancies
- Loading branch information
Showing
5 changed files
with
186 additions
and
168 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,22 @@ | ||
#!/bin/bash | ||
echo "Installing system dependencies for SUMO" | ||
# Read in desired path | ||
# rllab dependencies | ||
brew install swig sdl sdl_image sdl_mixer sdl_ttf portmidi | ||
# sumo dependencies | ||
brew install Caskroom/cask/xquartz autoconf automake pkg-config libtool gdal proj xerces-c fox | ||
|
||
BASH_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
echo "Downloading SUMO to $1. This may take some time." | ||
echo "You may be prompted (twice) to authorize downloading from the repository (press (t) to temporarily accept)." | ||
mkdir -p $1 | ||
echo "Temporarily changing directories" | ||
pushd $1 | ||
svn checkout https://svn.code.sf.net/p/sumo/code/trunk/sumo@26784 > /dev/null | ||
pushd sumo | ||
|
||
echo "Patching SUMO for flow compatibility" | ||
patch -p1 < $BASH_DIR/departure_time_issue.patch | ||
|
||
|
||
echo "Building SUMO" | ||
export CPPFLAGS="$CPPFLAGS -I/opt/X11/include/" | ||
export LDFLAGS="-L/opt/X11/lib" | ||
|
||
autoreconf -i | ||
./configure CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=gnu++11" --with-xerces=/usr/local --with-proj-gdal=/usr/local | ||
|
||
make -j`sysctl -n hw.ncpu` | ||
make install | ||
|
||
echo "\n#############################\n" | ||
echo "add $1/sumo/tools to your PYTHONPATH and set SUMO_HOME to complete the installation!\n" | ||
echo "Installing sumo binaries" | ||
mkdir -p $HOME/sumo_binaries/bin | ||
pushd $HOME/sumo_binaries/bin | ||
wget https://akreidieh.s3.amazonaws.com/sumo/flow-0.2.0/binaries-mac.tar.xz | ||
tar -xf binaries-mac.tar.xz | ||
rm binaries-mac.tar.xz | ||
chmod +x * | ||
popd | ||
echo 'export PATH=$PATH:$HOME/sumo_binaries/bin' >> ~/.bash_profile | ||
echo 'export SUMO_HOME=$HOME/sumo_binaries/bin' >> ~/.bash_profile | ||
|
||
echo "This can be done by appending the following to your bash_profile:\n " | ||
echo "export PYTHONPATH=$1/sumo/tools\n" | ||
echo "export SUMO_HOME=\"$1/sumo\"" | ||
echo "#############################\n" | ||
echo "Returning to flow directory" | ||
source ~/.bash_profile | ||
|
||
popd | ||
popd | ||
echo "Installing sumo tools" | ||
pip install https://akreidieh.s3.amazonaws.com/sumo/flow-0.2.0/sumotools-0.1.0-py3-none-any.whl |
Oops, something went wrong.