As a popular vector database, we can use Milvus to build various AI applications such as speech recognition, natural language process, recommendation systems, and more.
This is because unlike the relational databases, a vector database such as Milvus is designed from the ground up to handle the unstructured data, index it, and build patterns from the provided data.
In this tutorial, we will learn how to start with the Milvus vector database by installing it on the Ubuntu system.
Requirements:
To follow along with this tutorial, ensure that you have the following:
- Ubuntu 20.04 and higher
- Docker 19.03 and above
- Docker Compose 1.25.1 and later
We can learn how to configure Milvus on the Ubuntu system with the given requirements.
NOTE: This tutorial demonstrates how to install Milvus on Ubuntu using the Ubuntu version 23.04.
Install the Milvus Standalone Using the Docker Compose
The first step is to download the Docker Compose YAML file to configure Milvus. Then, you can run the “wget” command as follows:
This command should download the Milvus docker-compose file which allows you to configure the Docker container to your needs.
Run the Milvus Container
Once you downloaded the YAML file, run the docker-compose command in the same directory as the Milvus YAML file.
The command is as follows:
The previous command should create, start, and detach the services that are specified in the Docker Compose file by running them in the background.
You can open the YAML file with your editor and make any changes to the file before running the previous command. However, you can use the default configuration to get a standard Milvus server running.
Once completed, you can check if the container is running using the following command:
Once the Milvus standalone starts, three Docker containers will be running, including the Milvus standalone service and its two dependencies.
To stop the containers, run the following command:
This should stop the Milvus containers and its associated services.
Install Milvus with APT
We can also install Milvus using the APT package manager. We can also do this using the Ubuntu Launchpad and Deb packages.
Run the following commands as follows:
Next, add the PPA repository:
Then, update the packages:
Finally, install Milvus:
Install Milvus with Deb Packages
If you don’t wish to use the Launchpad and PPA packages, you can download the “.deb” package installer as shown in the following commands:
Update the software repositories:
Finally, run the “dpkg” command to install Milvus as shown in the following:
$ sudo apt-get -f install
Once completed, you should have the Milvus server installed and ready to go on your Ubuntu system.
Conclusion
In this tutorial, we explored how to setup a standalone Milvus server on Ubuntu using Docker, Launchpad, and APT. Stay tuned for more Milvus tutorials.