Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 43 additions & 5 deletions docs/source/flow_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ shell commands below to get started.
Dependencies
============
We begin by installing dependencies needed by the four repositories mentioned
above. It will be useful to install `Anaconda <https://www.anaconda.com/download>`_
for Python.
above. **It is highly recommended that users install
`Anaconda <https://www.anaconda.com/download>`_ or
`Miniconda <https://conda.io/miniconda.html>`_
for Python and the setup instructions will assume that you are
doing so.**

For Ubuntu 16.04:
::
Expand All @@ -38,6 +41,7 @@ sumo
Next, we install SUMO, an open source traffic microsimulator which will be used
the update the states of vehicles, traffic lights, and other RL and
human-driven agents during the simulation process.

::

cd ~
Expand All @@ -47,21 +51,33 @@ human-driven agents during the simulation process.
make -f Makefile.cvs

If you have OSX, run the following commands

::

export CPPFLAGS=-I/opt/X11/include
export LDFLAGS=-L/opt/X11/lib
./configure CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=gnu++11" --with-xerces=/usr/local --with-proj-gdal=/usr/local
make -j$nproc
echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bash_profile
echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bash_profile
echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bash_profile
source ~/.bashprofile

If you have Ubuntu 14.04+, run the following command

Now for both OSX and linux run the following command
::

./configure
make -j$nproc
echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bashrc
echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bashrc
echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bashrc
source ~/.bashrc

Test your sumo install and version by running the following commands
Finally, test your sumo install and version by running the following commands

::

which sumo
sumo --version
sumo-gui
Expand All @@ -79,10 +95,19 @@ Ray/RLlib for more).
cd ~
git clone https://github.com/flow-project/flow.git
cd flow
conda env create -f environment.yml
source activate flow
python3 setup.py develop

For linux run
::
echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc
source ~/.bashrc

For mac run
::
echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bash_profile
source ~/.bash_profile

Testing the Installation
========================
Expand Down Expand Up @@ -121,9 +146,17 @@ to install the `rllab-multiagent` library, follow the below instructions
cd rllab-multiagent
conda env create -f environment.yml
python3 setup.py develop

For linux run
::
echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bashrc
source ~/.bashrc

For mac run
::
echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bash_profile
source ~/.bash_profile

Ray/RLlib (optional)
====================
RLlib is another RL library that has been extensively tested on the Flow
Expand All @@ -150,7 +183,7 @@ Getting started (rllab-multiagent)
To run any of the RL examples, make sure to run
::

source activate flow-rllab
source activate flow

In order to test run an Flow experiment in rllab-multiagent, try the following
command:
Expand All @@ -167,6 +200,11 @@ Getting started (Ray/RLlib)

See `getting started with RLlib <http://ray.readthedocs.io/en/latest/rllib.html#getting-started>`_ for sample commands.

To run any of the RL examples, make sure to run
::

source activate flow

In order to test run an Flow experiment in RLlib, try the following command:
::

Expand Down
62 changes: 62 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: flow
channels:
- https://conda.anaconda.org/kne
# - https://conda.anaconda.org/tlatorre
- https://conda.anaconda.org/cjs14
- https://conda.anaconda.org/menpo
- jjhelmus
- soumith
dependencies:
- python==3.5.2
- numpy==1.13.3
- scipy==1.1.0
- path.py
- python-dateutil
- joblib==0.10.3
- mako==1.0.7
- ipywidgets==5.1.5
- numba==0.38.1
- flask==1.0.2
- pybox2d==2.3.1post2
- pygame==1.9.2a0
- h5py==2.8.0
- matplotlib==2.2.2
- opencv3=3.1.0
- scikit-learn==0.19.1
- mpi4py==2.0.0
- pandas==0.23.4
- pip:
- Pillow==4.2.1
- pyprind==2.11.2
- boto3==1.7.73
- PyOpenGL==3.1.0
- nose2==0.8.0
- pyzmq==17.1.0
- tqdm==4.24.0
- msgpack-python==0.5.6
- cached_property==1.4.3
- line_profiler==2.1.2
- cloudpickle==0.5.3
- Cython==0.28.5
- redis==2.10.6
- keras==1.2.1
- git+https://github.com/Theano/Theano.git@adfe319ce6b781083d8dc3200fb4481b00853791#egg=Theano
- git+https://github.com/neocxi/Lasagne.git@484866cf8b38d878e92d521be445968531646bb8#egg=Lasagne
- git+https://github.com/plotly/plotly.py.git@2594076e29584ede2d09f2aa40a8a195b3f3fc66#egg=plotly
- awscli==1.15.74
- gym==0.10.5
- pyglet==1.3.2
- git+https://github.com/neocxi/prettytensor.git
- jupyter==1.0.0
- progressbar2==3.38.0
- chainer==1.18.0
- tensorflow==1.10.0
- numpy-stl==2.2.0
- nibabel==2.1.0
- pylru==1.0.9
- hyperopt==0.1
- polling==0.3.0
- lxml==4.2.4
# RLLIB installs
- six==1.11.0
- redis==2.10.6
2 changes: 1 addition & 1 deletion examples/rllab/stabilizing_the_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


def run_task(*_):
sumo_params = SumoParams(sim_step=0.1, sumo_binary="sumo-gui", seed=0)
sumo_params = SumoParams(sim_step=0.1, sumo_binary="sumo", seed=0)

vehicles = Vehicles()
vehicles.add(veh_id="rl",
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
gym==0.10.5
numpy==1.14.5
numpy==1.13.3
scipy==1.1.0
lxml==4.2.4
# theano==0.8.2 # for rllab
pyprind==2.11.2
# lasagne # for rllab
tensorflow==1.10.0
tensorflow==1.8.0
nose2==0.8.0
six>=1.1
path.py
joblib==0.10.3
python-dateutil==2.7.3
cached_property