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

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

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

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

Unzip the package, and you will find a milvus directory, which contains all the files required.

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

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

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.

--

--

Open-source Vector Database Powering AI Applications. #SimilaritySearch #Embeddings #MachineLearning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Milvus

Open-source Vector Database Powering AI Applications. #SimilaritySearch #Embeddings #MachineLearning