diff --git a/.gitignore b/.gitignore index a2fdac2..37c38fb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ Config/Radarr/* Config/Sonarr/* config/ -scripts/ + *.log *.pid diff --git a/example env file b/example env file new file mode 100644 index 0000000..acd4fb7 --- /dev/null +++ b/example env file @@ -0,0 +1,9 @@ +# NordVPN credentials for Gluetun +# Get these from: https://my.nordaccount.com/dashboard/nordvpn/ -> Manual Setup +# These are *service* credentials, not your regular NordVPN login +NORDVPN_USER= +NORDVPN_PASSWORD= + +# Optional: Comma-separated list of countries (e.g. "United States", "Canada", "Netherlands") +# Leave unset to use "United States" +# NORDVPN_SERVER_COUNTRIES=United States \ No newline at end of file diff --git a/scripts/install-nvidia-stack.sh b/scripts/install-nvidia-stack.sh new file mode 100755 index 0000000..03a4adb --- /dev/null +++ b/scripts/install-nvidia-stack.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Install proprietary NVIDIA driver + NVIDIA Container Toolkit on Ubuntu (for Docker GPU). +# Run on the server: bash scripts/install-nvidia-stack.sh +# Reboot after completion, then: nvidia-smi + +set -euo pipefail + +echo "==> Updating apt" +sudo apt-get update + +echo "==> Installing ubuntu-drivers-common" +sudo apt-get install -y ubuntu-drivers-common + +echo "==> Detected devices / recommendations:" +ubuntu-drivers devices || true + +echo "==> Installing recommended proprietary NVIDIA driver" +sudo ubuntu-drivers autoinstall + +echo "==> Adding NVIDIA Container Toolkit repository" +sudo apt-get install -y curl gnupg2 +curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey \ + | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg +curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \ + | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \ + | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list + +echo "==> Installing nvidia-container-toolkit" +sudo apt-get update +sudo apt-get install -y nvidia-container-toolkit + +echo "==> Configuring Docker to use NVIDIA runtime" +sudo nvidia-ctk runtime configure --runtime=docker +sudo systemctl restart docker + +echo "" +echo "Done. Reboot the server so the kernel loads the NVIDIA driver:" +echo " sudo reboot" +echo "" +echo "After reboot, verify:" +echo " nvidia-smi" +echo " docker run --rm --gpus all nvidia/cuda:12.6.3-base-ubuntu22.04 nvidia-smi" +echo "" +echo "Then recreate Jellyfin:" +echo " cd $(dirname "$(dirname "$(readlink -f "$0")")") && docker compose up -d jellyfin"