Building MLeap From Source

MLeap is hosted on Github as apublic project. Building MLeap is very straightforward and has very fewdependencies. Here are instructions for building from source.

Install SBT

Install Simple Build Tool,which is used to build many Scala projects.

Compiling Core MLeap

The core of MLeap includes every submodule except for Tensorflowintegration. We do not include Tensorflow in the core build because itsdependencies can be difficult to install.

Clone the Github Repository

  1. git clone https://github.com/combust/mleap.git
  2. cd mleap

Initialize Git Submodules

MLeap depends on a git submodule for all of the protobuf definitions, sowe need to initialize and update them.

  1. git submodule init
  2. git submodule update

Compile MLeap

There are many submodules that make up the MLeap project. All of themare aggregated to the root SBT project. This means running a commandfrom SBT will cause the command to be run on all subprojects.

  1. sbt compile

Run the Tests

MLeap has exensive testing, including full parity tests between MLeapand Spark transformers.

  1. sbt test

Compiling Tensorflow Support

Compiling the mleap-tensorflow submodule does not happenautomatically. Instead, we first need to compile Tensorflow and installthe Tensorflow Java jar to our local maven2 repository.

Compile/Install Tensorflow

Tensorflow has a great set of instructions for compiling and installing.

  1. Tensorflow
  2. Tensorflow Java Bindings.

Build Tensorflow MLeap Module

  1. sbt mleap-tensorflow/compile

Run Tensorflow Integration Tests

  1. TENSORFLOW_JNI=/path/to/tensorflow/library/folder/java sbt mleap-tensorflow/test