Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 2.87 KB

File metadata and controls

71 lines (48 loc) · 2.87 KB

How to Build from Source

Build the Multimodal Embedding Serving microservice from source to customize, debug, or extend its functionality. In this guide, you will:

  • Set up your development environment.
  • Compile the source code and resolve dependencies.
  • Generate a runnable build for local testing or deployment.

This guide is ideal for developers who want to work directly with the source code.

Prerequisites

Before you begin, ensure the following:

Steps to Build

This section provides a detailed note on how to build the Multimodal Embedding Serving microservice.

(Optional) Docker Compose builds the Multimodal Embedding Serving with a default image and tag name. If you want to use a different image and tag, export these variables:

export REGISTRY_URL="your-container-registry-url"
export PROJECT_NAME="your-project-name"
export TAG="your-tag"

NOTE: PROJECT_NAME will be suffixed to REGISTRY_URL to create a namespaced url. Final image name will be created/pulled by further suffixing the application name and tag with the namespaced url.

EXAMPLE: If variables are set using above command, the final image names for Multimodal Embedding Serving would be <your-container-registry-url>/<your-project-name>/multimodal-embedding-serving:<your-tag>.

If variables are not set, in that case, the TAG will have default value as latest. Hence, final image will be multimodal-embedding-serving:latest.

  1. Clone the Repository:
git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries
cd edge-ai-libraries/microservices/multimodal-embedding-service
  1. Set up environment values:

Follow all the instructions provided in the get started document to set up the environment variables.

Note: To build or run with GPU support, set EMBEDDING_DEVICE=GPU before sourcing setup.sh.

  1. Build the Docker image:

To build the Docker image, run the following command:

docker compose -f docker/compose.yaml build
  1. Run the service:
docker compose -f docker/compose.yaml  up

This will run the service in either CPU or GPU mode depending on your environment variable settings.

Validation

Verify Build Success:

  • Check the logs. Look for confirmation messages indicating the microservice started successfully.

Supporting Resources