Add pciutils for better hardware detection.

This commit is contained in:
SergeantPanda 2025-05-09 20:06:28 -05:00
parent 2ddc6beb15
commit 23b678bb03
2 changed files with 24 additions and 3 deletions

View file

@ -14,7 +14,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
python3.13 python3.13-dev python3.13-venv \ python3.13 python3.13-dev python3.13-venv \
python-is-python3 python3-pip \ python-is-python3 python3-pip \
libpcre3 libpcre3-dev libpq-dev procps \ libpcre3 libpcre3-dev libpq-dev procps \
build-essential gcc \ build-essential gcc pciutils \
nginx streamlink \ nginx streamlink \
&& apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get clean && rm -rf /var/lib/apt/lists/*

View file

@ -151,6 +151,16 @@ done
# Give contextual suggestions based on detected hardware # Give contextual suggestions based on detected hardware
if [ "$DRI_DEVICES_FOUND" = true ]; then 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 if [ -n "$LIBVA_DRIVER_NAME" ]; then
echo " LIBVA_DRIVER_NAME is set to '$LIBVA_DRIVER_NAME'" echo " LIBVA_DRIVER_NAME is set to '$LIBVA_DRIVER_NAME'"
else else
@ -180,6 +190,15 @@ if [ "$DRI_DEVICES_FOUND" = true ]; then
fi fi
if [ "$NVIDIA_FOUND" = true ]; then 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 if [ -n "$NVIDIA_VISIBLE_DEVICES" ]; then
echo " NVIDIA_VISIBLE_DEVICES is set to '$NVIDIA_VISIBLE_DEVICES'" echo " NVIDIA_VISIBLE_DEVICES is set to '$NVIDIA_VISIBLE_DEVICES'"
else else
@ -227,8 +246,10 @@ if [ "$NVIDIA_FOUND" = true ] && (nvidia-smi >/dev/null 2>&1 || [ -n "$NVIDIA_VI
echo "⚠️ FFmpeg NVIDIA acceleration: NOT DETECTED" echo "⚠️ FFmpeg NVIDIA acceleration: NOT DETECTED"
fi fi
elif [ "$DRI_DEVICES_FOUND" = true ]; then elif [ "$DRI_DEVICES_FOUND" = true ]; then
# Intel/AMD detection # Intel/AMD detection with model if available
if [ -n "$LIBVA_DRIVER_NAME" ]; then if [ -n "$GPU_MODEL" ]; then
echo "🔰 GPU: $GPU_MODEL"
elif [ -n "$LIBVA_DRIVER_NAME" ]; then
echo "🔰 ${LIBVA_DRIVER_NAME^^} GPU: ACTIVE" echo "🔰 ${LIBVA_DRIVER_NAME^^} GPU: ACTIVE"
else else
echo "🔰 INTEL/AMD GPU: ACTIVE" echo "🔰 INTEL/AMD GPU: ACTIVE"