forked from Mirrors/Dispatcharr
Add pciutils for better hardware detection.
This commit is contained in:
parent
2ddc6beb15
commit
23b678bb03
2 changed files with 24 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
|||
python3.13 python3.13-dev python3.13-venv \
|
||||
python-is-python3 python3-pip \
|
||||
libpcre3 libpcre3-dev libpq-dev procps \
|
||||
build-essential gcc \
|
||||
build-essential gcc pciutils \
|
||||
nginx streamlink \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
|
|
|||
|
|
@ -151,6 +151,16 @@ done
|
|||
|
||||
# Give contextual suggestions based on detected hardware
|
||||
if [ "$DRI_DEVICES_FOUND" = true ]; then
|
||||
# Detect Intel/AMD GPU model
|
||||
if command -v lspci >/dev/null 2>&1; then
|
||||
GPU_INFO=$(lspci -nn | grep -i "VGA\|Display" | head -1)
|
||||
if [ -n "$GPU_INFO" ]; then
|
||||
echo "🔍 Detected GPU: $GPU_INFO"
|
||||
# Extract model for cleaner display in summary
|
||||
GPU_MODEL=$(echo "$GPU_INFO" | sed -E 's/.*: (.*) \[.*/\1/' | sed 's/Corporation //' | sed 's/Technologies //')
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$LIBVA_DRIVER_NAME" ]; then
|
||||
echo "ℹ️ LIBVA_DRIVER_NAME is set to '$LIBVA_DRIVER_NAME'"
|
||||
else
|
||||
|
|
@ -180,6 +190,15 @@ if [ "$DRI_DEVICES_FOUND" = true ]; then
|
|||
fi
|
||||
|
||||
if [ "$NVIDIA_FOUND" = true ]; then
|
||||
# Try to get NVIDIA GPU model info
|
||||
if command -v nvidia-smi >/dev/null 2>&1; then
|
||||
NVIDIA_MODEL=$(nvidia-smi --query-gpu=name --format=csv,noheader 2>/dev/null | head -1)
|
||||
if [ -n "$NVIDIA_MODEL" ]; then
|
||||
echo "🔍 Detected NVIDIA GPU: $NVIDIA_MODEL"
|
||||
GPU_MODEL=$NVIDIA_MODEL
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$NVIDIA_VISIBLE_DEVICES" ]; then
|
||||
echo "ℹ️ NVIDIA_VISIBLE_DEVICES is set to '$NVIDIA_VISIBLE_DEVICES'"
|
||||
else
|
||||
|
|
@ -227,8 +246,10 @@ if [ "$NVIDIA_FOUND" = true ] && (nvidia-smi >/dev/null 2>&1 || [ -n "$NVIDIA_VI
|
|||
echo "⚠️ FFmpeg NVIDIA acceleration: NOT DETECTED"
|
||||
fi
|
||||
elif [ "$DRI_DEVICES_FOUND" = true ]; then
|
||||
# Intel/AMD detection
|
||||
if [ -n "$LIBVA_DRIVER_NAME" ]; then
|
||||
# Intel/AMD detection with model if available
|
||||
if [ -n "$GPU_MODEL" ]; then
|
||||
echo "🔰 GPU: $GPU_MODEL"
|
||||
elif [ -n "$LIBVA_DRIVER_NAME" ]; then
|
||||
echo "🔰 ${LIBVA_DRIVER_NAME^^} GPU: ACTIVE"
|
||||
else
|
||||
echo "🔰 INTEL/AMD GPU: ACTIVE"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue