Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
fix minor install script issues on debian
Jeffrey Morgane29662ab5c7c
diff --git a/scripts/install.sh b/scripts/install.shindex 5a2adc546..9b3f87f69 100644--- a/scripts/install.sh+++ b/scripts/install.sh@@ -30,12 +30,14 @@ case "$(uname -m)" in*) error "Unsupported architecture: $ARCH" ;;esac-SUDO_CMD=+SUDO=if [ "$(id -u)" -ne 0 ]; then# Running as root, no need for sudoif ! command -v sudo >/dev/null; thenerror "Ollama install.sh requires elevated privileges. Please re-run as root."fi++ SUDO="sudo"fiMISSING_TOOLS=$(required_tools curl awk grep sed tee xargs)@@ -44,11 +46,11 @@ if [ -n "$MISSING_TOOLS" ]; thenfistatus "Downloading ollama..."-$SUDO_CMD curl -fsSL -o $TEMP_DIR/ollama "https://ollama.ai/download/ollama-linux-$ARCH"+$SUDO curl -fsSL -o $TEMP_DIR/ollama "https://ollama.ai/download/ollama-linux-$ARCH"status "Installing ollama to /usr/bin..."-$SUDO_CMD install -o0 -g0 -m755 -d /usr/bin-$SUDO_CMD install -o0 -g0 -m755 $TEMP_DIR/ollama /usr/bin/ollama+$SUDO install -o0 -g0 -m755 -d /usr/bin+$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama /usr/bin/ollamainstall_success() { status 'Install complete. Run "ollama" from the command line.'; }trap install_success EXIT@@ -58,11 +60,11 @@ trap install_success EXITconfigure_systemd() {if ! id ollama >/dev/null 2>&1; thenstatus "Creating ollama user..."- $SUDO_CMD useradd -r -s /bin/false -m -d /usr/share/ollama ollama+ $SUDO useradd -r -s /bin/false -m -d /usr/share/ollama ollamafistatus "Creating ollama systemd service..."- cat <<EOF | $SUDO_CMD tee /etc/systemd/system/ollama.service >/dev/null+ cat <<EOF | $SUDO tee /etc/systemd/system/ollama.service >/dev/null[Unit]Description=Ollama ServiceAfter=network-online.target@@ -80,9 +82,9 @@ WantedBy=default.targetEOFif [ "$(systemctl is-system-running || echo 'not running')" = 'running' ]; thenstatus "Enabling and starting ollama service..."- $SUDO_CMD systemctl daemon-reload- $SUDO_CMD systemctl enable ollama- $SUDO_CMD systemctl restart ollama+ $SUDO systemctl daemon-reload+ $SUDO systemctl enable ollama+ $SUDO systemctl restart ollamafi}@@ -111,11 +113,11 @@ install_cuda_driver_yum() {status 'Installing NVIDIA repository...'case $PACKAGE_MANAGER inyum)- $SUDO_CMD $PACKAGE_MANAGER -y install yum-utils- $SUDO_CMD $PACKAGE_MANAGER-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo+ $SUDO $PACKAGE_MANAGER -y install yum-utils+ $SUDO $PACKAGE_MANAGER-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo;;dnf)- $SUDO_CMD dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo+ $SUDO dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo;;esac@@ -123,16 +125,16 @@ install_cuda_driver_yum() {rhel)status 'Installing EPEL repository...'# EPEL is required for third-party dependencies such as dkms and libvdpau- $SUDO_CMD $PACKAGE_MANAGER -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$2.noarch.rpm+ $SUDO $PACKAGE_MANAGER -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$2.noarch.rpm;;esacstatus 'Installing CUDA driver...'- $SUDO_CMD $PACKAGE_MANAGER -y update- $SUDO_CMD $PACKAGE_MANAGER -y install cuda-drivers+ $SUDO $PACKAGE_MANAGER -y update+ $SUDO $PACKAGE_MANAGER -y install cuda-driversif [ "$1" = 'centos' ] || [ "$1$2" = 'rhel7' ]; then- $SUDO_CMD $PACKAGE_MANAGER -y install nvidia-driver-latest-dkms+ $SUDO $PACKAGE_MANAGER -y install nvidia-driver-latest-dkmsfi}@@ -145,14 +147,14 @@ install_cuda_driver_apt() {case $1 indebian)status 'Enabling contrib sources...'- sed 's/main/contrib/' </etc/apt/sources.list >/etc/apt/sources.list.d/contrib.list+ $SUDO sed 's/main/contrib/' < /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/contrib.list > /dev/null;;esacstatus 'Installing CUDA driver...'- $SUDO_CMD dpkg -i $TEMP_DIR/cuda-keyring.deb- $SUDO_CMD apt-get update- $SUDO_CMD apt-get -y install cuda-drivers+ $SUDO dpkg -i $TEMP_DIR/cuda-keyring.deb+ $SUDO apt-get update+ DEBIAN_FRONTEND=noninteractive $SUDO apt-get -y install cuda-drivers -q}if [ ! -f "/etc/os-release" ]; then@@ -187,10 +189,10 @@ fiif ! lsmod | grep -q nvidia; thenKERNEL_RELEASE="$(uname -r)"case $OS_NAME in- centos|rhel|rocky|fedora) $SUDO_CMD $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;;- debian|ubuntu) $SUDO_CMD apt-get -y install linux-headers-$KERNEL_RELEASE ;;+ centos|rhel|rocky|fedora) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;;+ debian|ubuntu) $SUDO apt-get -y install linux-headers-$KERNEL_RELEASE ;;esac- $SUDO_CMD dkms status | awk -F: '/added/ { print $1 }' | xargs -n1 $SUDO_CMD dkms install- $SUDO_CMD modprobe nvidia+ $SUDO dkms status | awk -F: '/added/ { print $1 }' | xargs -n1 $SUDO dkms install+ $SUDO modprobe nvidiafi