November 19, 2021 by JiBin
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 is originally written by @matrixji.
There are two ways to run Milvus 2.0 on Windows:
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.
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 email@example.com:matrixji/milvus.git -b windows-dev
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 $ scripts/install_deps_msys.sh
Run the following command to compile and package Milvus.
$ make $ 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.
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.
Unzip the package, and you will find a
milvus directory, which contains all the files required.
run_minio.bat file to start a MinIO service with default configurations. Data will be stored in the subdirectory
run_etcd.bat file to start an etcd service with default configurations.
run_milvus.bat file to start the Milvus service.
After starting the Milvus service, you can test by running
hello_milvus.py . See Hello Milvus for more information.