|
| 1 | +# SRPM for building from source and packaging an RPM for RPM-based distros. |
| 2 | +# https://fedoraproject.org/wiki/How_to_create_an_RPM_package |
| 3 | +# Built and maintained by John Boero - [email protected] |
| 4 | +# In honor of Seth Vidal https://www.redhat.com/it/blog/thank-you-seth-vidal |
| 5 | + |
| 6 | +# Notes for llama.cpp: |
| 7 | +# 1. Tags are currently based on hash - which will not sort asciibetically. |
| 8 | +# We need to declare standard versioning if people want to sort latest releases. |
| 9 | +# 2. Builds for CUDA/OpenCL support are separate, with different depenedencies. |
| 10 | +# 3. NVidia's developer repo must be enabled with nvcc, cublas, clblas, etc installed. |
| 11 | +# Example: https://developer.download.nvidia.com/compute/cuda/repos/fedora37/x86_64/cuda-fedora37.repo |
| 12 | +# 4. OpenCL/CLBLAST support simply requires the ICD loader and basic opencl libraries. |
| 13 | +# It is up to the user to install the correct vendor-specific support. |
| 14 | + |
| 15 | +Name: llama.cpp-cublas |
| 16 | +Version: master |
| 17 | +Release: 1%{?dist} |
| 18 | +Summary: CPU Inference of LLaMA model in pure C/C++ (no CUDA/OpenCL) |
| 19 | +License: MIT |
| 20 | +Source0: https://github.com/ggerganov/llama.cpp/archive/refs/heads/master.tar.gz |
| 21 | +BuildRequires: coreutils make gcc-c++ git cuda-toolkit |
| 22 | +Requires: cuda-toolkit |
| 23 | +URL: https://github.com/ggerganov/llama.cpp |
| 24 | + |
| 25 | +%define debug_package %{nil} |
| 26 | +%define source_date_epoch_from_changelog 0 |
| 27 | + |
| 28 | +%description |
| 29 | +CPU inference for Meta's Lllama2 models using default options. |
| 30 | + |
| 31 | +%prep |
| 32 | +%setup -n llama.cpp-master |
| 33 | + |
| 34 | +%build |
| 35 | +make -j LLAMA_CUBLAS=1 |
| 36 | + |
| 37 | +%install |
| 38 | +mkdir -p %{buildroot}%{_bindir}/ |
| 39 | +cp -p main %{buildroot}%{_bindir}/llamacppcublas |
| 40 | +cp -p server %{buildroot}%{_bindir}/llamacppcublasserver |
| 41 | +cp -p simple %{buildroot}%{_bindir}/llamacppcublassimple |
| 42 | + |
| 43 | +%clean |
| 44 | +rm -rf %{buildroot} |
| 45 | +rm -rf %{_builddir}/* |
| 46 | + |
| 47 | +%files |
| 48 | +%{_bindir}/llamacppcublas |
| 49 | +%{_bindir}/llamacppcublasserver |
| 50 | +%{_bindir}/llamacppcublassimple |
| 51 | + |
| 52 | +%pre |
| 53 | + |
| 54 | +%post |
| 55 | + |
| 56 | +%preun |
| 57 | +%postun |
| 58 | + |
| 59 | +%changelog |
0 commit comments