Metarank Docs
  • Introduction
    • What is Metarank?
    • Quickstart
    • Performance
  • Guides
    • Search
      • Reranking with cross-encoders
  • Reference
    • Installation
    • Event Format
      • Timestamp formats
    • API
    • Command-line options
    • Configuration
      • Feature extractors
        • Counters
        • Date and Time
        • Generic
        • Relevancy
        • Scalars
        • Text
        • User Profile
        • Diversification
      • Recommendations
        • Trending items
        • Similar items
        • Semantic similarity
      • Models
      • Data Sources
      • Persistence
    • Deployment
      • Standalone
      • Docker
      • Kubernetes
      • Prometheus metrics export
      • Custom logging
      • Warmup
    • Integrations
      • Snowplow
  • How-to
    • Automated ML model retraining
    • Automatic feature engineering
    • Running in production
  • Development
    • Changelog
    • Building from source
  • Doc versions
    • 0.7.9 (stable)
    • master (unstable)
Powered by GitBook
On this page
  • Running the docker image
  • Resources
  • Ports

Was this helpful?

Edit on GitHub
  1. Reference
  2. Deployment

Docker

PreviousStandaloneNextKubernetes

Last updated 1 year ago

Was this helpful?

Metarank official image is published in docker hub as .

We publish the :latest tag, although it's not always recommended to have any production deployments without pinning a specific version.

Official docker images are multi-arch, and cross-built for the following platforms:

  • linux/amd64: a regular docker image

  • linux/arm64/v8: docker image which will work natively (so without emulation) on platforms like Mac M1/M2.

Running the docker image

All metarank sub-commands are wrapped into a single command-line API. To see the , run the docker container:

$ docker run metarank/metarank:0.7.9 --help

+ exec /opt/java/openjdk/bin/java -jar /app/metarank.jar --help

                __                              __    
  _____   _____/  |______ ____________    ____ |  | __
 /     \_/ __ \   __\__  \\_  __ \__  \  /    \|  |/ /
|  Y Y  \  ___/|  |  / __ \|  | \// __ \|   |  \    < 
|__|_|  /\___  >__| (____  /__|  (____  /___|  /__|_ \
      \/     \/          \/           \/     \/     \/ ver:0.7.9
Usage: metarank <subcommand> <options>

Resources

Metarank image exposes a /data volume to handle all the local IO. For example, you can pass the input training dataset from your local host using the docker's -v switch:

docker run -v /home/user/input:/data metarank/metarank:latest train <opts>

Memory

Metarank docker container uses 1Gb of JVM heap by default. In practice the actual RSS memory usage is a bit higher than the heap size due to JVM's extra overhead.

This can be configured with the JAVA_OPTS environment variable:

docker run -e JAVA_OPTS="-Xmx5g" metarank/metarank:latest train <opts>

Ports

The image exposes the following ports:

  • 8080 for API access for the inference and ingestion APIs

To map these ports to your host, use the -p flag:

docker run -p 8080:8080 metarank/metarank:latest serve <opts>
metarank/metarank
CLI