!1 init chatglm.cpp package

From: @zhoupengcheng11 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2023-08-23 15:35:08 +00:00 committed by Gitee
commit 07714badba
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 46 additions and 0 deletions

BIN
chatglm-cpp-0.2.4.tar.gz Normal file

Binary file not shown.

46
chatglm.cpp.spec Normal file
View File

@ -0,0 +1,46 @@
%define debug_package %{nil}
Name: chatglm-cpp
Version: 0.2.4
Release: 1
License: MIT
Summary: Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++
URL: https://github.com/li-plus/chatglm.cpp
Source0: https://github.com/li-plus/chatglm.cpp/releases/download/0.2.4/chatglm-cpp-%{version}.tar.gz
BuildRequires: gcc,gcc-c++,cmake
%description
Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++,
it can be used for model dialogue based on local laptops.
%prep
%autosetup -b 0 -n %{name}-%{version} -p1
%build
mkdir chatglm_builddir
pushd chatglm_builddir
cmake ..
%make_build
popd
%install
pushd chatglm_builddir
%make_install
install bin/main %{buildroot}%{_prefix}/local/bin/chatglm_cpp_main
install lib/libchatglm.a %{buildroot}%{_prefix}/local/bin/libchatglm.a
mv %{buildroot}%{_prefix}/local/* %{buildroot}%{_prefix}
popd
%files
%{_bindir}/*
%{_libdir}/*
%{_includedir}/*
%{_datadir}/pkgconfig/ggml.pc
/usr/lib/static/libggml.a
%changelog
* Tue Aug 22 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-1
- Init package