Skip to content

Commit ccf07ed

Browse files
Merge pull request #28 from flow-project/amend_setup
Amend setup - Created an environment.yml file that supersedes the rllab-multi-agent environment.yml file - updated the setup instructions to handle it
2 parents 043865f + a91bba3 commit ccf07ed

File tree

4 files changed

+109
-8
lines changed

4 files changed

+109
-8
lines changed

docs/source/flow_setup.rst

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ shell commands below to get started.
1414
Dependencies
1515
============
1616
We begin by installing dependencies needed by the four repositories mentioned
17-
above. It will be useful to install `Anaconda <https://www.anaconda.com/download>`_
18-
for Python.
17+
above. **It is highly recommended that users install
18+
`Anaconda <https://www.anaconda.com/download>`_ or
19+
`Miniconda <https://conda.io/miniconda.html>`_
20+
for Python and the setup instructions will assume that you are
21+
doing so.**
1922

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

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

4953
If you have OSX, run the following commands
54+
5055
::
56+
5157
export CPPFLAGS=-I/opt/X11/include
5258
export LDFLAGS=-L/opt/X11/lib
59+
./configure CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=gnu++11" --with-xerces=/usr/local --with-proj-gdal=/usr/local
60+
make -j$nproc
61+
echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bash_profile
62+
echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bash_profile
63+
echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bash_profile
64+
source ~/.bashprofile
65+
66+
If you have Ubuntu 14.04+, run the following command
5367

54-
Now for both OSX and linux run the following command
5568
::
69+
5670
./configure
5771
make -j$nproc
5872
echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bashrc
5973
echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bashrc
6074
echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bashrc
6175
source ~/.bashrc
6276

63-
Test your sumo install and version by running the following commands
77+
Finally, test your sumo install and version by running the following commands
78+
6479
::
80+
6581
which sumo
6682
sumo --version
6783
sumo-gui
@@ -79,10 +95,19 @@ Ray/RLlib for more).
7995
cd ~
8096
git clone https://github.com/flow-project/flow.git
8197
cd flow
98+
conda env create -f environment.yml
99+
source activate flow
82100
python3 setup.py develop
101+
102+
For linux run
103+
::
83104
echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc
84105
source ~/.bashrc
85106

107+
For mac run
108+
::
109+
echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bash_profile
110+
source ~/.bash_profile
86111

87112
Testing the Installation
88113
========================
@@ -121,9 +146,17 @@ to install the `rllab-multiagent` library, follow the below instructions
121146
cd rllab-multiagent
122147
conda env create -f environment.yml
123148
python3 setup.py develop
149+
150+
For linux run
151+
::
124152
echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bashrc
125153
source ~/.bashrc
126154

155+
For mac run
156+
::
157+
echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bash_profile
158+
source ~/.bash_profile
159+
127160
Ray/RLlib (optional)
128161
====================
129162
RLlib is another RL library that has been extensively tested on the Flow
@@ -150,7 +183,7 @@ Getting started (rllab-multiagent)
150183
To run any of the RL examples, make sure to run
151184
::
152185

153-
source activate flow-rllab
186+
source activate flow
154187
155188
In order to test run an Flow experiment in rllab-multiagent, try the following
156189
command:
@@ -167,6 +200,11 @@ Getting started (Ray/RLlib)
167200

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

203+
To run any of the RL examples, make sure to run
204+
::
205+
206+
source activate flow
207+
170208
In order to test run an Flow experiment in RLlib, try the following command:
171209
::
172210

environment.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: flow
2+
channels:
3+
- https://conda.anaconda.org/kne
4+
# - https://conda.anaconda.org/tlatorre
5+
- https://conda.anaconda.org/cjs14
6+
- https://conda.anaconda.org/menpo
7+
- jjhelmus
8+
- soumith
9+
dependencies:
10+
- python==3.5.2
11+
- numpy==1.13.3
12+
- scipy==1.1.0
13+
- path.py
14+
- python-dateutil
15+
- joblib==0.10.3
16+
- mako==1.0.7
17+
- ipywidgets==5.1.5
18+
- numba==0.38.1
19+
- flask==1.0.2
20+
- pybox2d==2.3.1post2
21+
- pygame==1.9.2a0
22+
- h5py==2.8.0
23+
- matplotlib==2.2.2
24+
- opencv3=3.1.0
25+
- scikit-learn==0.19.1
26+
- mpi4py==2.0.0
27+
- pandas==0.23.4
28+
- pip:
29+
- Pillow==4.2.1
30+
- pyprind==2.11.2
31+
- boto3==1.7.73
32+
- PyOpenGL==3.1.0
33+
- nose2==0.8.0
34+
- pyzmq==17.1.0
35+
- tqdm==4.24.0
36+
- msgpack-python==0.5.6
37+
- cached_property==1.4.3
38+
- line_profiler==2.1.2
39+
- cloudpickle==0.5.3
40+
- Cython==0.28.5
41+
- redis==2.10.6
42+
- keras==1.2.1
43+
- git+https://github.com/Theano/Theano.git@adfe319ce6b781083d8dc3200fb4481b00853791#egg=Theano
44+
- git+https://github.com/neocxi/Lasagne.git@484866cf8b38d878e92d521be445968531646bb8#egg=Lasagne
45+
- git+https://github.com/plotly/plotly.py.git@2594076e29584ede2d09f2aa40a8a195b3f3fc66#egg=plotly
46+
- awscli==1.15.74
47+
- gym==0.10.5
48+
- pyglet==1.3.2
49+
- git+https://github.com/neocxi/prettytensor.git
50+
- jupyter==1.0.0
51+
- progressbar2==3.38.0
52+
- chainer==1.18.0
53+
- tensorflow==1.10.0
54+
- numpy-stl==2.2.0
55+
- nibabel==2.1.0
56+
- pylru==1.0.9
57+
- hyperopt==0.1
58+
- polling==0.3.0
59+
- lxml==4.2.4
60+
# RLLIB installs
61+
- six==1.11.0
62+
- redis==2.10.6

examples/rllab/stabilizing_the_ring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

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

2424
vehicles = Vehicles()
2525
vehicles.add(veh_id="rl",

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
gym==0.10.5
2-
numpy==1.14.5
2+
numpy==1.13.3
33
scipy==1.1.0
44
lxml==4.2.4
55
# theano==0.8.2 # for rllab
66
pyprind==2.11.2
77
# lasagne # for rllab
8-
tensorflow==1.10.0
8+
tensorflow==1.8.0
99
nose2==0.8.0
1010
six==1.11.0
1111
path.py
1212
joblib==0.10.3
1313
python-dateutil==2.7.3
1414
cached_property
15+

0 commit comments

Comments
 (0)