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, macOS or Windows.

  • Set up build environment depending on build type:

  • Python. 3.6+

  • Maven 3.3.9+

  • JDK 8+

    Set JAVA_HOME environment variable to point to the path of JDK installation

Building steps

  1. Clone the repository:

    git clone https://github.com/catboost/catboost.git
    
  2. Go to the catboost/catboost/jvm-packages/catboost4j-prediction directory from the local copy of the CatBoost repository.

  3. Use the usual maven build phases in this directory.

    Additional flags for building native dynamic library part can specified using buildNative.extraArgs definition.
    Supported flags are:

    • --build-system=<build_system>. Supported values are CMAKE (default), YA.
    • --build-type=<build_type>. Supported values are Release (default), Debug.
    • --have-cuda. Add to enable CUDA support.
      Example running tests with this definition:
    mvn test -DbuildNative.extraArgs="--build-type=Debug"
    
Previous