Build the VDMS-DataPrep 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:
Following options are provided to build the microservice.
- Clone the repository and change to project directory:
# Clone the latest on mainline
git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries
# Alternatively, Clone a specific release branch
git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries -b <release-tag>
cd edge-ai-libraries/microservices/visual-data-preparation-for-retrieval/vdms- Set the required environment variables:
# OPTIONAL - If you want to push the built images to a remote container registry, you need to name the images accordingly. For this, image name should include the registry URL as well. To do this, set the following environment variable from shell. Please note that this URL will be prefixed to the application name and tag to form the final image name.
export REGISTRY_URL=<your-registry-url>
export TAG=<your-yag> # Default: latestRefer to the environmental variable setup section and configure the required variables.
- Build the VDMS DataPrep Docker image. This step also compiles the multimodal embedding serving wheel and stages it under
wheels/so the Docker build can succeed.
./build.shNote: The script automatically honours
REGISTRY_URL,PROJECT_NAME, andTAG(just likesetup.sh). Ensurepoetryis installed on your host, because it is used to build the wheel.
- Verify the configuration.
source ./setup.sh --confThis will output docker compose configs with all the environment variables resolved. You can verify whether they appear as expected.
- Spin up the services. Please go through different ways to spin up the services.
# Run the development environment in daemon mode
source ./setup.sh --dev
# Run the development environment in non-daemon mode
source ./setup.sh --dev --nd
# Run the production environment in daemon mode
source ./setup.sh
# Run the production environment in non-daemon mode
source ./setup.sh --nd- Tear down all the services.
source ./setup.sh --down- Verify Build Success:
- Check the logs. Look for confirmation messages indicating the microservice started successfully.