From b0f5cb54d3dd52dce8aaf63346d4353f7de74a4e Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 11:14:40 -0700 Subject: [PATCH 01/17] New way to install flow Add a Dockerfile that can run with a desktop on your browser with every flow packages installed --- docs/source/flow_setup.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 7d3deca62..42a5a8a22 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -235,3 +235,38 @@ You may define user-specific config parameters as follows :: cp flow/core/config.template.py flow/core/config.py # Create template for users using pycharm + + +==================== +VNC desktop using Docker for simple utilisation +==================== +Installation of a vnc desktop to get access to flow quickly + +First install docker on https://www.docker.com/ + +In terminal +:: + 1° docker pull lucasfischerberkeley/flow_desktop + 2° docker run -d -p 5901:5901 -p 6901:6901 -p 8888:8888 lucasfischerberkeley/flow_desktop + +Go into your browser ( Firefox, Chrome, Safari) +:: + 1° Go to http://localhost:6901/?password=vncpassword + 2° Go to Applications and open Terminal Emulator + 3° For sumo: Write python flow/examples/sumo/sugiyama.py and run it + 4° For rllib : Write python flow/examples/rllib/stabilizing_the_ring.py and run it + 5° For rllab : source activate flow-rllab and python flow/examples/rllab/figure_eight.py ( first time, run it twice) + +==================== +Use that docker container to run jupyter Notebook +==================== + +In the docker desktop +:: + 1° Go into Terminal Emulator + 2° Run jupyter notebook --NotebookApp.token=admin --ip 0.0.0.0 --allow-root + +Go into your browser ( Firefox, Chrome, Safari) +:: + 1° go to localhost:8888/tree + 2° the password is 'admin' and you can run all your notebook and tutorial From b321ac541634ba865d9e2f59043d4b603eb166cf Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 11:24:42 -0700 Subject: [PATCH 02/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 42a5a8a22..9fd4c84ca 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -238,9 +238,9 @@ You may define user-specific config parameters as follows ==================== -VNC desktop using Docker for simple utilisation +Remot desktop using Docker for simple utilisation of flow ==================== -Installation of a vnc desktop to get access to flow quickly +Installation of a remot desktop and docker to get access to flow quickly First install docker on https://www.docker.com/ From d8ff3997fff51aaa2a11800267f8035efd6c1331 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 11:34:23 -0700 Subject: [PATCH 03/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 9fd4c84ca..29bb42d69 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -258,7 +258,7 @@ Go into your browser ( Firefox, Chrome, Safari) 5° For rllab : source activate flow-rllab and python flow/examples/rllab/figure_eight.py ( first time, run it twice) ==================== -Use that docker container to run jupyter Notebook +Notebooks and tutorial ==================== In the docker desktop From ab60b97e355863ad056ed2cca994782bc49e1aca Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 12:41:20 -0700 Subject: [PATCH 04/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 48 ++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 29bb42d69..8e47f7904 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -1,4 +1,26 @@ -Setup Instructions +Summary : + +1 - Local Installation + a. Setup Instructions + b. Dependencies + c. Sumo + d. Flow + e. Testing the Installation + f. Rllab-multiagent (optional) + g. Ray/RLlib (optional) + h. Getting started (rllab-multiagent) + i. Getting started (Ray/RLlib) + j. Custom configuration + +2- Remote desktop using Docker + + +==================== +1 - Local Installation +==================== + + +a. Setup Instructions ****************** To get Flow running, you need three things: Flow, @@ -11,7 +33,7 @@ module bugs from Python. Just install the missing module using your OS-specific package manager / installation tool. Follow the shell commands below to get started. -Dependencies +b. Dependencies ============ We begin by installing dependencies needed by the four repositories mentioned above. **It is highly recommended that users install** @@ -36,7 +58,7 @@ install it): # sumo dependencies brew install Caskroom/cask/xquartz autoconf automake pkg-config libtool gdal proj xerces-c fox -sumo +c. 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 @@ -82,7 +104,7 @@ Finally, test your sumo install and version by running the following commands sumo --version sumo-gui -Flow +d. Flow ==== Once sumo and the various dependencies are in place, we are ready to install a functional version of Flow. With this, we can begin to simulate traffic within @@ -109,7 +131,7 @@ For mac run echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bash_profile source ~/.bash_profile -Testing the Installation +e. Testing the Installation ======================== Once the above modules have been successfully installed, we can test the @@ -133,7 +155,7 @@ Optionally, run the unit tests: Congratulations, you now have successfully set up Flow! -rllab-multiagent (optional) +f. Rllab-multiagent (optional) =========================== Flow has been tested on a variety of RL libraries, the installation of which is optional but may be of use when trying to execute some of the examples files @@ -157,7 +179,7 @@ For mac run echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bash_profile source ~/.bash_profile -Ray/RLlib (optional) +g. Ray/RLlib (optional) ==================== RLlib is another RL library that has been extensively tested on the Flow repository. @@ -177,7 +199,7 @@ required libraries as specified at and then follow the setup instructions. -Getting started (rllab-multiagent) +h. Getting started (rllab-multiagent) ================================== To run any of the RL examples, make sure to run @@ -195,7 +217,7 @@ If it does not fail, this means that you have Flow properly configured with rllab-multiagent. -Getting started (Ray/RLlib) +i. Getting started (Ray/RLlib) =========================== See `getting started with RLlib `_ for sample commands. @@ -228,7 +250,7 @@ jobs from there. ray teardown scripts/ray_autoscale.yaml -Custom configuration +j. Custom configuration ==================== You may define user-specific config parameters as follows @@ -238,8 +260,10 @@ You may define user-specific config parameters as follows ==================== -Remot desktop using Docker for simple utilisation of flow +Remote desktop using Docker for simple utilisation of flow ==================== + + Installation of a remot desktop and docker to get access to flow quickly First install docker on https://www.docker.com/ @@ -257,7 +281,7 @@ Go into your browser ( Firefox, Chrome, Safari) 4° For rllib : Write python flow/examples/rllib/stabilizing_the_ring.py and run it 5° For rllab : source activate flow-rllab and python flow/examples/rllab/figure_eight.py ( first time, run it twice) -==================== + Notebooks and tutorial ==================== From c97339e0014f8284e20fceec740bb115ab2a4e88 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 12:41:42 -0700 Subject: [PATCH 05/17] Summary added From 2b094522605ca271e90a14e4290568cd7c2d8860 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 12:45:12 -0700 Subject: [PATCH 06/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 8e47f7904..2d7e68d89 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -1,25 +1,3 @@ -Summary : - -1 - Local Installation - a. Setup Instructions - b. Dependencies - c. Sumo - d. Flow - e. Testing the Installation - f. Rllab-multiagent (optional) - g. Ray/RLlib (optional) - h. Getting started (rllab-multiagent) - i. Getting started (Ray/RLlib) - j. Custom configuration - -2- Remote desktop using Docker - - -==================== -1 - Local Installation -==================== - - a. Setup Instructions ****************** From d180c3355186022deba450afe7f5923e6ad29a73 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 12:52:33 -0700 Subject: [PATCH 07/17] Update of flow setup with summary Added a summary --- docs/source/flow_setup.rst | 49 +++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 2d7e68d89..3fb3ac9c7 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -1,4 +1,24 @@ -a. Setup Instructions +SUMMARY +____ + + +1 - Local Installation + a. Dependencies + b. Sumo + c. Flow + d. Testing the Installation + e. Rllab-multiagent (optional) + f. Ray/RLlib (optional) + g. Getting started (rllab-multiagent) + h. Getting started (Ray/RLlib) + i. Custom configuration + +2- Remote desktop using Docker (recommended for testing purpose) + a. Installation + b. Notebooks and tutorial + + +1. Local Installation ****************** To get Flow running, you need three things: Flow, @@ -11,7 +31,7 @@ module bugs from Python. Just install the missing module using your OS-specific package manager / installation tool. Follow the shell commands below to get started. -b. Dependencies +a. Dependencies ============ We begin by installing dependencies needed by the four repositories mentioned above. **It is highly recommended that users install** @@ -36,7 +56,7 @@ install it): # sumo dependencies brew install Caskroom/cask/xquartz autoconf automake pkg-config libtool gdal proj xerces-c fox -c. Sumo +b. 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 @@ -82,7 +102,7 @@ Finally, test your sumo install and version by running the following commands sumo --version sumo-gui -d. Flow +c. Flow ==== Once sumo and the various dependencies are in place, we are ready to install a functional version of Flow. With this, we can begin to simulate traffic within @@ -109,7 +129,7 @@ For mac run echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bash_profile source ~/.bash_profile -e. Testing the Installation +d. Testing the Installation ======================== Once the above modules have been successfully installed, we can test the @@ -133,7 +153,7 @@ Optionally, run the unit tests: Congratulations, you now have successfully set up Flow! -f. Rllab-multiagent (optional) +e. Rllab-multiagent (optional) =========================== Flow has been tested on a variety of RL libraries, the installation of which is optional but may be of use when trying to execute some of the examples files @@ -157,7 +177,7 @@ For mac run echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bash_profile source ~/.bash_profile -g. Ray/RLlib (optional) +f. Ray/RLlib (optional) ==================== RLlib is another RL library that has been extensively tested on the Flow repository. @@ -177,7 +197,7 @@ required libraries as specified at and then follow the setup instructions. -h. Getting started (rllab-multiagent) +g. Getting started (rllab-multiagent) ================================== To run any of the RL examples, make sure to run @@ -195,7 +215,7 @@ If it does not fail, this means that you have Flow properly configured with rllab-multiagent. -i. Getting started (Ray/RLlib) +h. Getting started (Ray/RLlib) =========================== See `getting started with RLlib `_ for sample commands. @@ -228,7 +248,7 @@ jobs from there. ray teardown scripts/ray_autoscale.yaml -j. Custom configuration +i. Custom configuration ==================== You may define user-specific config parameters as follows @@ -237,10 +257,11 @@ You may define user-specific config parameters as follows cp flow/core/config.template.py flow/core/config.py # Create template for users using pycharm -==================== -Remote desktop using Docker for simple utilisation of flow -==================== +Remote desktop using Docker for simple utilisation of flow (recommended for testing purpose) +****************** +a. Installation +==================== Installation of a remot desktop and docker to get access to flow quickly @@ -260,7 +281,7 @@ Go into your browser ( Firefox, Chrome, Safari) 5° For rllab : source activate flow-rllab and python flow/examples/rllab/figure_eight.py ( first time, run it twice) -Notebooks and tutorial +b. Notebooks and tutorial ==================== In the docker desktop From e6140d591cb67a2fc84e78cd8a2af7981df8b74f Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 12:55:57 -0700 Subject: [PATCH 08/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 3fb3ac9c7..a6819556f 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -3,15 +3,15 @@ ____ 1 - Local Installation - a. Dependencies - b. Sumo - c. Flow - d. Testing the Installation - e. Rllab-multiagent (optional) - f. Ray/RLlib (optional) - g. Getting started (rllab-multiagent) - h. Getting started (Ray/RLlib) - i. Custom configuration + A. Dependencies + B. Sumo + C. Flow + D. Testing the Installation + E. Rllab-multiagent (optional) + F. Ray/RLlib (optional) + G. Getting started (rllab-multiagent) + H. Getting started (Ray/RLlib) + I. Custom configuration 2- Remote desktop using Docker (recommended for testing purpose) a. Installation @@ -31,7 +31,7 @@ module bugs from Python. Just install the missing module using your OS-specific package manager / installation tool. Follow the shell commands below to get started. -a. Dependencies +1. Dependencies ============ We begin by installing dependencies needed by the four repositories mentioned above. **It is highly recommended that users install** @@ -56,7 +56,7 @@ install it): # sumo dependencies brew install Caskroom/cask/xquartz autoconf automake pkg-config libtool gdal proj xerces-c fox -b. Sumo +2. 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 @@ -102,7 +102,7 @@ Finally, test your sumo install and version by running the following commands sumo --version sumo-gui -c. Flow +3. Flow ==== Once sumo and the various dependencies are in place, we are ready to install a functional version of Flow. With this, we can begin to simulate traffic within @@ -129,7 +129,7 @@ For mac run echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bash_profile source ~/.bash_profile -d. Testing the Installation +4. Testing the Installation ======================== Once the above modules have been successfully installed, we can test the @@ -153,7 +153,7 @@ Optionally, run the unit tests: Congratulations, you now have successfully set up Flow! -e. Rllab-multiagent (optional) +5. Rllab-multiagent (optional) =========================== Flow has been tested on a variety of RL libraries, the installation of which is optional but may be of use when trying to execute some of the examples files @@ -177,7 +177,7 @@ For mac run echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bash_profile source ~/.bash_profile -f. Ray/RLlib (optional) +6. Ray/RLlib (optional) ==================== RLlib is another RL library that has been extensively tested on the Flow repository. @@ -197,7 +197,7 @@ required libraries as specified at and then follow the setup instructions. -g. Getting started (rllab-multiagent) +7. Getting started (rllab-multiagent) ================================== To run any of the RL examples, make sure to run @@ -215,7 +215,7 @@ If it does not fail, this means that you have Flow properly configured with rllab-multiagent. -h. Getting started (Ray/RLlib) +8. Getting started (Ray/RLlib) =========================== See `getting started with RLlib `_ for sample commands. @@ -248,7 +248,7 @@ jobs from there. ray teardown scripts/ray_autoscale.yaml -i. Custom configuration +9. Custom configuration ==================== You may define user-specific config parameters as follows @@ -260,7 +260,7 @@ You may define user-specific config parameters as follows Remote desktop using Docker for simple utilisation of flow (recommended for testing purpose) ****************** -a. Installation +1. Installation ==================== Installation of a remot desktop and docker to get access to flow quickly @@ -281,7 +281,7 @@ Go into your browser ( Firefox, Chrome, Safari) 5° For rllab : source activate flow-rllab and python flow/examples/rllab/figure_eight.py ( first time, run it twice) -b. Notebooks and tutorial +2. Notebooks and tutorial ==================== In the docker desktop From 617abdc8af107032264d14b89aea742f383c4bf2 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Tue, 28 Aug 2018 20:35:19 -0700 Subject: [PATCH 09/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index a6819556f..54e7f9465 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -1,6 +1,4 @@ -SUMMARY -____ - +.. contents:: Table of contents 1 - Local Installation A. Dependencies From e5f90b02e369d2a344f84ce4fc22500f1ba2b523 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Wed, 29 Aug 2018 17:00:21 -0700 Subject: [PATCH 10/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 54e7f9465..778eedcef 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -1,20 +1,5 @@ .. contents:: Table of contents -1 - Local Installation - A. Dependencies - B. Sumo - C. Flow - D. Testing the Installation - E. Rllab-multiagent (optional) - F. Ray/RLlib (optional) - G. Getting started (rllab-multiagent) - H. Getting started (Ray/RLlib) - I. Custom configuration - -2- Remote desktop using Docker (recommended for testing purpose) - a. Installation - b. Notebooks and tutorial - 1. Local Installation ****************** @@ -255,7 +240,7 @@ You may define user-specific config parameters as follows cp flow/core/config.template.py flow/core/config.py # Create template for users using pycharm -Remote desktop using Docker for simple utilisation of flow (recommended for testing purpose) +2. Remote desktop using Docker for simple utilisation of flow (recommended for testing purpose) ****************** 1. Installation From 4d9545a7293fc7482d4773414688c33591fc78fc Mon Sep 17 00:00:00 2001 From: lucfisc Date: Fri, 31 Aug 2018 12:18:06 -0700 Subject: [PATCH 11/17] Dockerfile remote desktop Docker file to install the remote desktop --- Dockerfile | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a094c8bc2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,89 @@ +FROM consol/ubuntu-xfce-vnc + +USER 0 + +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV PATH /opt/conda/bin:$PATH + +RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \ + libglib2.0-0 libxext6 libsm6 libxrender1 \ + git mercurial subversion + +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda && \ + rm ~/miniconda.sh && \ + ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ + echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate base" >> ~/.bashrc + +RUN apt-get install -y curl grep sed dpkg && \ + TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ + curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ + dpkg -i tini.deb && \ + rm tini.deb && \ + apt-get clean + + +RUN apt-get update && apt-get upgrade -y +RUN apt-get install -y cmake swig libgtest-dev python-pygame python-scipy autoconf libtool pkg-config libgdal-dev libxerces-c-dev && \ + apt-get install -y libproj-dev libfox-1.6-dev libxml2-dev libxslt1-dev build-essential curl unzip flex bison python python-dev python3-dev +RUN pip install cmake cython + + + +RUN cd ~ && \ + git clone --recursive https://github.com/eclipse/sumo.git && \ + cd sumo && \ + git checkout cbe5b73d781376c939b07c6127803a804c803ed7 && \ + mkdir build/cmake-build + +RUN cd ~/sumo && cd build/cmake-build && \ + cmake ../.. && \ + make && \ + echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bashrc && \ + echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bashrc && \ + echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bashrc + + + + + +RUN cd ~ && \ + git clone https://github.com/flow-project/flow.git && \ + cd flow && \ + conda env create -f environment.yml + +RUN cd flow && python setup.py develop && \ + echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc + +RUN cd ~ && \ + git clone https://github.com/cathywu/rllab-multiagent.git && \ + cd rllab-multiagent && \ + conda env create -f environment.yml && \ + python setup.py develop && \ + echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bashrc + +RUN echo "source activate flow" >> /root/.bashrc +RUN echo "source activate flow" +ENV BASH_ENV /root/.bashrc + + + + +## RAY +RUN apt-get update + +RUN apt-get install -y libboost-dev libboost-test-dev libboost-program-options-dev libboost-filesystem-dev \ + libboost-thread-dev libevent-dev automake libtool flex \ + bison pkg-config g++ libssl-dev +RUN git clone https://github.com/apache/thrift && cd thrift && ./bootstrap.sh && ./configure && make && make install + +#### RAY +RUN cd ~ conda install libgcc jupyter lz4 +RUN apt-get update +RUN apt-get install -y cmake pkg-config build-essential autoconf curl libtool libboost-dev libboost-filesystem-dev libboost-system-dev unzip bison openssl +RUN git clone https://github.com/eugenevinitsky/ray +RUN cd ray/python && python setup.py install +RUN echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc + +USER 0 From 7c5591c9d0241480009c7d8b707c0326ad0dc9dd Mon Sep 17 00:00:00 2001 From: lucfisc Date: Fri, 31 Aug 2018 17:11:46 -0700 Subject: [PATCH 12/17] Delete Dockerfile --- Dockerfile | 89 ------------------------------------------------------ 1 file changed, 89 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a094c8bc2..000000000 --- a/Dockerfile +++ /dev/null @@ -1,89 +0,0 @@ -FROM consol/ubuntu-xfce-vnc - -USER 0 - -ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ENV PATH /opt/conda/bin:$PATH - -RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \ - libglib2.0-0 libxext6 libsm6 libxrender1 \ - git mercurial subversion - -RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O ~/miniconda.sh && \ - /bin/bash ~/miniconda.sh -b -p /opt/conda && \ - rm ~/miniconda.sh && \ - ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ - echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ - echo "conda activate base" >> ~/.bashrc - -RUN apt-get install -y curl grep sed dpkg && \ - TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ - curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ - dpkg -i tini.deb && \ - rm tini.deb && \ - apt-get clean - - -RUN apt-get update && apt-get upgrade -y -RUN apt-get install -y cmake swig libgtest-dev python-pygame python-scipy autoconf libtool pkg-config libgdal-dev libxerces-c-dev && \ - apt-get install -y libproj-dev libfox-1.6-dev libxml2-dev libxslt1-dev build-essential curl unzip flex bison python python-dev python3-dev -RUN pip install cmake cython - - - -RUN cd ~ && \ - git clone --recursive https://github.com/eclipse/sumo.git && \ - cd sumo && \ - git checkout cbe5b73d781376c939b07c6127803a804c803ed7 && \ - mkdir build/cmake-build - -RUN cd ~/sumo && cd build/cmake-build && \ - cmake ../.. && \ - make && \ - echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bashrc && \ - echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bashrc && \ - echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bashrc - - - - - -RUN cd ~ && \ - git clone https://github.com/flow-project/flow.git && \ - cd flow && \ - conda env create -f environment.yml - -RUN cd flow && python setup.py develop && \ - echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc - -RUN cd ~ && \ - git clone https://github.com/cathywu/rllab-multiagent.git && \ - cd rllab-multiagent && \ - conda env create -f environment.yml && \ - python setup.py develop && \ - echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bashrc - -RUN echo "source activate flow" >> /root/.bashrc -RUN echo "source activate flow" -ENV BASH_ENV /root/.bashrc - - - - -## RAY -RUN apt-get update - -RUN apt-get install -y libboost-dev libboost-test-dev libboost-program-options-dev libboost-filesystem-dev \ - libboost-thread-dev libevent-dev automake libtool flex \ - bison pkg-config g++ libssl-dev -RUN git clone https://github.com/apache/thrift && cd thrift && ./bootstrap.sh && ./configure && make && make install - -#### RAY -RUN cd ~ conda install libgcc jupyter lz4 -RUN apt-get update -RUN apt-get install -y cmake pkg-config build-essential autoconf curl libtool libboost-dev libboost-filesystem-dev libboost-system-dev unzip bison openssl -RUN git clone https://github.com/eugenevinitsky/ray -RUN cd ray/python && python setup.py install -RUN echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc - -USER 0 From 6ad96ed7fd6cac35647a79b01be7062e7e8ee269 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Fri, 31 Aug 2018 17:12:39 -0700 Subject: [PATCH 13/17] Remote Desktop dockerfile --- docker/Dockerfile-RemoteDesktop | 90 +++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 docker/Dockerfile-RemoteDesktop diff --git a/docker/Dockerfile-RemoteDesktop b/docker/Dockerfile-RemoteDesktop new file mode 100644 index 000000000..ad9c0d2f4 --- /dev/null +++ b/docker/Dockerfile-RemoteDesktop @@ -0,0 +1,90 @@ +FROM consol/ubuntu-xfce-vnc + +USER 0 + +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV PATH /opt/conda/bin:$PATH + +RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \ + libglib2.0-0 libxext6 libsm6 libxrender1 \ + git mercurial subversion + +RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda && \ + rm ~/miniconda.sh && \ + ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ + echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate base" >> ~/.bashrc + +RUN apt-get install -y curl grep sed dpkg && \ + TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ + curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ + dpkg -i tini.deb && \ + rm tini.deb && \ + apt-get clean + + +RUN apt-get update && apt-get upgrade -y +RUN apt-get install -y cmake swig libgtest-dev python-pygame python-scipy autoconf libtool pkg-config libgdal-dev libxerces-c-dev && \ + apt-get install -y libproj-dev libfox-1.6-dev libxml2-dev libxslt1-dev build-essential curl unzip flex bison python python-dev python3-dev +RUN pip install cmake cython + + + +RUN cd ~ && \ + git clone --recursive https://github.com/eclipse/sumo.git && \ + cd sumo && \ + git checkout cbe5b73d781376c939b07c6127803a804c803ed7 && \ + mkdir build/cmake-build + +RUN cd ~/sumo && cd build/cmake-build && \ + cmake ../.. && \ + make && \ + echo 'export SUMO_HOME="$HOME/sumo"' >> ~/.bashrc && \ + echo 'export PATH="$HOME/sumo/bin:$PATH"' >> ~/.bashrc && \ + echo 'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"' >> ~/.bashrc + + + + + +RUN cd ~ && \ + git clone https://github.com/flow-project/flow.git && \ + cd flow && \ + conda env create -f environment.yml + +RUN cd flow && python setup.py develop && \ + echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc + +RUN cd ~ && \ + git clone https://github.com/cathywu/rllab-multiagent.git && \ + cd rllab-multiagent && \ + conda env create -f environment.yml && \ + python setup.py develop && \ + echo 'export PYTHONPATH="$HOME/rllab-multiagent:$PYTHONPATH"' >> ~/.bashrc + +RUN echo "source activate flow" >> /root/.bashrc +RUN echo "source activate flow" +ENV BASH_ENV /root/.bashrc + + + + +## RAY +RUN apt-get update + +RUN apt-get install -y libboost-dev libboost-test-dev libboost-program-options-dev libboost-filesystem-dev \ + libboost-thread-dev libevent-dev automake libtool flex \ + bison pkg-config g++ libssl-dev +RUN git clone https://github.com/apache/thrift && cd thrift && ./bootstrap.sh && ./configure && make && make install + +#### RAY +RUN cd ~ conda install libgcc jupyter +RUN apt-get update +RUN apt-get install -y cmake pkg-config build-essential autoconf curl libtool libboost-dev libboost-filesystem-dev libboost-system-dev unzip bison openssl +RUN git clone https://github.com/eugenevinitsky/ray +RUN cd ray/python && python setup.py install +RUN echo 'export PYTHONPATH="$HOME/flow:$PYTHONPATH"' >> ~/.bashrc +RUN pip install lz4 gym==0.10.5 + +USER 0 From 9657395b9b02ee00b5938717681d87c440cfe680 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Fri, 31 Aug 2018 17:13:11 -0700 Subject: [PATCH 14/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 778eedcef..1dc82488d 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -252,8 +252,8 @@ First install docker on https://www.docker.com/ In terminal :: - 1° docker pull lucasfischerberkeley/flow_desktop - 2° docker run -d -p 5901:5901 -p 6901:6901 -p 8888:8888 lucasfischerberkeley/flow_desktop + 1° docker pull lucasfischerberkeley/flowdesktop + 2° docker run -d -p 5901:5901 -p 6901:6901 -p 8888:8888 lucasfischerberkeley/flowdesktop Go into your browser ( Firefox, Chrome, Safari) :: From 47bbf7e6d354b1f31ec2f6b2d67a29667754a0b7 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Fri, 31 Aug 2018 17:15:55 -0700 Subject: [PATCH 15/17] TYPO in the text --- docs/source/flow_setup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 1dc82488d..f2d906e22 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -246,7 +246,7 @@ You may define user-specific config parameters as follows 1. Installation ==================== -Installation of a remot desktop and docker to get access to flow quickly +Installation of a remote desktop and docker to get access to flow quickly First install docker on https://www.docker.com/ From c4d421e1c09188e0c08e0f4cd4a199719853b094 Mon Sep 17 00:00:00 2001 From: lucfisc Date: Mon, 3 Sep 2018 02:46:52 -0700 Subject: [PATCH 16/17] Update flow_setup.rst --- docs/source/flow_setup.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index f2d906e22..38b152282 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -171,9 +171,7 @@ The installation process for this library is as follows: cd ~ git clone https://github.com/eugenevinitsky/ray.git - pushd ray/python - sudo python3 setup.py develop - popd + sudo python3 ray/python/setup.py develop If missing libraries cause errors, please also install additional required libraries as specified at From 60db05788ffd872ac5a75f957109cb67cf60f36e Mon Sep 17 00:00:00 2001 From: lucfisc Date: Mon, 3 Sep 2018 02:51:51 -0700 Subject: [PATCH 17/17] Add word to solve conflict Added two lines in order to solver the merging conflict I had --- docs/source/flow_setup.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/flow_setup.rst b/docs/source/flow_setup.rst index 38b152282..5b9895ac9 100644 --- a/docs/source/flow_setup.rst +++ b/docs/source/flow_setup.rst @@ -84,6 +84,8 @@ Finally, test your sumo install and version by running the following commands which sumo sumo --version sumo-gui + +If you are a mac user and the above command gives you the error FXApp:openDisplay: unable to open display :0.0 make sure to open the application XQuartz. 3. Flow ====