!6 add dockerfile to support building chatglm docker image

From: @zhoupengcheng11 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2023-09-19 06:32:57 +00:00 committed by Gitee
commit 8e037f8a3a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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.