milvus-logo

November 19, 2021by JiBin

Run Milvus 2.0 on Windows

  • engineering

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:

Compile from source code

Prerequisites

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 git@github.com: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
$ scripts/install_deps_msys.sh

2. Compile Milvus

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 milvus.exe, including minio.exe and etcd.exe.

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

Double-click the run_minio.bat file to start a MinIO service with default configurations. Data will be stored in the subdirectory s3data.

3. Start an etcd service

Double-click the run_etcd.bat file to start an etcd service with default configurations.

4. Start Milvus service

Double-click the run_milvus.bat file to start the Milvus service.

Step 2. Run hello_milvus.py

After starting the Milvus service, you can test by running hello_milvus.py. See Hello Milvus for more information.

Engage with our open-source community:

  • Find or contribute to Milvus on GitHub.
  • Interact with the community via Forum.
  • Connect with us on Twitter.

Keep Reading