向量数据库Milvus以及bert-as-service安装

一、向量数据库milvus安装

前提:安装了docker和docker-compose
1.网盘下载下面的文件
链接:https://pan.baidu.com/s/1rNjAUvzo7MlShSR6Y9n47A?pwd=ompv
提取码:ompv

2.将milvas.yaml放到configs目录下
3.进入到安装目录执行docker-compose up -d
4.访问http://119.29.230.249:8000/?#/connect
5.用户名:root、密码:Milvus

二、安装bert-as-service

下载anaconda3
链接:https://pan.baidu.com/s/1co7aYprMyf4jNCqch6F0DQ?pwd=4lza
提取码:4lza

1.安装anaconda3

# 安装anaconda3
bash Anaconda3-5.2.0-Linux-x86_64.sh
# 添加环境变量
export PATH="/root/anaconda3/bin:$PATH"
source ~/.bashrc
# 查看conda信息
conda info
# 修改/root/.condarc
vim /root/.condarc
# conda内容
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

2.创建虚拟环境,取名叫python36,方便多版本python管理

conda create -n python36 python=3.6

3.激活环境

source activate python36

4.tensorflow安装

pip install tensorflow==1.11.0

5.安装bert-as-service

pip install bert-serving-server

pip install bert-serving-client

6.安装完成之后,下载bert的预训练语言模型,我主要处理中文,因此下载中文版本的预训练语言模型
链接:https://pan.baidu.com/s/1hZIzOiWW6PtMuhKtrId_iQ?pwd=t4o5
提取码:t4o5

7.解压zip包

unzip ./tmp/chinese_L-12_H-768_A-12

8.启动服务

nohup bert-serving-start -model_dir ./tmp/chinese_L-12_H-768_A-12 -num_worker=1 -max_seq_len=10 &
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值