Configure Milvus with Docker Compose
This topic describes how to configure Milvus components and its third-party dependencies with Docker Compose.
Download a configuration file
Download milvus.yaml
directly or with the following command.
$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.3.0-beta/configs/milvus.yaml
Modify the configuration file
Configure your Milvus instance to suit your application scenarios by adjusting corresponding parameters in milvus.yaml
.
Check the following links for more information about each parameter.
Sorted by:
Dependencies | Components |
---|---|
Download an installation file
Download the installation file for Milvus standalone or cluster, and save it as docker-compose.yml
.
If you want to install Milvus with GPU support, download the installation file for Milvus standalone or cluster, and save it as docker-compose.yml
.
You can also simply run the following command.
# For Milvus standalone
# With CPU-only support
$ wget https://github.com/milvus-io/milvus/releases/download/v2.3.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
# With GPU support
$ wget https://github.com/milvus-io/milvus/releases/download/v2.3.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
# For Milvus cluster
# With CPU-only support
$ wget https://github.com/milvus-io/milvus/releases/download/v2.3.0-beta/milvus-cluster-docker-compose.yml -O docker-compose.yml
# With GPU support
wget https://github.com/milvus-io/milvus/releases/download/v2.3.0-beta/milvus-cluster-docker-compose-gpu.yml -O docker-compose.yml
To use Milvus with GPU support, ensure that
- Docker Compose version is v1.28.0 or later.
- NVIDIA Tesla driver version is 450.80.02 or later.
- NVIDIA GTX driver version is 510.47.03 or later.
- NVIDIA Container Toolkit has been installed. For details, refer to Setting up NVIDIA Container Toolkit.
Modify the installation file
In docker-compose.yml
, add a volumes
section under each Milvus component, i.e. RootCoord, DataCoord, DataNode, QueryCoord, QueryNode, IndexCoord, IndexNode, and Proxy.
Map the local path to your milvus.yaml
file onto the corresponding docker container paths to the configuration files /milvus/configs/milvus.yaml
under all volumes
sections.
...
proxy:
container_name: milvus-proxy
# Change this to "milvusdb/milvus:v2.3.0-beta
# if you prefer to use Milvus without GPU support"
image: milvusdb/milvus:v2.3.0-gpu-beta
command: ["milvus", "run", "proxy"]
volumes: # Add a volumes section.
- /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml # Map the local path to the container path
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
PULSAR_ADDRESS: pulsar://pulsar:6650
ports:
- "19530:19530"
...
/volumes
folder according to the default configuration in docker-compose.yml
. To change the folder to store data, edit docker-compose.yml
or run $ export DOCKER_VOLUME_DIRECTORY=
.
Start Milvus
Having finished modifying the configuration file and installation file, you can then start Milvus.
$ sudo docker-compose up -d
What's next
- Learn how to manage the following Milvus dependencies with Docker Compose or Helm: