LostRuins / koboldcpp

Run GGUF models easily with a KoboldAI UI. One File. Zero Install.
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
4.82k stars 343 forks source link

Project doesn't install anything #1061

Open yurivict opened 1 month ago

yurivict commented 1 month ago

Describe the Issue There are no install cmake statements.

The Arch port uses a lot of install commands to install kobold, when this should be done with "make install".

LostRuins commented 1 month ago

Could you be more specific? Are you using the community AUR builds? Or are you self compiling, and having issues running Kobold after building?

yurivict commented 1 month ago

I am compiling the project using gmake and cmake. There is no 'install' target that should normally be present.

LostRuins commented 1 month ago

Ah okay. The cmake is not intended for normal users - it's purpose is solely to generate a single .dll file utilized by the cublas builds.

To do the most basic build the project, you just need to clone the repo and do: make followed by python koboldcpp.py --model your_file.gguf

There's support building for GPU acceleration with cuda/vulkan which require installing some libraries. Alternatively, we also provide a conda powered compilation shell script to do that all for you.

https://github.com/LostRuins/koboldcpp?tab=readme-ov-file#compiling-on-linux-using-koboldcppsh-automated-compiler-script

Lastly, if you want a quick solution we already have prebuilt x64 linux executable binaries available for download https://github.com/LostRuins/koboldcpp/releases/latest

yurivict commented 1 month ago

I build on FreeBSD for the FreeBSD port. It needs the install target, otherwise it needs to install manually using custom shell script.

LostRuins commented 1 month ago

I'm still confused though, if your build has succeeded, what else needs to be done? All the files you need to run it are already there. You can just move the directory to where you like, and execute the python script.

yurivict commented 1 month ago

I had to write this section in the port's Makefile:

do-install:
        # dir
        ${MKDIR} ${STAGEDIR}${DATADIR}
        # prog
        ${INSTALL_DATA} ${WRKSRC}/koboldcpp.py ${STAGEDIR}${DATADIR}/koboldcpp.py
        ${CHMOD} +x ${STAGEDIR}${DATADIR}/koboldcpp.py
        ${RLN} ${STAGEDIR}${DATADIR}/koboldcpp.py ${STAGEDIR}${PREFIX}/bin/koboldcpp
        # libraries
.for lib in koboldcpp_default.so koboldcpp_failsafe.so koboldcpp_noavx2.so \
            koboldcpp_openblas.so koboldcpp_vulkan.so koboldcpp_vulkan_noavx2.so
        ${INSTALL_LIB} ${WRKSRC}/${lib} ${STAGEDIR}${DATADIR}
.endfor
        # embd files
.for embd in klite.embd kcpp_docs.embd rwkv_vocab.embd rwkv_world_vocab.embd \
             kcpp_sdui.embd taesd.embd taesd_xl.embd
        ${INSTALL_DATA} ${WRKSRC}/${embd} ${STAGEDIR}${DATADIR}
.endfor

This is hard to maintain. Some files might be missing. File lists need to be updated when the port is updated. Every distro would have the same problem. They all would need to maintain this section in the port.

This code belongs in the project itself. There should be the 'install' target in the project's Makefile that would do the same.

You probably think that users would do 'git clone...', then install dependencies using pip, then run make.

But users don't do this these days. This is too difficult.

Users expect to just run 'pkg install koboldcpp', and koboldcpp is magically installed. This is a lot easier than doing all the individual steps that begin with git.

That is why we have packaging systems.