docker pull centos:centos7
#以特权模式运行容器 需要的几个端口 一块打开
#否则执行命令可能报错:Failed to get D-Bus connection: Operation not permitted
docker run -d --name centos-glm -v /dp/docker/file/glm:/usr/local/glm -p 122:22 -p 16030:6030 --privileged=true centos:7 /usr/sbin/init
#进入容器
docker exec -it -u root centos-td /bin/bash
#安装几个必要的工具
yum install net-tools.x86_64 -y
yum install wget
yum install -y openssh-server
systemctl restart sshd
#修改密码用的
yum install passwd -y
#修改密码
passwd root
输入两次密码
然后就可以ssh连接了 ,注意防火墙
安装conda
创建3.11版本python环境
conda create -p /opt/langchain-chatchat/pyenv python=3.8
激活Python虚拟环境
conda activate /opt/langchain-chatchat/pyenv
关闭环境
conda deactivate
# 删除环境
conda env remove -p /opt/langchain-chatchat/pyenv
更新py库
pip3 install --upgrade pip
下载源码http://github.com/chatchat-space/Langchain-Chatchat.git
也可以安装git
git clone http://github.com/chatchat-space/Langchain-Chatchat.git
cd 到Langchain-Chatchat
把requirement_x系列文件中,把python-magic-bin; sys_platform == 'win32’这行去掉
安装依赖
pip install setuptools-scm
pip install seqeval
pip install -r requirements.txt
pip install -r requirements_lite.txt
pip install -r requirements_api.txt
pip install -r requirements_webui.txt