Building a Custom ML Service Image

In order to use Python libraries that are not included in the default ML service image, you will need to build a custom image that includes commands to install these additional libraries.

Prerequisites

  • Docker installed in a local build machine

  • Docker Hub account with read access to official Lucidworks Fusion images

  • Write access to a Docker registry to publish your custom image

How to create a custom ML service image

  1. Create a Dockerfile based on this template:

    FROM lucidworks/fusion-ml-python-image:5.0
    
    USER root
    
    \# Add any additional commands here, i.e. pip install gensim
    
    USER 8764
  2. Log into Docker Hub with your credentials:

    docker login
  3. Build the image:

    docker build -t my-org/fusion-ml-python-image .
  4. Publish the image to Docker Hub or your internal Docker registry.