Update Dockerfile.accelerated_base
All checks were successful
Build-Publish-Multi-Arch / build (linux/arm64) (push) Successful in 3m21s
Build-Publish-Multi-Arch / build (linux/amd64) (push) Successful in 4m48s
Build-Publish-Multi-Arch / create-manifest (push) Successful in 23s

This commit is contained in:
2025-09-27 09:59:26 +12:00
parent 5b01992b33
commit d005721838

View File

@@ -25,8 +25,7 @@ RUN apt-get update && apt-get install -y \
libswscale-dev \
libavdevice-dev \
libavfilter-dev \
# Intel Media SDK dependencies (for QuickSync)
intel-media-va-driver-non-free \
# VA-API libraries (common for both architectures)
vainfo \
libva-dev \
libva-drm2 \
@@ -41,6 +40,19 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install architecture-specific packages
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
# Intel Media SDK dependencies (for QuickSync on x86_64 only)
apt-get update && \
apt-get install -y intel-media-va-driver-non-free && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*; \
elif [ "$ARCH" = "aarch64" ]; then \
# ARM64 may use different video acceleration drivers
echo "ARM64 detected: Using default VA-API drivers"; \
fi
# Install FFmpeg with hardware acceleration support
# Using static build for consistency across architectures
RUN ARCH=$(uname -m) && \
@@ -89,12 +101,20 @@ RUN pip3 install --no-cache-dir \
# Set working directory
WORKDIR /app
# Set environment variables for hardware acceleration
# Note: These are primarily for x86_64 Intel graphics
# ARM64 systems may use different drivers
ENV LIBVA_DRIVER_NAME=iHD
# Set architecture-appropriate driver path (before switching to non-root user)
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
echo "export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri" >> /etc/environment; \
elif [ "$ARCH" = "aarch64" ]; then \
echo "export LIBVA_DRIVERS_PATH=/usr/lib/aarch64-linux-gnu/dri" >> /etc/environment; \
fi
# Switch to non-root user by default
USER appuser
# Set environment variables for hardware acceleration
ENV LIBVA_DRIVER_NAME=iHD
ENV LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
# Default command
CMD ["/bin/bash"]