-
-
Save ochafik/2fda80db1d5df7b261608b751f3afd55 to your computer and use it in GitHub Desktop.
llama.cpp install script
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/bash | |
| set -euo pipefail | |
| label="" | |
| if which nvidia-smi >/dev/null ; then | |
| label="cuda-cu$( nvidia-smi | grep "CUDA Version: " | sed -E 's/.*?Version: ([0-9]+\.[0-9]+).*/\1/' )-cap$( nvidia-smi --query-gpu=compute_cap --format=csv | tail -n 1 )" | |
| elif [[ "$( uname -a )" == "darwin" ]]; then | |
| label= | |
| else | |
| fi | |
| wget -O llama-cpp.zip \ | |
| "$( curl --silent "https://api.github.com/repos/ggerganov/llama.cpp/releases/latest" | \ | |
| grep browser_download_url | \ | |
| sed -E 's/.*(https:.*)"/\1/' )" | \ | |
| grep "$label" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment