Skip to content

Commit 066f62c

Browse files
authored
Merge pull request #11 from dermodmaster/fix/vaapi-for-newer-igpus
Build fresh intel libva, gmmlib, media-driver to fix vaapi issues using newer N100, N150 CPUs
2 parents 010248f + 8db4145 commit 066f62c

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

Dockerfile.ubuntu.vaapi

+40-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,19 @@ RUN apt-get update -y && \
2020
openssl \
2121
libssl-dev \
2222
cmake \
23+
automake \
24+
meson \
2325
yasm \
2426
build-essential \
2527
libtool \
2628
autoconf \
29+
xorg \
30+
xorg-dev \
31+
openbox \
32+
libx11-dev \
33+
libgl1 \
34+
libglx-mesa0 \
35+
libdrm-dev \
2736
libv4l-dev \
2837
libva-drm2 \
2938
libva2 \
@@ -53,6 +62,33 @@ RUN apt-get update -y && \
5362
libxcb-shape0-dev \
5463
zlib1g-dev
5564

65+
# Build the newest libva
66+
RUN git clone https://github.com/intel/libva.git /tmp/libva && \
67+
cd /tmp/libva && \
68+
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu && \
69+
make -j$(nproc) && \
70+
make install
71+
72+
# Build the newest gmmlib (dependency for media-driver)
73+
RUN git clone https://github.com/intel/gmmlib.git /tmp/gmmlib && \
74+
cd /tmp/gmmlib && \
75+
mkdir build && cd build && \
76+
cmake -DCMAKE_INSTALL_PREFIX=/usr \
77+
-DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu \
78+
-DCMAKE_BUILD_TYPE=ReleaseInternal .. && \
79+
make -j$(nproc) && \
80+
make install
81+
82+
# Build the newest media-driver
83+
RUN git clone https://github.com/intel/media-driver.git /tmp/media-driver && \
84+
cd /tmp/media-driver && \
85+
mkdir build_media && cd build_media && \
86+
cmake -DCMAKE_INSTALL_PREFIX=/usr \
87+
-DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu \
88+
../ && \
89+
make -j$(nproc) && \
90+
make install
91+
5692
# install and patch ffmpeg
5793
RUN mkdir -p /dist && cd /dist && \
5894
curl -OLk http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \
@@ -105,8 +141,11 @@ FROM $DEPLOY_IMAGE
105141

106142
COPY --from=builder /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
107143
COPY --from=builder /ffmpeglibs /ffmpeglibs
144+
COPY --from=builder /usr/lib/x86_64-linux-gnu usr/lib/x86_64-linux-gnu
108145

109146
ENV DEBIAN_FRONTEND=noninteractive
147+
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
148+
ENV LD_RUN_PATH=/usr/lib/x86_64-linux-gnu
110149

111150
RUN echo "/ffmpeglibs" > /etc/ld.so.conf.d/ffmpeg.conf && \
112151
ldconfig && \
@@ -118,14 +157,11 @@ RUN echo "/ffmpeglibs" > /etc/ld.so.conf.d/ffmpeg.conf && \
118157
fbset \
119158
x265 \
120159
libssl3 \
121-
libva-drm2 \
122-
libva2 \
123160
zlib1g \
124161
i965-va-driver-shaders \
125-
intel-media-va-driver-non-free \
126162
libasound2-dev && \
127163
ffmpeg -buildconf
128164

129165
WORKDIR /tmp
130166
ENTRYPOINT ["/usr/local/bin/ffmpeg"]
131-
CMD ["-version"]
167+
CMD ["-version"]

0 commit comments

Comments
 (0)