2018-07-29 08:09:30 +08:00
Install Ray for Java
====================
Ray works for Java 8 and above. Currently, we only support building Ray from source.
Build from source
-----------------
Install dependencies
^^^^^^^^^^^^^^^^^^^^
First, make sure JDK 8 or above is installed on your machine. If not, you can download it from `here <http://www.oracle.com/technetwork/java/javase/downloads/index.html> `_ .
Then install the following dependencies.
For Ubuntu users, run the following commands:
::
sudo apt-get update
2019-02-26 23:07:43 -08:00
sudo apt-get install -y maven build-essential curl unzip psmisc python # we install python here because python2 is required to build the webui
2018-07-29 08:09:30 +08:00
2018-12-14 20:49:37 -08:00
pip install cython==0.29.0
2018-07-29 08:09:30 +08:00
For macOS users, run the following commands:
::
brew update
2019-02-26 23:07:43 -08:00
brew install maven wget
2018-07-29 08:09:30 +08:00
2018-12-14 20:49:37 -08:00
pip install cython==0.29.0
2018-07-29 08:09:30 +08:00
Build Ray
^^^^^^^^^
Then we can start building Ray with the following commands:
::
git clone https://github.com/ray-project/ray.git
cd ray
2019-02-26 23:07:43 -08:00
# Install Bazel.
ci/travis/install-bazel.sh
2018-07-29 08:09:30 +08:00
# build native components
./build.sh -l java
# build java API
cd java
mvn clean install -Dmaven.test.skip
Run tests
^^^^^^^^^
::
# in `ray/java` directory
2018-08-05 23:58:58 -07:00
mvn test