Add instructions for pip installing the latest wheel. (#1672)

This commit is contained in:
Robert Nishihara 2018-03-12 00:52:00 -07:00 committed by Richard Liaw
parent 076936a7f5
commit 15a4392156
7 changed files with 159 additions and 197 deletions

View file

@ -11,6 +11,30 @@ Ray
Ray is a flexible, high-performance distributed execution framework.
Ray is easy to install: ``pip install ray``
Example Use
-----------
+------------------------------------------------+----------------------------------------------------+
| **Basic Python** | **Distributed with Ray** |
+------------------------------------------------+----------------------------------------------------+
|.. code-block:: python |.. code-block:: python |
| | |
| # Execute f serially. | # Execute f in parallel. |
| | |
| | @ray.remote |
| def f(): | def f(): |
| time.sleep(1) | time.sleep(1) |
| return 1 | return 1 |
| | |
| | |
| | ray.init() |
| results = [f() for i in range(4)] | results = ray.get([f.remote() for i in range(4)]) |
+------------------------------------------------+----------------------------------------------------+
Ray comes with libraries that accelerate deep learning and reinforcement learning development:
- `Ray Tune`_: Hyperparameter Optimization Framework
@ -19,40 +43,14 @@ Ray comes with libraries that accelerate deep learning and reinforcement learnin
.. _`Ray Tune`: http://ray.readthedocs.io/en/latest/tune.html
.. _`Ray RLlib`: http://ray.readthedocs.io/en/latest/rllib.html
Installation
------------
- Ray can be installed on Linux and Mac with ``pip install ray``.
- To build Ray from source, see the instructions for `Ubuntu`_ and `Mac`_.
Ray can be installed on Linux and Mac with ``pip install ray``.
.. _`Ubuntu`: http://ray.readthedocs.io/en/latest/install-on-ubuntu.html
.. _`Mac`: http://ray.readthedocs.io/en/latest/install-on-macosx.html
Example Program
---------------
+------------------------------------------------+----------------------------------------------+
| **Basic Python** | **Distributed with Ray** |
+------------------------------------------------+----------------------------------------------+
|.. code:: python |.. code-block:: python |
| | |
| import time | import time |
| | import ray |
| | |
| | ray.init() |
| | |
| | @ray.remote |
| def f(): | def f(): |
| time.sleep(1) | time.sleep(1) |
| return 1 | return 1 |
| | |
| # Execute f serially. | # Execute f in parallel. |
| results = [f() for i in range(4)] | object_ids = [f.remote() for i in range(4)] |
| | results = ray.get(object_ids) |
+------------------------------------------------+----------------------------------------------+
To build Ray from source or to install the nightly versions, see the `installation documentation`_.
.. _`installation documentation`: http://ray.readthedocs.io/en/latest/installation.html
More Information
----------------

View file

@ -51,8 +51,7 @@ Ray comes with libraries that accelerate deep learning and reinforcement learnin
:maxdepth: 1
:caption: Installation
install-on-ubuntu.rst
install-on-macosx.rst
installation.rst
install-on-docker.rst
installation-troubleshooting.rst

View file

@ -1,76 +0,0 @@
Installation on Mac OS X
========================
Ray should work with Python 2 and Python 3. We have tested Ray on OS X 10.11 and
10.12.
You can install Ray as follows.
.. code-block:: bash
pip install ray
Building Ray from source
------------------------
If you want to use the latest version of Ray, you can build it from source.
Dependencies
~~~~~~~~~~~~
To build Ray, first install the following dependencies. We recommend using
`Anaconda`_.
.. _`Anaconda`: https://www.continuum.io/downloads
.. code-block:: bash
brew update
brew install cmake pkg-config automake autoconf libtool openssl bison wget
pip install cython
If you are using Anaconda, you may also need to run the following.
.. code-block:: bash
conda install libgcc
Install Ray
~~~~~~~~~~~
Ray can be built from the repository as follows.
.. code-block:: bash
git clone https://github.com/ray-project/ray.git
cd ray/python
pip install -e . --verbose # Add --user if you see a permission denied error.
Alternatively, Ray can be built from the repository without cloning using pip.
.. code-block:: bash
pip install git+https://github.com/ray-project/ray.git#subdirectory=python
Test if the installation succeeded
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To test if the installation was successful, try running some tests. This assumes
that you've cloned the git repository.
.. code-block:: bash
python test/runtest.py
Cleaning the source tree
~~~~~~~~~~~~~~~~~~~~~~~~
The source tree can be cleaned by running
.. code-block:: bash
git clean -f -f -x -d
in the ``ray/`` directory.

View file

@ -1,84 +0,0 @@
Installation on Ubuntu
======================
Ray should work with Python 2 and Python 3. We have tested Ray on Ubuntu 14.04
and Ubuntu 16.04.
You can install Ray as follows.
.. code-block:: bash
pip install ray
Building Ray from source
------------------------
If you want to use the latest version of Ray, you can build it from source.
Dependencies
~~~~~~~~~~~~
To build Ray, first install the following dependencies. We recommend using
`Anaconda`_.
.. _`Anaconda`: https://www.continuum.io/downloads
.. code-block:: bash
sudo apt-get update
sudo apt-get install -y cmake pkg-config build-essential autoconf curl libtool unzip flex bison python # we install python here because python2 is required to build the webui
# If you are not using Anaconda, you need the following.
sudo apt-get install python-dev # For Python 2.
sudo apt-get install python3-dev # For Python 3.
# If you are on Ubuntu 14.04, you need the following.
pip install cmake
pip install cython
If you are using Anaconda, you may also need to run the following.
.. code-block:: bash
conda install libgcc
Install Ray
~~~~~~~~~~~
Ray can be built from the repository as follows.
.. code-block:: bash
git clone https://github.com/ray-project/ray.git
cd ray/python
pip install -e . --verbose # Add --user if you see a permission denied error.
Alternatively, Ray can be built from the repository without cloning using pip.
.. code-block:: bash
pip install git+https://github.com/ray-project/ray.git#subdirectory=python
Test if the installation succeeded
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To test if the installation was successful, try running some tests. This assumes
that you've cloned the git repository.
.. code-block:: bash
python test/runtest.py
Cleaning the source tree
~~~~~~~~~~~~~~~~~~~~~~~~
The source tree can be cleaned by running
.. code-block:: bash
git clean -f -f -x -d
in the ``ray/`` directory.

127
doc/source/installation.rst Normal file
View file

@ -0,0 +1,127 @@
Installing Ray
==============
Ray should work with Python 2 and Python 3. We have tested Ray on Ubuntu 14.04, Ubuntu 16.04, OS X 10.11 and 10.12.
You can install Ray as follows.
.. code-block:: bash
pip install ray
Trying the latest version of Ray
--------------------------------
Here are links to the latest wheels (which are built off of master). These versions will have newer
features but may be subject to more bugs. To install these wheels, run the following command:
.. code-block:: bash
pip install -U [link to wheel]
=================== ===================
Linux MacOS
=================== ===================
`Linux Python 3.6`_ `MacOS Python 3.6`_
`Linux Python 3.5`_ `MacOS Python 3.5`_
`Linux Python 3.4`_ `MacOS Python 3.4`_
`Linux Python 3.3`_
`Linux Python 2.7`_ `MacOS Python 2.7`_
=================== ===================
.. _`Linux Python 3.6`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp36-cp36m-manylinux1_x86_64.whl
.. _`Linux Python 3.5`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp35-cp35m-manylinux1_x86_64.whl
.. _`Linux Python 3.4`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp34-cp34m-manylinux1_x86_64.whl
.. _`Linux Python 3.3`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp33-cp33m-manylinux1_x86_64.whl
.. _`Linux Python 2.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp27-cp27mu-manylinux1_x86_64.whl
.. _`MacOS Python 3.6`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp36-cp36m-macosx_10_6_intel.whl
.. _`MacOS Python 3.5`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp35-cp35m-macosx_10_6_intel.whl
.. _`MacOS Python 3.4`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp34-cp34m-macosx_10_6_intel.whl
.. _`MacOS Python 2.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.3.1-cp27-cp27m-macosx_10_6_intel.whl
Building Ray from source
------------------------
If you want to use the latest version of Ray, you can build it from source. Below, we have instructions for installing dependencies and building from source for both Linux and MacOS.
Dependencies
~~~~~~~~~~~~
To build Ray, first install the following dependencies. We recommend using
`Anaconda`_.
.. _`Anaconda`: https://www.continuum.io/downloads
For Ubuntu, run the following commands:
.. code-block:: bash
sudo apt-get update
sudo apt-get install -y cmake pkg-config build-essential autoconf curl libtool unzip flex bison python # we install python here because python2 is required to build the webui
# If you are not using Anaconda, you need the following.
sudo apt-get install python-dev # For Python 2.
sudo apt-get install python3-dev # For Python 3.
# If you are on Ubuntu 14.04, you need the following.
pip install cmake
pip install cython
For MacOS, run the following commands:
.. code-block:: bash
brew update
brew install cmake pkg-config automake autoconf libtool openssl bison wget
pip install cython
If you are using Anaconda, you may also need to run the following.
.. code-block:: bash
conda install libgcc
Install Ray
~~~~~~~~~~~
Ray can be built from the repository as follows.
.. code-block:: bash
git clone https://github.com/ray-project/ray.git
cd ray/python
pip install -e . --verbose # Add --user if you see a permission denied error.
Alternatively, Ray can be built from the repository without cloning using pip.
.. code-block:: bash
pip install git+https://github.com/ray-project/ray.git#subdirectory=python
Test if the installation succeeded
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To test if the installation was successful, try running some tests. This assumes
that you've cloned the git repository.
.. code-block:: bash
python test/runtest.py
Cleaning the source tree
~~~~~~~~~~~~~~~~~~~~~~~~
The source tree can be cleaned by running
.. code-block:: bash
git clean -f -f -x -d
in the ``ray/`` directory.

View file

@ -15,10 +15,9 @@ Deploying Ray on a Cluster
This section assumes that you have a cluster running and that the nodes in the
cluster can communicate with each other. It also assumes that Ray is installed
on each machine. To install Ray, follow the instructions for
`installation on Ubuntu`_.
on each machine. To install Ray, follow the `installation instructions`_.
.. _`installation on Ubuntu`: http://ray.readthedocs.io/en/latest/install-on-ubuntu.html
.. _`installation instructions`: http://ray.readthedocs.io/en/latest/installation.html
Starting Ray on each machine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -12,8 +12,7 @@ commands and scripts on many machines simultaneously.
Booting up a cluster on EC2
---------------------------
* Create an EC2 instance running Ray following instructions for
`installation on Ubuntu`_.
* Create an EC2 instance running Ray following the `installation instructions`_.
* Add any packages that you may need for running your application.
* Install the pssh package: ``sudo apt-get install pssh``.
@ -23,7 +22,7 @@ Booting up a cluster on EC2
* Configure the instance security groups so that they machines can all
communicate with one another.
.. _`installation on Ubuntu`: http://ray.readthedocs.io/en/latest/install-on-ubuntu.html
.. _`installation instructions`: http://ray.readthedocs.io/en/latest/installation.html
.. _`Create an AMI`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html
Deploying Ray on a Cluster