mirror of
https://github.com/koush/scrypted.git
synced 2026-06-20 16:40:30 +01:00
install: add nvidia to install script
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
4
server/package-lock.json
generated
4
server/package-lock.json
generated
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user