@@ -2,29 +2,54 @@ FROM quay.io/pypa/manylinux2014_aarch64:latest
2
2
3
3
ARG CCACHE_VERSION=3.7.9
4
4
ARG FFMPEG_VERSION=4.4.1
5
+ ARG FREETYPE_VERSION=2.12.1
6
+ ARG LIBPNG_VERSION=1.6.37
5
7
ARG NASM_VERSION=2.15.04
6
- ARG OPENSSL_VERSION=1_1_1m
8
+ ARG OPENSSL_VERSION=1_1_1o
7
9
ARG QT_VERSION=5.15.0
8
10
ARG YASM_VERSION=1.3.0
9
11
10
- RUN yum install bzip2-devel curl-devel zlib-devel xcb-util-renderutil-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel libXi-devel freetype-devel -y
12
+ ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
13
+
14
+ # epel-release need for aarch64 to get openblas packages
15
+ RUN yum install bzip2-devel curl-devel xcb-util-renderutil-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel libXi-devel lapack-devel epel-release -y && \
16
+ yum install openblas-devel -y && \
17
+ cp /usr/include/lapacke/lapacke*.h /usr/include/ && \
18
+ curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h && \
19
+ # libpng will be built from source
20
+ yum remove libpng -y
21
+
22
+ RUN mkdir ~/ffmpeg_sources && \
23
+ cd ~/ffmpeg_sources && \
24
+ curl -O -L https://download.sourceforge.net/libpng/libpng-${LIBPNG_VERSION}.tar.gz && \
25
+ tar -xf libpng-${LIBPNG_VERSION}.tar.gz && \
26
+ cd libpng-${LIBPNG_VERSION} && \
27
+ ./configure --prefix=/usr/local && \
28
+ make && \
29
+ make install
30
+
31
+ RUN cd ~/ffmpeg_sources && \
32
+ curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
33
+ tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
34
+ cd freetype-${FREETYPE_VERSION} && \
35
+ ./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
36
+ make && \
37
+ make install
11
38
12
39
RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
13
40
tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \
14
- cd qt-everywhere* && \
41
+ cd qt-everywhere-src-${QT_VERSION} && \
15
42
export MAKEFLAGS=-j$(nproc) && \
16
43
./configure -prefix /opt/Qt${QT_VERSION} -release -opensource -confirm-license -qtnamespace QtOpenCVPython -xcb -xcb-xlib -bundled-xcb-xinput -no-openssl -no-dbus -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtqa -skip qtremoteobjects -skip qtrepotools -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip xmlpatterns -skip declarative -make libs && \
17
44
make && \
18
45
make install && \
19
46
cd .. && \
20
- rm -rf qt-everywhere-src-${QT_VERSION} && \
21
- rm qt-everywhere-src-${QT_VERSION}.tar.xz
47
+ rm -rf qt-everywhere*
22
48
23
49
ENV QTDIR /opt/Qt${QT_VERSION}
24
50
ENV PATH "$QTDIR/bin:$PATH"
25
51
26
- RUN mkdir ~/ffmpeg_sources && \
27
- cd ~/ffmpeg_sources && \
52
+ RUN cd ~/ffmpeg_sources && \
28
53
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
29
54
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
30
55
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
@@ -50,7 +75,7 @@ RUN cd ~/ffmpeg_sources && \
50
75
make install
51
76
52
77
RUN cd ~/ffmpeg_sources && \
53
- git clone --depth 1 https://chromium.googlesource. com/webm /libvpx.git && \
78
+ git clone --depth 1 https://github. com/webmproject /libvpx.git && \
54
79
cd libvpx && \
55
80
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
56
81
make -j$(getconf _NPROCESSORS_ONLN) && \
@@ -66,6 +91,7 @@ RUN cd ~/ffmpeg_sources && \
66
91
make install && \
67
92
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
68
93
ldconfig && \
94
+ yum remove bzip2-devel -y && \
69
95
rm -rf ~/ffmpeg_sources
70
96
71
97
RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz && \
@@ -75,6 +101,10 @@ RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERS
75
101
make -j$(getconf _NPROCESSORS_ONLN) && \
76
102
make install
77
103
104
+ # Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
105
+ RUN mkdir /io && \
106
+ git config --global --add safe.directory /io
107
+
78
108
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
79
109
ENV LDFLAGS -L/root/ffmpeg_build/lib
80
110
ENV PATH "$HOME/bin:$PATH"
0 commit comments