This documentation is for an unreleased version of Apache Flink Machine Learning Library. We recommend you use the latest stable version.
Building Flink ML from Source #
This page covers how to build Flink ML from sources.
Build Flink ML Java SDK #
In addition, you need Maven 3 and a JDK (Java Development Kit). Flink ML requires at least Java 8 to build.
To clone from git, enter:
git clone https://github.com/apache/flink-ml.git
The simplest way of building Flink ML is by running:
mvn clean install -DskipTests
This instructs Maven (
mvn) to first remove all
existing builds (
clean) and then create a new Flink binary (
After the build finishes, you can acquire the build result in the following path from the root directory of Flink ML:
Build Flink ML Python SDK #
Building Flink ML Java SDK
If you want to build Flink ML’s Python SDK that can be used for pip installation, you must first build the Java SDK, as described in the section above.
Python version(3.6, 3.7, or 3.8) is required
$ python --version # the version printed here must be 3.6, 3.7 or 3.8
Install the dependencies with the following command:
$ python -m pip install -r flink-ml-python/dev/dev-requirements.txt
Then go to the root directory of Flink ML source code and run this command to
build the sdist package of
cd flink-ml-python; python setup.py sdist; cd ..;
The sdist package of
apache-flink-ml will be found under
./flink-ml-python/dist/. It could be installed as follows:
python -m pip install flink-ml-python/dist/*.tar.gz