Skip to content

Commit f5d195c

Browse files
committed
Improve LLM installer script
1 parent 1e21887 commit f5d195c

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

llm/install.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,30 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1010

1111
# Nix is required for llama.cpp
1212
if ! command -v nix &> /dev/null; then
13-
echo "Installing Nix."
14-
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
13+
echo "Installing Nix."
14+
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
15+
echo "Please close and reopen your shell, and then rerun this script."
16+
return 1
1517
fi
1618

1719
if ! command -v ollama &> /dev/null; then
18-
echo "Installing Ollama."
19-
curl -fsSL https://ollama.com/install.sh | sh
20+
echo "Installing Ollama."
21+
curl -fsSL https://ollama.com/install.sh | sh
2022
fi
2123

2224
if ! command -v llama-server &> /dev/null; then
23-
echo "Installing llama.cpp."
24-
nix profile install nixpkgs#llama-cpp --extra-experimental-features nix-command --extra-experimental-features flakes
25+
echo "Installing llama.cpp."
26+
nix profile install nixpkgs#llama-cpp --extra-experimental-features nix-command --extra-experimental-features flakes
2527
fi
2628

2729
# if [ ! -f "${SCRIPT_DIR}/LM-Studio-"* ]; then
2830
# echo "Downloading LM Studio."
29-
# # This does not pick up the name properly.
31+
# # This does not pick up the filename properly.
3032
# curl -JLO "https://lmstudio.ai/download/latest/linux/x64" --output-dir "${SCRIPT_DIR}"
3133
# chmod +x "${SCRIPT_DIR}/LM-Studio-"*
3234
# fi
3335

34-
echo "Creating symlink."
36+
echo "Creating LM Studio shortcut symlink."
3537
ln -f -s "${SCRIPT_DIR}/lm-studio.desktop" "${HOME}/.local/share/applications/lm-studio.desktop"
3638

3739
ollama --version

0 commit comments

Comments
 (0)