跨境派

跨境派

跨境派,专注跨境行业新闻资讯、跨境电商知识分享!

当前位置:首页 > 工具系统 > 选词工具 > 纯新手 docker langchain Qwen1.5 部署

纯新手 docker langchain Qwen1.5 部署

时间:2024-04-12 18:45:25 来源:网络cs 作者:淼淼 栏目:选词工具 阅读:

标签: 部署  新手 

一、所需资源:

docker23

镜像:qwenllm/qwen:cu121

模型:Qwen1.5-Qwen-7B-Chat

langchain

二、技巧

1、下载模型

使用下载的镜像,启动容器,使用modelscope命令下载

#模型下载

from modelscope import snapshot_download

model_dir = snapshot_download('qwen/Qwen1.5-7B-Chat')

三、安装步骤

1、启动容器

挂载磁盘、映射端口

docker  run   -itd  --name=qwen-langchan -v E:/model:/home/model  -p 7860:7860  -p 20000:20000   -p  8501:8501  qwenllm/qwen:cu121 /bin/bash

2、进入容器

3、安装langchain

apt update && apt install python3-venv  -y && apt install python3-pip  -y && apt install git  -y   && apt-get install ffmpeg libsm6 libxext6  -y && apt-get install libgl1 -y &&  cp   /usr/bin/python3  /usr/bin/python  && python3 -m venv venv && apt-get  install  -y vim   && git clone https://github.com/chatchat-space/Langchain-Chatchat.git && cd  Langchain-Chatchat &&  pip install -r requirements.txt &&  pip install -r requirements_api.txt && pip install -r requirements_webui.txt 

4、修改文件名称

cd /Langchain-Chatchat/confing

文件后缀改为  .py 文件

cp XX.py.ex* XX.py

5、修改配置

vim confing/model_config.py

"Qwen1.5-7B-Chat": "/home/model/Qwen1.5-7B-Chat",

6、启动服务

启动的命令如下
nohup  python startup.py -a >log &

7、本机浏览器访问

服务端运行信息:

    OpenAI API Server: http://127.0.0.1:20000/v1
    Chatchat  API  Server: http://127.0.0.1:7860
    Chatchat WEBUI Server: http://0.0.0.0:8501

【新手入门,多有遗漏,私信交流】

相关链接:

GitHub - QwenLM/Qwen: The official repo of Qwen (通义千问) chat & pretrained large language model proposed by Alibaba Cloud.Langchain-Chatchat 安装_langchain-chatchat docker-CSDN博客

本文链接:https://www.kjpai.cn/news/2024-04-12/157740.html,文章来源:网络cs,作者:淼淼,版权归作者所有,如需转载请注明来源和作者,否则将追究法律责任!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。

文章评论