Milvus Server Docker Installation and Packaging Dependencies
Milvus is a popular open-source vector database with significant traction in the Generative AI and RAG (Retrieval Augmented Generation) use cases. As an organization, you may be considering integrating Milvus into your technology stack, and it's important to understand the key dependencies and requirements.
Milvus offers flexible deployment options for its server:
Local: Run Milvus as a single Docker container on your machine. For large-scale needs, deploy Milvus across a Kubernetes cluster.
Cloud (Zilliz): Zilliz offers Milvus as a managed cloud service on AWS, GCP, or Azure, providing additional advanced features and hassle-free experience.
The rest of this blog will be about installing Milvus locally. Please note that this is for Milvus version 2.4 and above.
Dependency Overview
Assuming a clean installation, the main dependencies for Milvus standalone server include:
FAISS: A library for efficient similarity search and clustering of dense vectors.
etcd: A distributed key-value store used to store Milvus metadata.
Pulsar/Kafka: A distributed pub-sub messaging system for handling real-time data ingestion, processing, and communication between components.
Tantivy: A full-text search engine library written in Rust for text-based search capabilities.
RocksDB: A persistent storage engine.
Minio/S3/GCS/Azure Blob Storage: Compatibility with various object storage solutions.
Kubernetes: A distributed containerized deployment platform.
StorageClass and Persistent Volumes: Kubernetes resources are used to manage the storage requirements of etcd and Pulsar.
Prometheus and Grafana: Visualization for Milvus monitoring, which allows users to track performance and troubleshoot issues.
Docker Image Size ~500MB
The Docker image size for the Milvus standalone container is around 500MB. You can find the latest releases on the Milvus Docker Hub page at https://hub.docker.com/r/milvusdb/milvus/tags.
Frequency of Updates ~1x per month (many small releases and 1 pinned release per month)
Milvus has a fairly frequent release cycle, with approximately one major release per month. The smaller releases include improvements and bug fixes. There is typically one "pinned" release per month.
We do not recommend using the latest minor release for production. Zilliz cloud is always on the latest stable release, which is typically one version behind the latest. For example, right now the latest version is 2.4, but the latest release we recommend for production is 2.3.x.
SDKs
We offer six SDKs (software development kits) in: Python, Node, Go, C#, Java, Ruby
To install the Python SDK, simply run pip install pymilvus
.
It's important to ensure your chosen SDK and Milvus server versions match in terms of major and minor version numbers. For example, Pymilvus version 2.4.0 is compatible with a local Milvus server version 2.4.0-rc.1-dev. Similarly, Pymilvus version 2.3.6 is compatible with Zilliz version 2.3.x.
Installation
Installing the Milvus standalone Docker is simple. The main thing is to download the latest docker-compose.yml
either from the documentation page or directly from GitHub. I show a wget
command below. You can change the wget
command to whatever version you are using. You’ll also need to have Docker installed.
Below is sample Python code to install and connect.
import pymilvus
from pymilvus import (connections, MilvusClient, utility)
print(f"Pymilvus: {pymilvus.__version__}")
###########################################################################################
# Download the latest .yaml file: https://milvus.io/docs/install_standalone-docker.md
# Or download manually from milvus github:
# !wget https://github.com/milvus-io/milvus/releases/download/v2.4.0-rc.1/milvus-standalone-docker-compose.yml -O docker-compose.yml
############################################################################################
# Start Docker
!docker compose up -d
# Verify which local port the Milvus server is listening on
!docker ps -a #19530/tcp
# Connect to the local server.
connection = connections.connect(
alias="default",
host='localhost', # or '0.0.0.0' or 'localhost'
port='19530'
)
# Print server version.
print(utility.get_server_version())
# Use no-schema Milvus client (flexible json key:value format).
mc = MilvusClient(connections=connection)
# Check if a collection already exists.
collection_name = "movies"
has = utility.has_collection(collection_name)
print(f"Collection '{collection_name}' exists in Milvus?")
print(f"Answer --> {has}!")
# Stop the local Milvus server.
!docker compose down
Summary
These are the key dependencies and release update frequency for deploying the Milvus server on standalone Docker. Understanding these details can help you better plan and prepare for integrating Milvus into your organization's technology stack.
- Dependency Overview
- Docker Image Size ~500MB
- Frequency of Updates ~1x per month (many small releases and 1 pinned release per month)
- SDKs
- Installation
- Summary
Content
Start Free, Scale Easily
Try the fully-managed vector database built for your GenAI applications.
Try Zilliz Cloud for Free