install: add nvidia to install script

This commit is contained in:
Koushik Dutta
2025-07-10 19:45:27 -07:00
parent 53c2b7cb58
commit 22d0ce4f82
3 changed files with 25 additions and 4 deletions

View File

@@ -45,10 +45,10 @@ services:
# - SCRYPTED_DOCKER_AVAHI=true
# NVIDIA (Part 1 of 2)
# runtime: nvidia
# nvidia runtime: nvidia
# NVIDIA (Part 2 of 2) - Use NVIDIA image, and remove subsequent default image.
# image: ghcr.io/koush/scrypted:nvidia
# nvidia image: ghcr.io/koush/scrypted:nvidia
image: ghcr.io/koush/scrypted
volumes:

View File

@@ -13,6 +13,8 @@ then
fi
function readyn() {
echo
echo
if [ ! -z "$SCRYPTED_NONINTERACTIVE" ]
then
yn="y"
@@ -93,6 +95,25 @@ else
sudo apt -y purge apparmor || true
fi
HAS_NVIDIA=$(lspci | grep -i nvidia)
if [ ! -z "$HAS_NVIDIA" ]
then
readyn "NVIDIA GPU detected. Use NVIDIA image for GPU acceleration?"
if [ "$yn" == "y" ]
then
readyn "NVIDIA image requires the NVIDIA Drivers and Container Toolkit to be installed. This script can install them for you. Install NVIDIA Drivers and Container Toolkit for GPU acceleration?"
if [ "$yn" == "y" ]
then
curl -fsSL https://raw.githubusercontent.com/koush/scrypted/main/install/docker/install-nvidia-container-toolkit.sh -o install-nvidia-container-toolkit.sh
chmod +x install-nvidia-container-toolkit.sh
./install-nvidia-container-toolkit.sh
rm install-nvidia-container-toolkit.sh
fi
sed -i 's/'#' nvidia //g' $DOCKER_COMPOSE_YML
sed -i 's/ghcr.io\/koush\/scrypted/ghcr.io\/koush\/scrypted:nvidia/g' $DOCKER_COMPOSE_YML
fi
fi
readyn "Install avahi-daemon? This is the recommended for reliable HomeKit discovery and pairing."
if [ "$yn" == "y" ]
then

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/server",
"version": "0.140.5",
"version": "0.140.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/server",
"version": "0.140.5",
"version": "0.140.6",
"hasInstallScript": true,
"license": "ISC",
"dependencies": {