lamma-cpp-clblast.srpm.spec 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 - boeroboy@gmail.com
  4. # In honor of Seth Vidal https://www.redhat.com/it/blog/thank-you-seth-vidal
  5. # Notes for llama.cpp:
  6. # 1. Tags are currently based on hash - which will not sort asciibetically.
  7. # We need to declare standard versioning if people want to sort latest releases.
  8. # 2. Builds for CUDA/OpenCL support are separate, with different depenedencies.
  9. # 3. NVidia's developer repo must be enabled with nvcc, cublas, clblas, etc installed.
  10. # Example: https://developer.download.nvidia.com/compute/cuda/repos/fedora37/x86_64/cuda-fedora37.repo
  11. # 4. OpenCL/CLBLAST support simply requires the ICD loader and basic opencl libraries.
  12. # It is up to the user to install the correct vendor-specific support.
  13. Name: llama.cpp-clblast
  14. Version: master
  15. Release: 1%{?dist}
  16. Summary: OpenCL Inference of LLaMA model in pure C/C++
  17. License: MIT
  18. Source0: https://github.com/ggerganov/llama.cpp/archive/refs/heads/master.tar.gz
  19. BuildRequires: coreutils make gcc-c++ git mesa-libOpenCL-devel
  20. URL: https://github.com/ggerganov/llama.cpp
  21. %define debug_package %{nil}
  22. %define source_date_epoch_from_changelog 0
  23. %description
  24. CPU inference for Meta's Lllama2 models using default options.
  25. %prep
  26. %setup -n llama.cpp-master
  27. %build
  28. make -j LLAMA_CLBLAST=1
  29. %install
  30. mkdir -p %{buildroot}%{_bindir}/
  31. cp -p main %{buildroot}%{_bindir}/llamacppclblast
  32. cp -p server %{buildroot}%{_bindir}/llamacppclblastserver
  33. cp -p simple %{buildroot}%{_bindir}/llamacppclblastsimple
  34. %clean
  35. rm -rf %{buildroot}
  36. rm -rf %{_builddir}/*
  37. %files
  38. %{_bindir}/llamacppclblast
  39. %{_bindir}/llamacppclblastserver
  40. %{_bindir}/llamacppclblastsimple
  41. %pre
  42. %post
  43. %preun
  44. %postun
  45. %changelog