AI

Install and Configure Milvus on CentOS Using Docker

Milvus is an open-source vector database that is designed for efficient storage, retrieval, and similarity search of high-dimensional vectors. It is built to handle the large-scale vector data which are commonly used in machine learning, data mining, computer vision, and natural language processing applications.

Milvus leverages the concept of embeddings which are numeric representations of data points in a high-dimensional vector space. These embeddings can be generated from various data types such as images, audio, text, or structured or unstructured data.

Before we can use Milvus, we need to ensure that we have it installed and running. In this post, we will cover how we can configure and run Milvus on CentOS using Docker.

Update the System Packages

First, let’s update the system packages to ensure that the latest versions are available. Open a terminal and run the following command:

$ sudo yum update

Install Docker

We deploy a Milvus server using Docker for this tutorial. Let’s start by installing Docker.

Start by configuring the repository:

sudo yum install -y yum-utils

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install the latest Docker version with the following command:

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Once the installation is complete, start the Docker service with the following command:

sudo systemctl start docker

Run the Milvus Container

Once you have Docker configured, download the YAML configuration file to set up the cluster.

wget https://github.com/milvus-io/milvus/releases/download/v2.2.10/milvus-standalone-docker-compose.yml -O docker-compose.yml

Once you have the file downloaded, run the Docker compose command to start the container as follows:

sudo docker-compose up -d

The previous command should use all the configurations that are defined in the YAML file to deploy a standalone Milvus cluster.

You can then connect to the server using the following command:

docker port milvus-standalone 19530/tcp

This command should drop you to the Milvus CLI which allows you to execute the commands on the Milvus sever.

Once done, you can stop the cluster with the following command:

sudo docker-compose down

Conclusion

In this post, we described the steps that you can use to install and configure the Milvus vector database server on CentOS using Docker.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list