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
git clone https://github.com/combust/mleap.git
cd mleap
Initialize Git Submodules
MLeap depends on a git submodule for all of the protobuf definitions, sowe need to initialize and update them.
git submodule init
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.
sbt compile
Run the Tests
MLeap has exensive testing, including full parity tests between MLeapand Spark transformers.
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.
Build Tensorflow MLeap Module
sbt mleap-tensorflow/compile
Run Tensorflow Integration Tests
TENSORFLOW_JNI=/path/to/tensorflow/library/folder/java sbt mleap-tensorflow/test