Build from source using Maven
Dependencies and requirements
Warning
CatBoost uses CMake-based build process since this commit. Previously Ya Make
(Yandex's build system) had been used.
Select the appropriate build environment setup below accordingly.
-
Linux or macOS. Windows support in progress.
-
Set up build environment depending on build type:
-
Python. 3.6+
-
Maven 3.3.9+
-
JDK 8. Newer versions of JDK are not supported yet.
Set
JAVA_HOME
environment variable to point to the path of JDK installation -
[Only for Ya Make] SWIG 4.0.2+
Cmake-based build uses SWIG from Conan packages so an explicit installation is not required.
Building steps
-
Clone the repository:
git clone https://github.com/catboost/catboost.git
-
Go to the
catboost/catboost/spark/catboost4j-spark
directory from the local copy of the CatBoost repository. -
Run
python ./generate_projects/generate.py
to generate Maven projects for all supported Spark and Scala versions combinations. -
Go to the sub-directories
./projects/spark_<spark_compat_version>_<scala_compat_version>
forspark_compat_version
andscala_compat_version
you are interested in. -
Use the usual maven build phases in these directories.