Created
November 2, 2025 19:29
-
-
Save rodjjo/408532d917160ff1134e82e22009ce06 to your computer and use it in GitHub Desktop.
Install llama cpp python with cuda support in ubuntu 22.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export CC=/usr/bin/gcc CXX=/usr/bin/g++ CUDA_PATH=/usr/local/cuda CUDACXX=/usr/local/cuda/bin/nvcc | |
| export LD_LIBRARY_PATH=/usr/lib/gcc/$(gcc -dumpmachine)/$(gcc -dumpversion):$LD_LIBRARY_PATH | |
| CMAKE_ARGS="-DGGML_CUDA=on \ | |
| -DLLAMA_BUILD_EXAMPLES=OFF \ | |
| -DLLAMA_BUILD_TESTS=OFF" FORCE_CMAKE=1 CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \ | |
| pip install llama-cpp-python==0.3.9 --no-cache-dir --force-reinstall --upgrade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment