向量数据库 milvus

内容纲要

运行环境

CentOS 8.4

lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 8.4.2105
Release:    8.4.2105
Codename:   n/a

核心数

nproc
2

内存

free -m
              total        used        free      shared  buff/cache   available
Mem:           7952        2075        1057           2        4819        5575
Swap:             0           0           0

安装

参考 docker 安装 milvus

安装文档推荐 4 核 8G,不过我这条件有点困难,强行试下吧

wget https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
--2024-04-30 16:33:00--  https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3317 (3.2K) [text/plain]
Saving to: ‘standalone_embed.sh’

standalone_embed.sh                          100%[==============================================================================================>]   3.24K  15.2KB/s    in 0.2s    

2024-04-30 16:33:06 (15.2 KB/s) - ‘standalone_embed.sh’ saved [3317/3317]
bash standalone_embed.sh start
Unable to find image 'milvusdb/milvus:v2.4.0' locally
v2.4.0: Pulling from milvusdb/milvus
d5fd17ec1767: Pull complete 
8fafcd65de79: Pull complete 
38e317c5074b: Pull complete 
7c22d9a9c67f: Pull complete 
661c3de6f510: Pull complete 
1f27396f6efc: Pull complete 
fe556ec02776: Pull complete 
4f4fb700ef54: Pull complete 
Digest: sha256:9500220e24ba8948cfd7d4273aa2432b3321acaf30dfd698ff1bd53d93fcb74b
Status: Downloaded newer image for milvusdb/milvus:v2.4.0
Wait for Milvus Starting...
Start successfully.

看上去启动成功了

python sdk

python sdk

pip3 install protobuf==3.20.0
pip3 install grpcio-tools
python3 -m pip install pymilvus==2.4.0

验证:执行以下命令,不报错就表示 sdk 安装成功

python3 -c "from pymilvus import Collection"

命令行工具 Milvus_CLI

pip install milvus-cli

验证

milvus_cli --version
Milvus_CLI v0.4.2

Milvus_CLI 参考

Milvus_CLI Command Reference

图形界面 attu

图形界面 Attu

docker run -p 8000:3000 -e MILVUS_URL=127.0.0.1:19530 zilliz/attu:v2.3.10
Unable to find image 'zilliz/attu:v2.3.10' locally
v2.3.10: Pulling from zilliz/attu
8a1e25ce7c4f: Pull complete 
503fbb4f74df: Pull complete 
f22ebab8fc9f: Pull complete 
737c1dca3024: Pull complete 
26417687e75d: Pull complete 
b097e5f1c4d9: Pull complete 
4d14245a5d3f: Pull complete 
674bc9262697: Pull complete 
02625ac0d659: Pull complete 
647f5d2d7ca1: Pull complete 
1ee12f46f98e: Pull complete 
f8f765cdbef0: Pull complete 
3bb883e6819e: Pull complete 
Digest: sha256:f7fc050c7a47bb7b0d3c330c4369aa8a134c3f6d3478ec43f9e75e78ea1e6616
Status: Downloaded newer image for zilliz/attu:v2.3.10
yarn run v1.22.19
$ node dist/src/app.js
Attu server started: http://172.17.0.3:3000

在浏览器访问 http://host:8000
注意:将 127.0.0.1 替换为你的 milvus 实际安装的地址

向量数据库 milvus

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Scroll to top
粤ICP备2020114259号 粤公网安备44030402004258