Run Milvus 2.0 on Windows
This tutorial introduces how to run Milvus 2.0 on Windows. If you want to get started with Milvus 2.0 using Windows, or simply have to run Milvus on Windows due to environment limits, this tutorial can be a good reference. This article was originally written by @matrixji.
There are two ways to run Milvus 2.0 on Windows:
- Compile from source code
- Install from the binary package
Compile from source code
You need to install MinGW64/MSYS toolchain before compiling Milvus 2.0 on Windows. See MSYS2 for the installation guide. The compilation in this tutorial is completed in the shell of MSYS2 MinGW 64-bit. You can run
$ pacman -Su to update the toolchain.
We also recommend that you run
$ pacman -S git to install git.
Step 1. Clone code
Run the following command to clone the code from the windows-dev branch in the matrixji/milvus repository. Currently, all commits can be traced in windows-dev, which rebases commits from the upstream main branch milvus-io/milvus on a weekly basis.
$ git clone firstname.lastname@example.org:matrixji/milvus.git -b windows-dev
Step 2. Compile Milvus
1. Install dependencies and toolchain
Run the following command to install the required dependencies and toolchain. After the installation, you need to restart the MinGW/MYSY shell to ensure the configurations of some tools are properly applied.
$ cd milvus
2. Compile Milvus
Run the following command to compile and package Milvus.
$ sh scripts/package_windows.sh
If successful, you will find a zip file in the subdirectory of
windows_package. The zip file contains all the files for running
Please note that Milvus 2.0 is developed in Go. You might need to configure Goproxy to install third-party modules.
Install from the binary package
You can also download the binary package that has already been compiled from Releases — matrixji/milvus. Each release has windows-test- as the prefix, for instance, windows-test-v8. Find the release you want and download the corresponding zip package.
Step 1. Start Milvus
1. Unzip the package
Unzip the package, and you will find a
milvus directory, which contains all the files required.
2. Start a MinIO service
run_minio.bat file to start a MinIO service with default configurations. Data will be stored in the subdirectory
3. Start an etcd service
run_etcd.bat file to start an etcd service with default configurations.
4. Start Milvus service
run_milvus.bat file to start the Milvus service.
Step 2. Run
After starting the Milvus service, you can test by running
hello_milvus.py. See Hello Milvus for more information.