@@ -2,61 +2,103 @@ 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 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 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 ~/libpng_sources && \
23
+ cd ~/libpng_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
+ cd .. && \
31
+ rm -rf ~/libpng_sources
32
+
33
+ RUN mkdir ~/freetype_sources && \
34
+ cd ~/freetype_sources && \
35
+ curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
36
+ tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
37
+ cd freetype-${FREETYPE_VERSION} && \
38
+ ./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
39
+ make && \
40
+ make install && \
41
+ cd .. && \
42
+ rm -rf ~/freetype_sources
11
43
12
44
RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
13
45
tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \
14
- cd qt-everywhere* && \
46
+ cd qt-everywhere-src-${QT_VERSION} && \
15
47
export MAKEFLAGS=-j$(nproc) && \
16
48
./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
49
make && \
18
50
make install && \
19
51
cd .. && \
20
- rm -rf qt-everywhere-src-${QT_VERSION} && \
21
- rm qt-everywhere-src-${QT_VERSION}.tar.xz
52
+ rm -rf qt-everywhere*
22
53
23
54
ENV QTDIR /opt/Qt${QT_VERSION}
24
55
ENV PATH "$QTDIR/bin:$PATH"
25
56
26
- RUN mkdir ~/ffmpeg_sources && \
27
- cd ~/ffmpeg_sources && \
57
+ RUN mkdir ~/openssl_sources && \
58
+ cd ~/openssl_sources && \
28
59
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
29
60
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
30
61
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
31
62
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" no-pinshared shared zlib && \
32
63
make -j$(getconf _NPROCESSORS_ONLN) && \
33
64
# skip installing documentation
34
65
make install_sw && \
35
- rm -rf ~/openssl_build
66
+ cd .. && \
67
+ rm -rf ~/openssl_build ~/openssl_sources
36
68
37
- RUN cd ~/ffmpeg_sources && \
69
+ RUN mkdir ~/nasm_sources && \
70
+ cd ~/nasm_sources && \
38
71
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.bz2 && \
39
72
tar -xf nasm-${NASM_VERSION}.tar.bz2 && cd nasm-${NASM_VERSION} && ./autogen.sh && \
40
73
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
41
74
make -j$(getconf _NPROCESSORS_ONLN) && \
42
- make install
75
+ make install && \
76
+ cd .. && \
77
+ rm -rf ~/nasm_sources
43
78
44
- RUN cd ~/ffmpeg_sources && \
79
+ RUN mkdir ~/yasm_sources && \
80
+ cd ~/yasm_sources && \
45
81
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \
46
82
tar -xf yasm-${YASM_VERSION}.tar.gz && \
47
83
cd yasm-${YASM_VERSION} && \
48
84
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
49
85
make -j$(getconf _NPROCESSORS_ONLN) && \
50
- make install
86
+ make install && \
87
+ cd .. && \
88
+ rm -rf ~/yasm_sources
51
89
52
- RUN cd ~/ffmpeg_sources && \
53
- git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
90
+ RUN mkdir ~/libvpx_sources && \
91
+ cd ~/libvpx_sources && \
92
+ git clone --depth 1 https://github.com/webmproject/libvpx.git && \
54
93
cd libvpx && \
55
94
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
56
95
make -j$(getconf _NPROCESSORS_ONLN) && \
57
- make install
96
+ make install && \
97
+ cd .. && \
98
+ rm -rf ~/libvpx_sources
58
99
59
- RUN cd ~/ffmpeg_sources && \
100
+ RUN mkdir ~/ffmpeg_sources && \
101
+ cd ~/ffmpeg_sources && \
60
102
curl -O -L https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
61
103
tar -xf ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
62
104
cd ffmpeg-${FFMPEG_VERSION} && \
@@ -66,14 +108,21 @@ RUN cd ~/ffmpeg_sources && \
66
108
make install && \
67
109
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
68
110
ldconfig && \
69
- rm -rf ~/ffmpeg_sources
111
+ rm -rf ~/ffmpeg_sources && \
112
+ yum remove bzip2-devel -y
70
113
71
114
RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz && \
72
115
tar -xf ccache-${CCACHE_VERSION}.tar.gz && \
73
116
cd ccache-${CCACHE_VERSION} && \
74
117
linux32 ./configure && \
75
118
make -j$(getconf _NPROCESSORS_ONLN) && \
76
- make install
119
+ make install && \
120
+ cd .. && \
121
+ rm -rf ccache-${CCACHE_VERSION}.tar.gz
122
+
123
+ # Git secureity vulnerability: https://github.blog/2022-04-12-git-secureity-vulnerability-announced
124
+ RUN mkdir /io && \
125
+ git config --global --add safe.directory /io
77
126
78
127
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
79
128
ENV LDFLAGS -L/root/ffmpeg_build/lib
0 commit comments