DB GPT本地安装部署

DB GPT本地安装部署

源码下载

git clone https://github.com/eosphoros-ai/DB-GPT.git

Miniconda环境安装

Miniconda 安装

mkdir -p ~/miniconda3

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh

bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3

rm -rf ~/miniconda3/miniconda.sh

初始化Miniconda

~/miniconda3/bin/conda init bash

使conda环境生效:

source ~/.bashrc

之后就有conda基础环境了,会看到在终端用户名前面添加了(base)标志

创建Python虚拟环境

python >= 3.10

conda create -n dbgpt_env python=3.10

conda activate dbgpt_env #之后conda环境就变成(dbgpt_env) tom@ubuntu:/home/apps$ 

# it will take some minutes

pip install -e ".[default]" -i https://mirrors.aliyun.com/pypi/simple/

复制环境变量

cp .env.template .env

模型部署

下载Embedding 模型

cd DB-GPT

mkdir models and cd models

git lfs install

git clone https://huggingface.co/GanymedeNil/text2vec-large-chinese

下载模型比较慢,使用huggingface的镜像站

git clone https://hf-mirror.com/GanymedeNil/text2vec-large-chinese

model.safetensor 和 pytorch_model.bin 文件较大可以手动下载放到text2vec-large-chinese文件目录里

配置代理

资源有限,此处采用代理模式安装,代理模式就是采用其他大模型厂商提供的API接口

此处采用智谱的glm-4模型

LLM_MODEL=zhipu_proxyllmi

PROXYLLM_BACKEND=glm-4

EMBEDDING_MODEL=text2vec

PROXY_SERVER_URL=https://open.bigmodel.cn/api/paas/v4/chat/completions

ZHIPU_PROXY_API_KEY=

测试数据

加载默认的

测试数据到SQLite数据库中

bash ./scripts/examples/load_examples.sh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

牛马程序员2025

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值