1、首先,安装虚拟机(内存一定要分配8GB以上)

虚拟机版本如下:

uname -a

Linux localhost.localdomain 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

2、安装docker

2.1、开始安装

(1)yum 包更新到最新

sudo yum update

(2)安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

(3)设置yum源为阿里云

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

(4)安装docker

sudo yum install docker-ce

(5)安装后查看docker版本

docker -v

2.2 设置ustc的镜像

编辑该文件:

mkidr /etc/docker
vi /etc/docker/daemon.json

在该文件中输入如下内容:

阿里云的镜像
{
“registry-mirrors”:[“https://6kx4zyno.mirror.aliyuncs.com”]
}
重启docker

systemctl daemon-reload
systemctl restart docker

开机启动:

systemctl enable docker

3、安装Milvus

3.1 版本图如下

3.2拉取镜像

docker pull milvusdb/milvus:0.10.4-cpu-d120220-e72454

3.3下载配置文件

mkdir -p /home/$USER/milvus/conf
cd /home/$USER/milvus/conf
wget https://cdn.jsdelivr.net/gh/milvus-io/milvus@0.10.4/core/conf/demo/server_config.yaml

如果无法通过 wget 命令下载配置文件,你也可以在 /home/$USER/milvus/conf 目录下创建 server_config.yaml文件,然后将 server config 文件 的内容复制到你创建的配置文件中。

server config内容如下:

# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.version: 0.5#----------------------+------------------------------------------------------------+------------+-----------------+
# Cluster Config       | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# enable               | If runinng with Mishards, set true, otherwise false.       | Boolean    | false           |
#----------------------+------------------------------------------------------------+------------+-----------------+
# role                 | Milvus deployment role: rw / ro                            | role       | rw              |
#----------------------+------------------------------------------------------------+------------+-----------------+
cluster:enable: falserole: rw#----------------------+------------------------------------------------------------+------------+-----------------+
# General Config       | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# time_zone            | Use UTC-x or UTC+x to specify a time zone.                 | Timezone   | UTC+8           |
#----------------------+------------------------------------------------------------+------------+-----------------+
# meta_uri             | URI for metadata storage, using SQLite (for single server  | URL        | sqlite://:@:/   |
#                      | Milvus) or MySQL (for distributed cluster Milvus).         |            |                 |
#                      | Format: dialect://username:password@host:port/database     |            |                 |
#                      | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or |            |                 |
#                      | 'mysql', replace other texts with real values.             |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
general:timezone: UTC+8meta_uri: sqlite://:@:/#----------------------+------------------------------------------------------------+------------+-----------------+
# Network Config       | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# bind.address         | IP address that Milvus server monitors.                    | IP         | 0.0.0.0         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# bind.port            | Port that Milvus server monitors. Port range (1024, 65535) | Integer    | 19530           |
#----------------------+------------------------------------------------------------+------------+-----------------+
# http.enable          | Enable web server or not.                                  | Boolean    | true            |
#----------------------+------------------------------------------------------------+------------+-----------------+
# http.port            | Port that Milvus web server monitors.                      | Integer    | 19121           |
#                      | Port range (1024, 65535)                                   |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
network: bind.address: 0.0.0.0bind.port: 19530http.enable: truehttp.port: 19121#----------------------+------------------------------------------------------------+------------+-----------------+
# Storage Config       | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path                 | Path used to save meta data, vector data and index data.   | Path       | /var/lib/milvus |
#----------------------+------------------------------------------------------------+------------+-----------------+
# auto_flush_interval  | The interval, in seconds, at which Milvus automatically    | Integer    | 1 (s)           |
#                      | flushes data to disk.                                      |            |                 |
#                      | 0 means disable the regular flush.                         |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage:path: /var/lib/milvusauto_flush_interval: 1#----------------------+------------------------------------------------------------+------------+-----------------+
# WAL Config           | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# enable               | Whether to enable write-ahead logging (WAL) in Milvus.     | Boolean    | true            |
#                      | If WAL is enabled, Milvus writes all data changes to log   |            |                 |
#                      | files in advance before implementing data changes. WAL     |            |                 |
#                      | ensures the atomicity and durability for Milvus operations.|            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# recovery_error_ignore| Whether to ignore logs with errors that happens during WAL | Boolean    | false           |
#                      | recovery. If true, when Milvus restarts for recovery and   |            |                 |
#                      | there are errors in WAL log files, log files with errors   |            |                 |
#                      | are ignored. If false, Milvus does not restart when there  |            |                 |
#                      | are errors in WAL log files.                               |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# buffer_size          | Sum total of the read buffer and the write buffer in MBs.  | Integer    | 256 (MB)        |
#                      | buffer_size must be in range [64, 4096] (MB).              |            |                 |
#                      | If the value you specified is out of range, Milvus         |            |                 |
#                      | automatically uses the boundary value closest to the       |            |                 |
#                      | specified value. It is recommended you set buffer_size to  |            |                 |
#                      | a value greater than the inserted data size of a single    |            |                 |
#                      | insert operation for better performance.                   |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path                 | Location of WAL log files.                                 | String     |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
wal:enable: truerecovery_error_ignore: falsebuffer_size: 256MBpath: /var/lib/milvus/wal#----------------------+------------------------------------------------------------+------------+-----------------+
# Cache Config         | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# cache_size           | The size of CPU memory used for caching data for faster    | Integer    | 4 (GB)          |
#                      | query. The sum of 'cpu_cache_capacity' and                 |            |                 |
#                      | 'insert_buffer_size' must be less than system memory size. |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# insert_buffer_size   | Buffer size used for data insertion.                       | Integer    | 1 (GB)          |
#                      | The sum of 'insert_buffer_size' and 'cpu_cache_capacity'   |            |                 |
#                      | must be less than system memory size.                      |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# preload_collection   | A comma-separated list of collection names that need to    | StringList |                 |
#                      | be pre-loaded when Milvus server starts up.                |            |                 |
#                      | '*' means preload all existing tables (single-quote or     |            |                 |
#                      | double-quote required).                                    |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
cache:cache_size: 4GBinsert_buffer_size: 1GBpreload_collection:#----------------------+------------------------------------------------------------+------------+-----------------+
# GPU Config           | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# enable               | Enable GPU resources or not.                               | Boolean    | false           |
#----------------------+------------------------------------------------------------+------------+-----------------+
# cache_size           | The size of GPU memory per card used for cache.            | Integer    | 1 (GB)          |
#----------------------+------------------------------------------------------------+------------+-----------------+
# gpu_search_threshold | A Milvus performance tuning parameter. This value will be  | Integer    | 1000            |
#                      | compared with 'nq' to decide if the search computation will|            |                 |
#                      | be executed on GPUs only.                                  |            |                 |
#                      | If nq >= gpu_search_threshold, the search computation will |            |                 |
#                      | be executed on GPUs only;                                  |            |                 |
#                      | if nq < gpu_search_threshold, the search computation will  |            |                 |
#                      | be executed on CPUs only.                                  |            |                 |
#                      | The SQ8H index is special, if nq < gpu_search_threshold,   |            |                 |
#                      | the search will be executed on both CPUs and GPUs.         |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# search_resources     | The list of GPU devices used for search computation.       | DeviceList | gpu0            |
#                      | Must be in format gpux.                                    |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# build_index_resources| The list of GPU devices used for index building.           | DeviceList | gpu0            |
#                      | Must be in format gpux.                                    |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
gpu:enable: falsecache_size: 1GBgpu_search_threshold: 1000search_devices:- gpu0build_index_devices:- gpu0#----------------------+------------------------------------------------------------+------------+-----------------+
# FPGA Config           | Description                                               | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# enable               | Use FPGA devices or not.                                   | Boolean    | false           |
#----------------------+------------------------------------------------------------+------------+-----------------+
# search_devices       | The list of FPGA devices used for search computation.      | DeviceList | fpga0           |
#                      | Must be in format fpgax.                                   |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
fpga:enable: falsesearch_devices:- fpga0#----------------------+------------------------------------------------------------+------------+-----------------+
# Logs Config          | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# level                | Log level in Milvus. Must be one of debug, info, warning,  | String     | debug           |
#                      | error, fatal                                               |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# trace.enable         | Whether to enable trace level logging in Milvus.           | Boolean    | true            |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path                 | Absolute path to the folder holding the log files.         | String     |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
# max_log_file_size    | The maximum size of each log file, size range [512, 4096]  | Integer    | 1024 (MB)       |
#----------------------+------------------------------------------------------------+------------+-----------------+
# log_rotate_num       | The maximum number of log files that Milvus keeps for each | Integer    | 0               |
#                      | logging level, num range [0, 1024], 0 means unlimited.     |            |                 |
#----------------------+------------------------------------------------------------+------------+-----------------+
logs:level: debugtrace.enable: truepath: /var/lib/milvus/logsmax_log_file_size: 1024MBlog_rotate_num: 0#----------------------+------------------------------------------------------------+------------+-----------------+
# Metric Config        | Description                                                | Type       | Default         |
#----------------------+------------------------------------------------------------+------------+-----------------+
# enable               | Enable monitoring function or not.                         | Boolean    | false           |
#----------------------+------------------------------------------------------------+------------+-----------------+
# address              | Pushgateway address                                        | IP         | 127.0.0.1       +
#----------------------+------------------------------------------------------------+------------+-----------------+
# port                 | Pushgateway port, port range (1024, 65535)                 | Integer    | 9091            |
#----------------------+------------------------------------------------------------+------------+-----------------+
metric:enable: falseaddress: 127.0.0.1port: 9091
docker run -d --name milvus_cpu_0.10.4 --restart=always -p 19530:19530 -p 19121:19121 -v /home/$USER/milvus/db:/var/lib/milvus/db -v /home/$USER/milvus/conf:/var/lib/milvus/conf -v /home/$USER/milvus/logs:/var/lib/milvus/logs -v /home/$USER/milvus/wal:/var/lib/milvus/wal milvusdb/milvus:0.10.4-cpu-d120220-e72454

确认 Milvus 运行状态:

docker ps

或者查看日志

docker logs -f milvus_cpu_0.10.4

4、安装webserver和webclient(我是在win10运行的,版本为0.11.0)

4.1

导入==》安装依赖==》。。。

4.2 webclient(如果npm install 不成功,则cnpm install)

如果运行遇到错误:import type * as PrettyFormat from ‘./types’;则修改package.json中的typescript版本为~3.8.3

重新导包

cnpm install

运行

4.2 webserver

修改webserver/src/common/config.py文件:
MILVUS_HOST:虚拟机(服务器地址)
DATA_PATH:webserver所在机器的目录(win10要手动创建)
UPLOAD_PATH:webserver所在机器的目录(win10要手动创建)

修改webserver/src/common/const.py文文件
PLOAD_PATH:webserver所在机器的目录(win10要手动创建)

运行

以图搜图(基于 Milvus 和 VGG 实现以图搜图)相关推荐

  1. 零基础实战行人重识别ReID项目-基于Milvus的以图搜图

    目录 第一阶段,ReID的基本概念 1.1 ReID定义 1.2 技术难点 1.3 常用数据集 1.4 评价指标 1.5 实现思路 1.6 具体方案 第二阶段:复现算法 2.1 PCB的骨干网络 2. ...

  2. 基于 Milvus 的以图搜图系统 2.0

    Milvus 以图搜图 1.0 版本自发布以来便受到广大用户的欢迎.近日,Zilliz 推出了 Milvus 以图搜图系统 2.0 版.本文将介绍 Milvus 以图搜图系统 2.0 版的主要更新内容 ...

  3. 以图搜图 图像匹配_图像匹配,基于深度学习DenseNet实现以图搜图功能

    原标题:图像匹配,基于深度学习DenseNet实现以图搜图功能 度学习的发展使得在此之前以机器学习为主流算法的相关实现变得简单,而且准确率更高,效果更好,在图像检索这一块儿,目前有谷歌的以图搜图,百度 ...

  4. 基于CLIP实现以文精准搜图

    基于CLIP实现以文精准搜图 在使用CLIP做图文匹配时,发现只能用多个文本语句和一张图片匹配,而我想实现多个图片与文本进行匹配. 打个断点 用DEBUG看了下 在经过预处理和模型后 logits_p ...

  5. 淘宝联盟图像搜索同款商品,按主图找同款产品,以图搜相似款

    淘宝联盟图像搜索同款商品,按主图找同款产品,以图搜相似款接口代码如下: [请求参数,支持高并发请求] 请求参数:imgid=http://g-search3.alicdn.com/img/bao/up ...

  6. 基于Milvus向量引擎的WPS智能写作平台架构实践

    作者 | 王浪.陈启贤 结合当下流行的 NLP 等人工智能相关技术,金山办公软件有限公司武汉 AI 部门自主研发了 WPS 智能辅助写作平台.利用意图识别.文本聚类等语义匹配算法,该平台实现了 AI ...

  7. 基于CIFAR100的VGG网络结构详解

    基于CIFAR100的VGG网络详解 码字不易,点赞收藏 1 数据集概况 1.1 CIFAR100 cifar100包含20个大类,共100类,train集50000张图片,test集10000张图片 ...

  8. 基于图数据库的物联网模型(1)-图数据库与模型设计

    物联网的图模型 所谓"物联网"是指规模巨大的设备,传感器将实现联网,通过这些联网设备来收集数据,存储和分析,并且和人员,应用软件产生的数据相互关联,实现处理复杂的事件的最优化.基于 ...

  9. 基于 Milvus 构建的近似最近邻(ANN)搜索引擎

    ✏️  作者介绍: 周充,格像科技后端工程师 需求背景 根据格像科技公司的业务需求,我们需要搭建一个近似最近邻(Approximate Nearest Neighbor,即 ANN)搜索引擎,以便将在 ...

  10. 基于卷积神经网络VGG实现水果分类识别

    基于卷积神经网络VGG实现水果分类识别 一. 前言 二. 模型介绍 三. 数据处理 四. 模型搭建 4.1 定义卷积池化网络 4.2 搭建VGG网络 4.3 参数配置 4.4 模型训练 4.5 绘制l ...

最新文章

  1. Win10系列:JavaScript动画2
  2. MyBatis学习总结(10)——批量操作
  3. c# load xml 中文报错
  4. BZOJ3775 : 点和直线
  5. 【QGIS入门实战精品教程】14.1:QGIS如何加载各种在线地图?
  6. oracle数据库视图有红叉,oracle触发器 前面的红叉是什么意思
  7. LeetCode 2097. 合法重新排列数对(欧拉路径)
  8. 韩信大招:一致性哈希
  9. 转:DotNET企业架构应用实践-架构师成长之路-如何成为优秀架构师
  10. html5--6-13 CSS3中的颜色表示方式
  11. 也谈WEB打印(四):让我们的模板支持打印,并根据内容动态的生成页面
  12. 哈啰单车失窃数十辆 盗窃者竟有摩拜员工!只因其又新又好骑...
  13. VMware虚拟机安装CentOS6.4、部署web项目全过程(设置固定IP、安装JDK、Tomcat、Redis、部署项目)...
  14. linux ll以编码格式_在Linux中文件的编码及对文件进行编码转换
  15. 30岁的你,目标工资是多少?
  16. Mysql 第一范式入门
  17. (C/C++) Link List - C 語言版本
  18. 悉尼大学计算机专业新生,悉尼大学计算机专业详解
  19. mysql 创建 utf-8 数据库_mysql 创建数据库 utf-8
  20. python求二项式系数的几种方法及性能对比

热门文章

  1. 用C语言解一元二次方程
  2. [NOI Online 2021 入门组] 切蛋糕
  3. mqtt 服务器 ca 证书,如何将SSL MQTT客户机与CA签名服务器证书连接?
  4. 鲸探发布点评:7月12日发售小王子系列数字藏品
  5. 360校招之圈地运动
  6. 易语言解决adb端口占用_Android ADB 端口占用问题解决方案
  7. js刻度尺插件_html5 canvas+js刻度尺代码
  8. 远程连接oracle6,win7 64位远程连接oracle11g64位
  9. ChinaSoft 论坛巡礼 | 云际计算系统软件
  10. 阅读高效能人士七个习惯