Skip to content

Latest commit

 

History

History
93 lines (63 loc) · 3.27 KB

File metadata and controls

93 lines (63 loc) · 3.27 KB

How to Build from Source

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.

Prerequisites

Before you begin, ensure the following:

Steps to Build

Following options are provided to build the microservice.

Setup in a container using Docker Script

  1. 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
  1. 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: latest

Refer to the environmental variable setup section and configure the required variables.

  1. 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.sh

Note: The script automatically honours REGISTRY_URL, PROJECT_NAME, and TAG (just like setup.sh). Ensure poetry is installed on your host, because it is used to build the wheel.

  1. Verify the configuration.
source ./setup.sh --conf

This will output docker compose configs with all the environment variables resolved. You can verify whether they appear as expected.

  1. 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
  1. Tear down all the services.
source ./setup.sh --down

Validation

  1. Verify Build Success:
    • Check the logs. Look for confirmation messages indicating the microservice started successfully.

Troubleshooting

Supporting Resources