Introduce and Install Milvus and MinIO and Attu
Let's install Milvus and MinIO and Attu.
Introuduce Milvus
According to the DB-Engines Ranking website, various VectorDBs exist, including Milvus, Pinecone, and Chroma. Since I have to use a VectorDB going forward, I was uncertain about which DBMS to choose, but ultimately I selected Milvus because it ranks highest among the open-source VectorDB options. (Honestly, I wanted to use Pinecone, but I was discouraged after learning it’s a paid service…)
Functionally, Milvus offers various advantages such as high performance, scalability, diverse indexing algorithm support, easy-to-use APIs (REST API), and optimization for cloud and container environments. Honestly, there are many aspects I’m not entirely familiar with yet. As an engineer, I plan to approach it primarily from a practical usage perspective. For further details, refer to Milvus Home.
- DB-Engines Ranking of Vector DBMS(Source: DB-Engines Ranking, update 2nd : 20250309)
Rank | DBMS | Database Model | Score | ||||
---|---|---|---|---|---|---|---|
Mar 2025 | Feb 2025 | Mar 2024 | - | - | Mar 2025 | Feb 2025 | Mar 2024 |
1. | 1. | 1. | Elasticsearch | Multi-model ![]() | 131.38 | -3.25 | -3.41 |
2. | 2. | 2. | Couchbase | Multi-model ![]() | 15.05 | -0.58 | -4.11 |
3. | 3. | 3. | Kdb | Multi-model ![]() | 7.10 | +0.31 | -0.59 |
4. | 4. | 4. | Aerospike | Multi-model ![]() | 5.22 | +0.12 | -1.30 |
5. | 5. | ![]() | Pinecone | Vector | 3.17 | +0.22 | -0.16 |
6. | 6. | ![]() | Milvus | Vector | 2.77 | +0.00 | +1.07 |
7. | 7. | ![]() | DolphinDB | Multi-model ![]() | 2.29 | -0.09 | -1.85 |
8. | 8. | ![]() | Qdrant | Vector | 2.03 | +0.10 | +0.78 |
9. | 9. | ![]() | Chroma | Vector | 1.89 | +0.04 | -0.39 |
10. | 10. | ![]() | Weaviate | Vector | 1.58 | -0.07 | -0.42 |
11. | 11. | 11. | Meilisearch | Multi-model ![]() | 1.20 | +0.07 | -0.13 |
Milvus Architecture(Source: Milvus Architecture)
Install Milvus and MinIO and Attu
The Milvus GitHub Releases page is where you can check and download the official release versions of Milvus. Here, you can find both the latest and previous versions of Milvus. It provides a docker-compose-gpu.yml
file, which includes not only Milvus Standalone but also the installation of etcd and MinIO. The reason for installing etcd
and MinIO
together seems to be related to Milvus’s architecture. Looking at the Milvus architecture, the Standalone mode runs as a single instance, but internally, it still requires metadata management (etcd) and object storage (MinIO).
The entire process to Install Milvus on Ubuntu
As mentioned earlier, you can check and download the official release versions of Milvus from the Milvus GitHub Releases page. Since my setup includes GPU support(My NVIDIA Container Toolkit Setup), I downloaded the docker-compose-gpu.yml
file and modified it to fit my needs. The changes have also been documented. In particular, I have added Docker volume management and Attu, a tool for managing Milvus. Please take note of these modifications. The entire process is as follows.
wget https://github.com/milvus-io/milvus/releases/download/v2.5.4/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
vi docker-compose.yml(adding attu and modifying named_volume, restart)
docker compose -p ds2man up -d
docker compose -p ds2man ps -a
docker compose -p ds2man down --volumes
ordocker compose -p ds2man down
Step1) Get Docker Compose File
wget https://github.com/milvus-io/milvus/releases/download/v2.5.4/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# To use `docker compose up -d`, make sure to name the file `docker-compose.yml` instead of `docker-compose-gpu.yml`, otherwise it won't execute properly!
(base) jaoneol@DESKTOP-B7GM3C5:~$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.4/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
--2025-02-18 00:49:13-- https://github.com/milvus-io/milvus/releases/download/v2.5.4/milvus-standalone-docker-compose-gpu.yml
Resolving github.com (github.com)... 20.200.245.247
Connecting to github.com (github.com)|20.200.245.247|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/208728772/3ea6d6f2-5847-4c4a-b2f6-c9258911248e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250217T154914Z&X-Amz-Expires=300&X-Amz-Signature=8c3e71c0b84213986e19efff6817e9aeedb6e3b07d555350f5d1a14ae4586c99&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dmilvus-standalone-docker-compose-gpu.yml&response-content-type=application%2Foctet-stream [following]
--2025-02-18 00:49:14-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/208728772/3ea6d6f2-5847-4c4a-b2f6-c9258911248e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250217T154914Z&X-Amz-Expires=300&X-Amz-Signature=8c3e71c0b84213986e19efff6817e9aeedb6e3b07d555350f5d1a14ae4586c99&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dmilvus-standalone-docker-compose-gpu.yml&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1774 (1.7K) [application/octet-stream]
Saving to: ‘docker-compose.yml’
docker-compose.yml 100%[====================================================================================================>] 1.73K --.-KB/s in 0s
2025-02-18 00:49:14 (7.14 MB/s) - ‘docker-compose.yml’ saved [1774/1774]
(base) jaoneol@DESKTOP-B7GM3C5:~$ ls
docker-compose.yml miniconda3
Step2) Modify Docker Compose File
vi docker-compose.yml(adding attu and modifying named_volume, restart)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# In `docker-compose.yml`, the Bind Mount method was used, but I will change it to a Named Volume so that it can be managed by Docker Volume.
(base) jaoneol@DESKTOP-B7GM3C5:~$ vi docker-compose.yml
services:
etcd:
container_name: milvus-etcd
image: quay.io/coreos/etcd:v3.5.16
restart: always # Adding restart option on docker-compose.yml
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
volumes:
# Bind Mount Usage
# You need to add `DOCKER_VOLUME_DIRECTORY=/var/lib/docker` to the .env file.
# - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd
# Named volume Usage
- etcd:/etcd
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 30s
timeout: 20s
retries: 3
minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
restart: always # Adding restart option on docker-compose.yml
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
ports:
- "9001:9001"
- "9000:9000"
volumes:
# Bind Mount Usage
# You need to add `DOCKER_VOLUME_DIRECTORY=/var/lib/docker` to the .env file.
# - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
# Named volume Usage
- minio:/minio_data
# During testing, there is a mount for MinIO's internal configuration storage.
# Explicitly specify all related directories to prevent MinIO from automatically creating anonymous volumes.
# {
# "Type": "volume",
# "Name": "2b202e0a21487176e2cb0994c61de329d2266b2b2948bd148015da16579ea5e5",
# "Source": "/var/lib/docker/volumes/2b202e0a21487176e2cb0994c61de329d2266b2b2948bd148015da16579ea5e5/_data",
# "Destination": "/data",
# "Driver": "local",
# "Mode": "",
# "RW": true,
# "Propagation": ""
# }
- minio-anonymous:/data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.5.4-gpu
restart: always # Adding restart option on docker-compose.yml
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
volumes:
# Bind Mount Usage
# You need to add `DOCKER_VOLUME_DIRECTORY=/var/lib/docker` to the .env file.
# - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
# Named volume Usage
- milvus:/var/lib/milvus
ports:
- "19530:19530"
- "9091:9091"
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: ["gpu"]
device_ids: ["0"]
depends_on:
- "etcd"
- "minio"
# Adding attu on docker-compose.yml
attu:
container_name: attu
image: zilliz/attu:v2.4.7
restart: always # Adding restart option on docker-compose.yml
environment:
MILVUS_URL: milvus-standalone:19530
ports:
- "8000:3000"
depends_on:
- "standalone"
# To use a Named Volume, you must explicitly specify the volume.
volumes:
milvus:
etcd:
minio:
minio-anonymous:
networks:
default:
name: milvus
Step3) Run the Containers
docker compose -p ds2man up -d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# When running `docker compose up -d`, the volume is created with the account name attached.
# Use the `-p` option to attach it with the project name instead.
# `docker compose up -d` → `docker compose -p ds2man up -d`
# DRIVER VOLUME NAME
# local jaoneol_etcd → ds2man_etcd
# local jaoneol_milvus → ds2man_milvus
# local jaoneol_minio → ds2man_minio
# local jaoneol_minio-anonymous → ds2man_minio-anonymous
(base) jaoneol@DESKTOP-B7GM3C5:~$ sudo docker compose -p ds2man up -d
[sudo] password for jaoneol:
[+] Running 53/53
✔ attu Pulled 13.7s
✔ minio Pulled 8.2s
✔ etcd Pulled 64.4s
✔ standalone Pulled 89.1s
[+] Running 9/9
✔ Network milvus Created 0.1s
✔ Volume "ds2man_milvus" Created 0.0s
✔ Volume "ds2man_etcd" Created 0.0s
✔ Volume "ds2man_minio" Created 0.0s
✔ Volume "ds2man_minio-anonymous" Created 0.0s
✔ Container milvus-minio Started 7.7s
✔ Container milvus-etcd Started 7.7s
✔ Container milvus-standalone Started 1.1s
✔ Container attu Started 1.5s
(base) jaoneol@DESKTOP-B7GM3C5:~$
Step4) Check if the container is running properly
docker compose -p ds2man ps -a
docker volume ls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Since `docker compose -p ds2man up -d` was executed, you can check it using `docker compose -p ds2man ps -a`.
# Note that it will not be visible with `docker compose ps -a`, so keep that in mind.
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker compose ps -a
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker compose -p ds2man ps -a
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
attu zilliz/attu:v2.4.7 "docker-entrypoint.s…" attu 6 minutes ago Up 6 minutes 0.0.0.0:8000->3000/tcp, [::]:8000->3000/tcp
milvus-etcd quay.io/coreos/etcd:v3.5.16 "etcd -advertise-cli…" etcd 6 minutes ago Up 6 minutes (healthy) 2379-2380/tcp
milvus-minio minio/minio:RELEASE.2023-03-20T20-16-18Z "/usr/bin/docker-ent…" minio 6 minutes ago Up 6 minutes (healthy) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp
milvus-standalone milvusdb/milvus:v2.5.4-gpu "/tini -- milvus run…" standalone 6 minutes ago Up 6 minutes 0.0.0.0:9091->9091/tcp, :::9091->9091/tcp, 0.0.0.0:19530->19530/tcp, :::19530->19530/tcp
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
682e142fe7ea zilliz/attu:v2.4.7 "docker-entrypoint.s…" 7 minutes ago Up 7 minutes 0.0.0.0:8000->3000/tcp, [::]:8000->3000/tcp attu
0e3d9c812be2 milvusdb/milvus:v2.5.4-gpu "/tini -- milvus run…" 7 minutes ago Up 7 minutes 0.0.0.0:9091->9091/tcp, :::9091->9091/tcp, 0.0.0.0:19530->19530/tcp, :::19530->19530/tcp milvus-standalone
88079d4db07f minio/minio:RELEASE.2023-03-20T20-16-18Z "/usr/bin/docker-ent…" 7 minutes ago Up 7 minutes (healthy) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp milvus-minio
c6a22a7dcaa3 quay.io/coreos/etcd:v3.5.16 "etcd -advertise-cli…" 7 minutes ago Up 7 minutes (healthy) 2379-2380/tcp milvus-etcd
cbd7bed0cee5 mysql:latest "docker-entrypoint.s…" 26 minutes ago Up 26 minutes 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp mysql
# The result of `docker volume ls` matches the previously mentioned details.
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker volume ls
DRIVER VOLUME NAME
local ds2man_etcd
local ds2man_milvus
local ds2man_minio
local ds2man_minio-anonymous
local mysql
(base) jaoneol@DESKTOP-B7GM3C5:~$ su
Password:
(base) root@DESKTOP-B7GM3C5:~$ su
Password:
root@DESKTOP-B7GM3C5:/home/jaoneol# cd /var/lib/docker/volumes
root@DESKTOP-B7GM3C5:/var/lib/docker/volumes# ls -lrt
total 48
brw------- 1 root root 8, 32 Feb 18 00:39 backingFsBlockDev
drwx-----x 3 root root 4096 Feb 18 00:41 mysql
drwx-----x 3 root root 4096 Feb 18 01:02 ds2man_minio
drwx-----x 3 root root 4096 Feb 18 01:02 ds2man_milvus
drwx-----x 3 root root 4096 Feb 18 01:02 ds2man_etcd
-rw------- 1 root root 32768 Feb 18 01:02 metadata.db
drwx-----x 3 root root 4096 Feb 18 01:02 ds2man_minio-anonymous
root@DESKTOP-B7GM3C5:/var/lib/docker/volumes#
Step5) Stop and Start the container
docker compose -p ds2man stop
docker compose -p ds2man start
docker compose -p ds2man ps -a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Since `docker compose -p ds2man up -d` was executed, you can check it using `docker compose -p ds2man stop` and `docker compose -p ds2man start`.
# Note that it will not stop with `docker compose stop`, so keep that in mind.
# Note that it will not start with `docker compose start`, so keep that in mind.
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker compose -p ds2man stop
[+] Stopping 4/4
✔ Container attu Stopped 0.4s
✔ Container milvus-standalone Stopped 1.4s
✔ Container milvus-minio Stopped 1.0s
✔ Container milvus-etcd Stopped 0.4s
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker compose -p ds2man ps -a
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
attu zilliz/attu:v2.4.7 "docker-entrypoint.s…" attu 5 minutes ago Exited (1) 22 seconds ago
milvus-etcd quay.io/coreos/etcd:v3.5.16 "etcd -advertise-cli…" etcd 5 minutes ago Exited (0) 20 seconds ago
milvus-minio minio/minio:RELEASE.2023-03-20T20-16-18Z "/usr/bin/docker-ent…" minio 5 minutes ago Exited (0) 20 seconds ago
milvus-standalone milvusdb/milvus:v2.5.4-gpu "/tini -- milvus run…" standalone 5 minutes ago Exited (0) 21 seconds ago
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker compose -p ds2man start
[+] Running 4/4
✔ Container milvus-minio Started 0.4s
✔ Container milvus-etcd Started 0.3s
✔ Container milvus-standalone Started 0.4s
✔ Container attu Started 0.3s
(base) jaoneol@DESKTOP-B7GM3C5:~$ docker compose -p ds2man ps -a
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
attu zilliz/attu:v2.4.7 "docker-entrypoint.s…" attu 9 minutes ago Up 5 seconds 0.0.0.0:8000->3000/tcp, [::]:8000->3000/tcp
milvus-etcd quay.io/coreos/etcd:v3.5.16 "etcd -advertise-cli…" etcd 9 minutes ago Up 6 seconds (health: starting) 2379-2380/tcp
milvus-minio minio/minio:RELEASE.2023-03-20T20-16-18Z "/usr/bin/docker-ent…" minio 9 minutes ago Up 6 seconds (health: starting) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp
milvus-standalone milvusdb/milvus:v2.5.4-gpu "/tini -- milvus run…" standalone 9 minutes ago Up 6 seconds 0.0.0.0:9091->9091/tcp, :::9091->9091/tcp, 0.0.0.0:19530->19530/tcp, :::19530->19530/tcp
(base) jaoneol@DESKTOP-B7GM3C5:~$
Step4) Delete the container
docker compose -p ds2man down --volumes
ordocker compose -p ds2man down
docker volume ls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Since `docker compose -p ds2man up -d` was executed, you can check it using `docker compose -p ds2man down --volumes`.
# Note that it will not delete with `docker compose down --volumes`, so keep that in mind.
(base) jaoneol@DESKTOP-B7GM3C5:~/milvus_files$ docker compose -p ds2man down --volumes
[+] Running 9/9
✔ Container attu Removed 0.3s
✔ Container milvus-standalone Removed 1.5s
✔ Container milvus-etcd Removed 1.8s
✔ Container milvus-minio Removed 1.9s
✔ Volume ds2man_minio-anonymous Removed 0.0s
✔ Volume ds2man_milvus Removed 0.0s
✔ Volume ds2man_etcd Removed 0.0s
✔ Volume ds2man_minio Removed 0.0s
✔ Network milvus Removed 0.4s
(base) jaoneol@DESKTOP-B7GM3C5:~/milvus_files$ docker volume ls
DRIVER VOLUME NAME
local mysql
(base) jaoneol@DESKTOP-B7GM3C5:~/milvus_files$
Use Attu
After installing Milvus, it can be verified through the CLI. However, since many aspects require visual confirmation, I have added Attu, an efficient open-source management tool for Milvus, to the docker-compose.yml
file. By using Attu, you can manage Milvus more easily and visually manipulate collections, indexes, and other database components. Here is a screenshot of the process up to the creation of collections and indexes using Attu.