Skip to content

Commit

Permalink
Updated dependecies for the next release
Browse files Browse the repository at this point in the history
  • Loading branch information
asenyaev committed May 27, 2022
1 parent 056f900 commit c7fcc7f
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
MB_ML_VER: 2014
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
PLAT: x86_64
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
NP_TEST_DEP: numpy==1.19.4
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_wheels_linux_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ARM64]
os: [opencv-cn-lin-arm64 ]
python-version: ['3.6']
platform: [x64]
with_contrib: [0, 1]
Expand All @@ -40,7 +40,7 @@ jobs:
MB_ML_VER: 2014
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
USE_CCACHE: 0
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ARM64]
os: [opencv-cn-lin-arm64 ]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
Expand Down
51 changes: 37 additions & 14 deletions docker/manylinux2014/Dockerfile_aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,54 @@ FROM quay.io/pypa/manylinux2014_aarch64:latest

ARG CCACHE_VERSION=3.7.9
ARG FFMPEG_VERSION=4.4.1
ARG FREETYPE_VERSION=2.12.1
ARG LIBPNG_VERSION=1.6.37
ARG NASM_VERSION=2.15.04
ARG OPENSSL_VERSION=1_1_1m
ARG OPENSSL_VERSION=1_1_1o
ARG QT_VERSION=5.15.0
ARG YASM_VERSION=1.3.0

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
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH

# epel-release need for aarch64 to get openblas packages
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 && \
yum install openblas-devel -y && \
cp /usr/include/lapacke/lapacke*.h /usr/include/ && \
curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h && \
# libpng will be built from source
yum remove libpng -y

RUN mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
curl -O -L https://download.sourceforge.net/libpng/libpng-${LIBPNG_VERSION}.tar.gz && \
tar -xf libpng-${LIBPNG_VERSION}.tar.gz && \
cd libpng-${LIBPNG_VERSION} && \
./configure --prefix=/usr/local && \
make && \
make install

RUN cd ~/ffmpeg_sources && \
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
cd freetype-${FREETYPE_VERSION} && \
./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
make && \
make install

RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \
cd qt-everywhere* && \
cd qt-everywhere-src-${QT_VERSION} && \
export MAKEFLAGS=-j$(nproc) && \
./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 && \
make && \
make install && \
cd .. && \
rm -rf qt-everywhere-src-${QT_VERSION} && \
rm qt-everywhere-src-${QT_VERSION}.tar.xz
rm -rf qt-everywhere*

ENV QTDIR /opt/Qt${QT_VERSION}
ENV PATH "$QTDIR/bin:$PATH"

RUN mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
RUN cd ~/ffmpeg_sources && \
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
Expand All @@ -50,7 +75,7 @@ RUN cd ~/ffmpeg_sources && \
make install

RUN cd ~/ffmpeg_sources && \
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
git clone --depth 1 https://github.com/webmproject/libvpx.git && \
cd libvpx && \
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
make -j$(getconf _NPROCESSORS_ONLN) && \
Expand All @@ -66,14 +91,12 @@ RUN cd ~/ffmpeg_sources && \
make install && \
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
ldconfig && \
yum remove bzip2-devel -y && \
rm -rf ~/ffmpeg_sources

RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz && \
tar -xf ccache-${CCACHE_VERSION}.tar.gz && \
cd ccache-${CCACHE_VERSION} && \
linux32 ./configure && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install
# Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
RUN mkdir /io && \
git config --global --add safe.directory /io

ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/root/ffmpeg_build/lib
Expand Down
44 changes: 37 additions & 7 deletions docker/manylinux2014/Dockerfile_x86_64
Original file line number Diff line number Diff line change
@@ -1,29 +1,54 @@
FROM quay.io/pypa/manylinux2014_x86_64:latest

ARG FFMPEG_VERSION=4.4.1
ARG FREETYPE_VERSION=2.12.1
ARG LIBPNG_VERSION=1.6.37
ARG NASM_VERSION=2.15.04
ARG OPENSSL_VERSION=1_1_1m
ARG OPENSSL_VERSION=1_1_1o
ARG QT_VERSION=5.15.0
ARG YASM_VERSION=1.3.0

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
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH

# epel-release need for aarch64 to get openblas packages
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 && \
yum install openblas-devel -y && \
cp /usr/include/lapacke/lapacke*.h /usr/include/ && \
curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h && \
# libpng will be built from source
yum remove libpng -y

RUN mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
curl -O -L https://download.sourceforge.net/libpng/libpng-${LIBPNG_VERSION}.tar.gz && \
tar -xf libpng-${LIBPNG_VERSION}.tar.gz && \
cd libpng-${LIBPNG_VERSION} && \
./configure --prefix=/usr/local && \
make && \
make install

RUN cd ~/ffmpeg_sources && \
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
cd freetype-${FREETYPE_VERSION} && \
./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
make && \
make install

RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \
cd qt-everywhere* && \
cd qt-everywhere-src-${QT_VERSION} && \
export MAKEFLAGS=-j$(nproc) && \
./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 && \
make && \
make install && \
cd .. && \
rm -rf qt-everywhere-src-${QT_VERSION} && \
rm qt-everywhere-src-${QT_VERSION}.tar.xz
rm -rf qt-everywhere*

ENV QTDIR /opt/Qt${QT_VERSION}
ENV PATH "$QTDIR/bin:$PATH"

RUN mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
RUN cd ~/ffmpeg_sources && \
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
Expand Down Expand Up @@ -65,8 +90,13 @@ RUN cd ~/ffmpeg_sources && \
make install && \
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
ldconfig && \
yum remove bzip2-devel -y && \
rm -rf ~/ffmpeg_sources

# Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
RUN mkdir /io && \
git config --global --add safe.directory /io

ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/root/ffmpeg_build/lib
ENV PATH "$HOME/bin:$PATH"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def main():
"-DBUILD_DOCS=OFF",
"-DPYTHON3_LIMITED_API=ON",
"-DBUILD_OPENEXR=ON",
"-DBUILD_PNG=ON",
"-DBUILD_ZLIB=ON",
]
+ (
# If it is not defined 'linker flags: /machine:X86' on Windows x64
Expand Down
5 changes: 0 additions & 5 deletions travis_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ function pre_build {

if [ -n "$IS_OSX" ]; then
brew install lapack
else
# epel-release need for aarch64 to get openblas packages
yum install -y lapack-devel epel-release && yum install -y openblas-devel
cp /usr/include/lapacke/lapacke*.h /usr/include/
curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h
fi

if [ -n "$IS_OSX" ]; then
Expand Down

0 comments on commit c7fcc7f

Please sign in to comment.