ray/README.md

83 lines
3.2 KiB
Markdown
Raw Normal View History

2016-06-10 14:12:15 -07:00
# Ray
2016-02-22 17:32:07 -08:00
2016-06-22 11:28:01 -07:00
[![Build Status](https://travis-ci.org/amplab/ray.svg?branch=master)](https://travis-ci.org/amplab/ray)
2016-06-10 15:36:10 -07:00
Ray is an experimental distributed execution framework with a Python-like
programming model. It is under development and not ready for general use.
2016-02-22 17:32:07 -08:00
2016-06-10 17:25:55 -07:00
## Example Code
### Loading ImageNet
TODO: fill this out.
## Design Decisions
For a description of our design decisions, see
- [Reference Counting](doc/reference-counting.md)
- [Aliasing](doc/aliasing.md)
2016-05-17 15:08:49 -07:00
- [Scheduler](doc/scheduler.md)
2016-02-22 17:32:07 -08:00
## Setup
2016-06-19 19:48:56 -07:00
### Linux, Mac, and other Unix-based systems
2016-06-22 11:42:04 -07:00
After running these instruction, add the line `source "$RAY_ROOT/setup-env.sh"` in your `~/.bashrc` file manually, where "$RAY_ROOT" is the path of the directory containing `setup-env.sh`.
2016-05-16 09:29:50 -07:00
1. sudo apt-get update
2. sudo apt-get install git
2016-06-10 14:12:15 -07:00
3. git clone https://github.com/amplab/ray.git
4. cd ray
2016-06-10 15:35:49 -07:00
5. ./setup.sh
2016-06-22 11:42:04 -07:00
6. ./build.sh
7. source setup-env.sh
2016-06-14 15:42:28 -07:00
2016-06-19 19:48:56 -07:00
### Windows
**Note:** A batch file is provided that clones any missing third-party libraries and applies patches to them.
Do not attempt to open the solution before the batch file applies the patches; otherwise, if the projects have been modified, the patches may be rejected, and you may be forced to revert your changes before re-running the batch file.
1. Install Microsoft Visual Studio 2015
2. Install Git
3. git clone https://github.com/amplab/ray.git
4. ray\thirdparty\download_thirdparty.bat
2016-06-14 15:42:28 -07:00
## Installing Ray on a cluster
These instructions work on EC2, but they may require some modifications to run
on your own cluster. In particular, on EC2, running `sudo` does not require a
password, and we currently don't handle the case where a password is needed.
1. Create a file `nodes.txt` of the IP addresses of the nodes in the cluster.
For example
52.50.28.103
52.51.210.207
2. Make sure that the nodes can all communicate with one another. On EC2, this
can be done by creating a new security group and adding the inbound rule "all
traffic" and adding the outbound rule "all traffic". Then add all of the nodes
in your cluster to that security group.
3. Run something like
```
python scripts/cluster.py --nodes nodes.txt \
--key-file key.pem \
--username ubuntu \
--installation-directory /home/ubuntu/
```
where you replace `nodes.txt`, `key.pem`, `ubuntu`, and `/home/ubuntu/` by the
appropriate values. This assumes that you can connect to each IP address in
`nodes.txt` with the command
```
ssh -i key.pem ubuntu@<ip-address>
```
4. The previous command should open a Python interpreter. To install Ray on the
cluster, run `install_ray(node_addresses)` in the interpreter. The interpreter
should block until the installation has completed.
5. To check that the installation succeeded, you can ssh to each node, cd into
the directory `ray/test/`, and run the tests (e.g., `python runtest.py`).
6. Now that Ray has been installed, you can start the cluster (the scheduler,
object stores, and workers) with the command `start_ray(node_addresses,
"/home/ubuntu/ray/test/test_worker.py")`, where the second argument is the path
on each node in the cluster to the worker code that you would like to use.