# Installation

Metarank is available as a Docker and JAR packages for MacOS, Windows and Linux.

## Docker image

Metarank docker images are published on DockerHub as [metarank/metarank](https://hub.docker.com/r/metarank/metarank):

* official Metarank images are multi-arch and support both amd64 and arm64/v8 (so will natively work on Mac M1/M2 without emulation).
* `latest` tag may point to pre-release versions, use an exact pinned version for stability.
* on Mac M1 you can use x86\_64 docker images, or try running the JAR file directly.

To start using metarank with docker, just run:

```bash
docker run metarank/metarank:0.7.9 --help
```

## JAR File

Metarank is a JVM application and also available as a JAR application on [Releases](https://github.com/metarank/metarank/releases) page. As it bundles a couple of native libraries (interfaces to [LightGBM](https://github.com/metarank/lightgbm4j) and [XGBoost](https://github.com/metarank/xgboost-java)), it supports the following platforms and operating systems:

* Linux: x86\_64/AArch64, JVM 11+
* Windows: x86\_64, Windows 10+, JVM 11+
* MacOS: x86\_64/AArch64, MacOS 11+, JVM 11+

To start metarank JAR file, just run:

```bash
java -jar metarank.jar --help
```

### Java

To run JVM applications, you need the JVM itself. If you have no JRE/JDK installed, check out the [Eclipse Temurin JDK](https://adoptium.net/installation/) tutorials for different operating systems.

Metarank is tested on JDK 11 and 17, but will probably work on 18+. JDK 8, 9, 10 are not supported.

### Installing on MacOS

Metarank JAR app requires a [libomp](https://formulae.brew.sh/formula/libomp) to be installed:

```bash
brew install libomp
```

Without libomp you may encounter a strange UnsatisfiedLinkError while training the model:

```
15:32:03.936 INFO  ai.metarank.main.command.Train$ - training model for train=7067 test=1706
Loading native lib osx/x86_64/lib_lightgbm.dylib
Extracting native lib /var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm.dylib
Copied 3775632 bytes
Extracted file: exists=true path=/var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm.dylib
Cannot load library: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm.dylib cause: Can't load library: /var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm.dylib
Loading native lib osx/x86_64/lib_lightgbm_swig.dylib
Extracting native lib /var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm_swig.dylib
Copied 89308 bytes
Extracted file: exists=true path=/var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm_swig.dylib
Cannot load library: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm_swig.dylib cause: Can't load library: /var/folders/nl/2p5w70jj5_50ztn25q2xll380000gn/T/lib_lightgbm_swig.dylib
Exception in thread "io-compute-1" java.lang.UnsatisfiedLinkError: 'long com.microsoft.ml.lightgbm.lightgbmlibJNI.new_voidpp()'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.metarank.ai/reference/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
