Compile ChatGLM in docker with Nvidia graphic card

At first install docker with nvidia graphic card.

1.create docker with nvidia graphic card

$ sudo docker run -it --gpus all --name chatglm-1  rocker/cuda /bin/bash

If docker has created, start and exec docker:

$ sudo docker start chatglm-1

$ sudo docker exec -it chatglm-1 /bin/bash

2.install the tools

$ apt update

$ apt install sudo wget curl git cmake vim -y

$ apt install software-properties-common

3.install python3.11

$  sudo add-apt-repository ppa:deadsnakes/ppa

$  sudo apt-get update

$  sudo apt-get install python3.11

$  python3.11 --version

4.install anaconda

$ wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh

$ sh ./Anaconda3-2023.09-0-Linux-x86_64.sh

# add the conda path to PATH at the end of ~/.bashrc

$ vim ~/.bashrc 

 export PATH=${PATH}:/your/conda/path

$source ~/.bashrc

5.download the ChatGLM

$ git clone https://github.com/THUDM/ChatGLM2-6B.git

6.download the model from TSINGHUA cloud

清华大学云盘icon-default.png?t=N7T8https://cloud.tsinghua.edu.cn/d/674208019e314311ab5c/

Choose the proper model according memory of your graphic  .

6MB:

清华大学云盘icon-default.png?t=N7T8https://cloud.tsinghua.edu.cn/d/674208019e314311ab5c/?p=%2Fchatglm2-6b-int4&mode=list

Click every file one by one to download

Such as :

下载更新配置文件,从这个URLhttps://huggingface.co/THUDM/chatglm2-6b-int4/tree/main下载除了红色的所有文件,放在chatglm-6b-int4目录下:

7.add 3 libs 

$ cd ChatGLM2-6B

$ vim ./requirements.txt

chardet

streamlit

streamlit-chat

#such as:

8.edit the model path

$ vim web_demo2.py

#use your own model path 

9.create env

$ conda create -n ChatGLM

$ source activate ChatGLM

10.install the libs for ChatGLM in env

$ pip install -r requirements.txt

#after long time

11.install cuda toolkit

$ sudo apt install nvidia-cuda-toolkit -y

12.run chatglm

$ python3 -m streamlit run ./web_demo2.py --server.port 8888

13.access and test: http://yourip:8888

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ERROR Failed to compile with 1 error的错误信息表明编译过程中出现了一个错误。根据引用中的警告信息,这个错误可能是在主文件(main.js)中的某一行代码中发生的。要解决这个错误,我们需要查看具体的错误信息。 在引用中提到,当在Vue项目中安装了less和less-loader后,重启服务时可能会出现报错。这个报错可能是由于less版本过高导致的。解决方法是降低less版本为合适的版本。 另外,引用中提到了一个Vue项目中出现的错误,错误信息为"Component name 'xxxx' should always be multi-word vue/multi-word-comp"。解决这个错误的方法是给组件名添加多个单词。 综上所述,如果你遇到了ERROR Failed to compile with 1 error的错误,请先查看具体的错误信息并尝试根据错误信息解决问题。另外,如果你在Vue项目中遇到了Component name的错误,请尝试给组件名添加多个单词。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [ERROR Failed to compile with 1 error](https://blog.csdn.net/lv_suri/article/details/126219408)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [解决vue安装less报错Failed to compile with 1 errors的问题](https://download.csdn.net/download/weixin_38667581/14671803)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值