Switch Ollama install to .tar.zst and add zstd dependency (#10814)

This commit is contained in:
CanbiZ (MickLesk)
2026-01-14 18:04:13 +01:00
committed by GitHub
parent fa1f2784f9
commit bdfd72e311
4 changed files with 29 additions and 15 deletions

View File

@@ -16,7 +16,8 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
pkg-config
pkg-config \
zstd
msg_ok "Installed Dependencies"
msg_info "Setting up Intel® Repositories"
@@ -67,11 +68,11 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
BINDIR="/usr/local/bin"
mkdir -p $OLLAMA_INSTALL_DIR
OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama-linux-amd64.tgz"
TMP_TAR="/tmp/ollama.tgz"
OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama-linux-amd64.tar.zst"
TMP_TAR="/tmp/ollama.tar.zst"
echo -e "\n"
if curl -fL# -C - -o "$TMP_TAR" "$OLLAMA_URL"; then
if tar -xzf "$TMP_TAR" -C "$OLLAMA_INSTALL_DIR"; then
if tar --zstd -xf "$TMP_TAR" -C "$OLLAMA_INSTALL_DIR"; then
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
echo "${RELEASE}" >/opt/Ollama_version.txt
msg_ok "Installed Ollama ${RELEASE}"