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.
Before you begin, ensure the following:
- System Requirements: Verify your system meets the minimum requirements.
- This guide assumes basic familiarity with Git commands, Python virtual environments, and terminal usage. If you are new to these concepts, see:
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_NAMEwill be suffixed toREGISTRY_URLto 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.
- 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- 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.
- Build the Docker image:
To build the Docker image, run the following command:
docker compose -f docker/compose.yaml build- Run the service:
docker compose -f docker/compose.yaml upThis will run the service in either CPU or GPU mode depending on your environment variable settings.
Verify Build Success:
- Check the logs. Look for confirmation messages indicating the microservice started successfully.