milvus-logo

Install Milvus Standalone with Docker Compose

This topic describes how to install Milvus standalone with Docker Compose.

Prerequisites

  • Check whether Docker and Docker Compose are installed on your machine.

  • Check the requirements for hardware and software requirements before installing Milvus.

    • For the users using MacOS 10.14 or later, set the Docker virtual machine (VM) to use a minimum of 2 virtual CPUs (vCPUs) and 8 GB of initial memory. Otherwise, the installation might fail.

Procedure

To install Milvus standalone with Docker Compose, follow these steps:

Download the YAML file

Download milvus-standalone-docker-compose.yml and save it as docker-compose.yml manually, or with the following command.

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

Start Milvus

In the directory that holds docker-compose.yml, start Milvus by running:

$ sudo docker compose up -d

If you failed to run the above command, please check whether your system has Docker Compose V1 installed. If this is the case, you are advised to migrate to Docker Compose V2 due to the notes on this page.

Creating milvus-etcd  ... done
Creating milvus-minio ... done
Creating milvus-standalone ... done

Verify the Installation

Now check if the containers are up and running.

$ sudo docker compose ps

After Milvus standalone starts, there will be three docker containers running, including the Milvus standalone service and its two dependencies.

      Name                     Command                  State                            Ports
--------------------------------------------------------------------------------------------------------------------
milvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp
milvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
milvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp

Connect to Milvus

Verify which local port the Milvus server is listening on. Replace the container name with your own.

$ docker port milvus-standalone 19530/tcp

Please refer to Hello Milvus, then run the example code.

Stop Milvus

To stop Milvus standalone, run:

sudo docker compose down

To delete data after stopping Milvus, run:

sudo rm -rf  volumes

What's next

Having installed Milvus, you can:

On this page