ollama_ai_install/00-new1.sh

31 lines
769 B
Bash

#!/usr/bin/env bash
set -euo pipefail
echo "=== Step 1: NVIDIA driver install for RTX 3060 on Ubuntu 24.04 ==="
if [[ $EUID -ne 0 ]]; then
echo "Please run this script as root, e.g.: sudo bash $0"
exit 1
fi
echo "Updating apt and installing base dependencies..."
apt-get update -y
apt-get upgrade -y
apt-get install -y \
curl \
ca-certificates \
gnupg \
lsb-release \
apt-transport-https \
software-properties-common
echo
echo "Installing NVIDIA driver + utils (570)..."
# Desktop 570 stack: works fine on servers too and pulls in nvidia-smi
apt-get install -y nvidia-driver-570 nvidia-utils-570
echo
echo "Driver install finished."
echo "Now REBOOTING your server, then run: nvidia-smi"
echo "If nvidia-smi works, run the second script"
reboot now