lamma-cpp-cublas.srpm.spec 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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-cublas
  14. Version: master
  15. Release: 1%{?dist}
  16. Summary: CPU Inference of LLaMA model in pure C/C++ (no CUDA/OpenCL)
  17. License: MIT
  18. Source0: https://github.com/ggerganov/llama.cpp/archive/refs/heads/master.tar.gz
  19. BuildRequires: coreutils make gcc-c++ git cuda-toolkit
  20. Requires: cuda-toolkit
  21. URL: https://github.com/ggerganov/llama.cpp
  22. %define debug_package %{nil}
  23. %define source_date_epoch_from_changelog 0
  24. %description
  25. CPU inference for Meta's Lllama2 models using default options.
  26. %prep
  27. %setup -n llama.cpp-master
  28. %build
  29. make -j LLAMA_CUBLAS=1
  30. %install
  31. mkdir -p %{buildroot}%{_bindir}/
  32. cp -p main %{buildroot}%{_bindir}/llamacppcublas
  33. cp -p server %{buildroot}%{_bindir}/llamacppcublasserver
  34. cp -p simple %{buildroot}%{_bindir}/llamacppcublassimple
  35. %clean
  36. rm -rf %{buildroot}
  37. rm -rf %{_builddir}/*
  38. %files
  39. %{_bindir}/llamacppcublas
  40. %{_bindir}/llamacppcublasserver
  41. %{_bindir}/llamacppcublassimple
  42. %pre
  43. %post
  44. %preun
  45. %postun
  46. %changelog