add dockerfile to support building chatglm docker image

This commit is contained in:
zhoupengcheng 2023-09-16 17:33:00 +08:00
parent 3b4b582b59
commit cfa989c7ad
2 changed files with 28 additions and 1 deletions

24
Dockerfile-chatglm Normal file
View File

@ -0,0 +1,24 @@
#Usage:
#1.build image:
# docker build -f Dockerfile-chatglm -t chatglm_image .
#2.run image:
# docker run -it --security-opt seccomp=unconfined chatglm_image:latest
#base image
FROM openeuler/openeuler:22.03
#update openEuler2309 source and install chatglm
RUN echo '[everything]' > /etc/yum.repos.d/openEuler.repo && \
echo 'name=everything' >> /etc/yum.repos.d/openEuler.repo && \
echo 'baseurl=http://121.36.84.172/dailybuild/EBS-openEuler-23.09/EBS-openEuler-23.09/everything/$basearch/' >> /etc/yum.repos.d/openEuler.repo && \
echo 'enabled=1' >> /etc/yum.repos.d/openEuler.repo && \
echo 'gpgcheck=0' >> /etc/yum.repos.d/openEuler.repo && \
yum install -y sentencepiece chatglm-cpp wget
#download ggml model
WORKDIR /model_path
RUN wget -P /model_path https://huggingface.co/Xorbits/chatglm2-6B-GGML/resolve/main/chatglm2-ggml-q4_1.bin
# run ggml model
CMD /usr/bin/chatglm_cpp_main -m /model_path/chatglm2-ggml-q4_1.bin -i

View File

@ -2,7 +2,7 @@
Name: chatglm-cpp
Version: 0.2.4
Release: 2
Release: 3
License: MIT
Summary: Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++
@ -46,6 +46,9 @@ popd
/usr/lib/static/libggml.a
%changelog
* Tue Sep 19 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-3
- add dokerfile
* Wed Sep 6 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-2
- Fix the conflict with the installation of package sentencepiece.