mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-23 03:16:40 +08:00
build: 增加硬件编码所需驱动依赖
This commit is contained in:
@@ -12,7 +12,8 @@ ARG TARGETPLATFORM
|
||||
# Install runtime dependencies in a single layer
|
||||
# All codec libraries (libx264, libx265, libopus) are now statically linked
|
||||
# Only hardware acceleration drivers and core system libraries remain dynamic
|
||||
RUN apt-get update && \
|
||||
RUN sed -i 's/ main$/ main contrib non-free/' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
# Core runtime (all platforms) - no codec libs needed
|
||||
ca-certificates \
|
||||
@@ -24,7 +25,8 @@ RUN apt-get update && \
|
||||
# Platform-specific hardware acceleration
|
||||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libva2 libva-drm2 libva-x11-2 libx11-6 libxcb1 libxau6 libxdmcp6 libmfx1; \
|
||||
libva2 libva-drm2 libva-x11-2 libx11-6 libxcb1 libxau6 libxdmcp6 libmfx1 \
|
||||
i965-va-driver-shaders intel-media-va-driver-non-free; \
|
||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libdrm2 libva2; \
|
||||
|
||||
@@ -12,7 +12,8 @@ ARG TARGETPLATFORM
|
||||
# Install runtime dependencies in a single layer
|
||||
# All codec libraries (libx264, libx265, libopus) are now statically linked
|
||||
# Only hardware acceleration drivers and core system libraries remain dynamic
|
||||
RUN apt-get update && \
|
||||
RUN sed -i 's/ main$/ main contrib non-free/' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
# Core runtime (all platforms) - no codec libs needed
|
||||
ca-certificates \
|
||||
@@ -24,7 +25,8 @@ RUN apt-get update && \
|
||||
# Platform-specific hardware acceleration
|
||||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libva2 libva-drm2 libva-x11-2 libx11-6 libxcb1 libxau6 libxdmcp6 libmfx1; \
|
||||
libva2 libva-drm2 libva-x11-2 libx11-6 libxcb1 libxau6 libxdmcp6 libmfx1 \
|
||||
i965-va-driver-shaders intel-media-va-driver-non-free; \
|
||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libdrm2 libva2; \
|
||||
|
||||
@@ -7,6 +7,8 @@ Wants=network-online.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
# Example for older Intel GPUs:
|
||||
# Environment=LIBVA_DRIVER_NAME=i965
|
||||
ExecStart=/usr/bin/one-kvm
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
@@ -126,7 +126,7 @@ EOF
|
||||
|
||||
# Create control file
|
||||
BASE_DEPS="libc6 (>= 2.31), libgcc-s1, libstdc++6, libasound2 (>= 1.1), libdrm2 (>= 2.4)"
|
||||
AMD64_DEPS="libva2 (>= 2.0), libva-drm2 (>= 2.10), libva-x11-2 (>= 2.10), libmfx1 (>= 21.1), libx11-6 (>= 1.6), libxcb1 (>= 1.14)"
|
||||
AMD64_DEPS="libva2 (>= 2.0), libva-drm2 (>= 2.10), libva-x11-2 (>= 2.10), libmfx1 (>= 21.1), libx11-6 (>= 1.6), libxcb1 (>= 1.14), i965-va-driver-shaders (>= 2.4), intel-media-va-driver-non-free (>= 21.1)"
|
||||
DEPS="$BASE_DEPS"
|
||||
if [ "$DEB_ARCH" = "amd64" ]; then
|
||||
DEPS="$DEPS, $AMD64_DEPS"
|
||||
|
||||
Reference in New Issue
Block a user