Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
[master] License Triggered changes from PDT feedback (#768)
Browse files Browse the repository at this point in the history
* Update Docker image README (#704)

* update README

* Update dockerfiles

* ffmpeg/openssl/libvmaf license related changes

* ffmpeg-nonfree change

* restructure gpl flag

* gpl changes for 264/265 properly

* re-add the components needed for 264/265 building & test changes

Co-authored-by: jhou5 <[email protected]>
  • Loading branch information
dpatel257 and jhou5 authored Jul 9, 2021
1 parent 900209c commit e9f8f97
Show file tree
Hide file tree
Showing 125 changed files with 2,235 additions and 1,153 deletions.
80 changes: 30 additions & 50 deletions SG1/centos-7/media/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ RUN cd /opt/build && \
make install DESTDIR=/opt/dist && \
make install

RUN yum install -y wget tar gcc-c++ make libtool autoconf

# build openssl
ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1k.tar.gz
RUN cd /opt/build && \
wget -O - ${OPENSSL_REPO} | tar xz && \
cd openssl-OpenSSL_1_1_1k && \
./config no-ssl3 shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl -fPIC -Wl,-rpath=/usr/local/ssl/lib && \
make depend && \
make -s V=0 && \
make install DESTDIR=/opt/dist && \
(cd /opt/dist && mkdir -p ./usr/local/lib64/pkgconfig && mv ./usr/local/ssl/lib/pkgconfig/*.pc ./usr/local/lib64/pkgconfig/) && \
make install && \
(mkdir -p /usr/local/lib64/pkgconfig && mv /usr/local/ssl/lib/pkgconfig/*.pc /usr/local/lib64/pkgconfig/)

RUN yum install -y wget gcc-c++ autoconf libtool make automake

# build libfdkaac
Expand Down Expand Up @@ -141,18 +156,17 @@ RUN cd /opt/build && \
make install DESTDIR=/opt/dist && \
make install

RUN yum install -y git make autoconf diffutils
RUN yum install -y meson wget tar gcc-c++

# build libx264
ARG LIBX264_REPO=https://github.com/mirror/x264
# build dav1d
ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.0/dav1d-0.9.0.tar.gz
RUN cd /opt/build && \
git clone ${LIBX264_REPO} -b stable --depth 1 && \
cd x264 && \
./configure --prefix=/usr/local --libdir=/usr/local/lib64 \
--enable-shared && \
make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install
wget -O - ${DAV1D_REPO} | tar xz
RUN cd /opt/build/dav1d-0.9.0 && \
meson build --prefix=/usr/local --libdir /usr/local/lib64 --buildtype=plain && \
cd build && \
ninja install && \
DESTDIR=/opt/dist ninja install

RUN yum install -y wget tar gcc-c++ make

Expand All @@ -167,44 +181,6 @@ RUN cd /opt/build/yasm-1.3.0 && \
make -j $(nproc) && \
make install

RUN yum install -y make numactl-devel libpciaccess-devel

# build libx265
ARG LIBX265_REPO=https://github.com/videolan/x265/archive/3.4.tar.gz
RUN cd /opt/build && \
wget -O - ${LIBX265_REPO} | tar xz && \
cd x265-3.4/build/linux && \
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_INSTALL_DIR=/usr/local/lib64 ../../source && \
make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install

RUN yum install -y meson wget tar gcc-c++

# build dav1d
ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.0/dav1d-0.9.0.tar.gz
RUN cd /opt/build && \
wget -O - ${DAV1D_REPO} | tar xz
RUN cd /opt/build/dav1d-0.9.0 && \
meson build --prefix=/usr/local --libdir /usr/local/lib64 --buildtype=plain && \
cd build && \
ninja install && \
DESTDIR=/opt/dist ninja install

RUN yum install -y meson wget tar gcc-c++ ninja-build devtoolset-9

# build VMAF
ARG VMAF_VER=2.1.1
ARG LIBVMAF_REPO=https://github.com/Netflix/vmaf/archive/refs/tags/v${VMAF_VER}.tar.gz
RUN cd /opt/build && \
wget -O - ${LIBVMAF_REPO} | tar xz && ls
RUN cd /opt/build/vmaf-2.1.1/libvmaf && \
ls && \
(. /opt/rh/devtoolset-9/enable && meson build --prefix=/usr/local --libdir /usr/local/lib64 --buildtype=plain && \
cd build && \
ninja install && \
DESTDIR=/opt/dist ninja install )

RUN yum install -y wget tar gcc-c++ make git

# build svt-hevc
Expand Down Expand Up @@ -323,7 +299,8 @@ RUN cd /opt/build/FFmpeg-n4.4 && \
RUN cd /opt/build/FFmpeg-n4.4 && \
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-static --disable-doc --disable-htmlpages \
--disable-manpages --disable-podpages --disable-txtpages \
--extra-cflags=-w --enable-gpl --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libvmaf --enable-version3 --enable-libdav1d && make -j$(nproc) && \
--extra-cflags=-w --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-openssl --extra-ldflags=-Wldnl
--enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -333,6 +310,9 @@ RUN rm -rf /opt/dist/usr/local/include && \
find /opt/dist -name "*.a" -exec rm -f {} \; || echo ""
RUN rm -rf /opt/dist/usr/local/share/doc /opt/dist/usr/local/share/gtk-doc
RUN rm -rf /opt/dist/usr/local/share/man
RUN rm -rf /opt/dist/usr/local/ssl/include
RUN rm -rf /opt/dist/usr/local/ssl/share/man
RUN rm -rf /opt/dist/usr/local/ssl/share/doc

FROM centos:7
LABEL Description="This is the image for FFMPEG and Gstreamer application for media development on centos 7"
Expand All @@ -343,7 +323,7 @@ RUN yum install -y -q epel-release && rm -rf /var/yum/cache/*


# Install
RUN yum install -y bash numactl-libs libpciaccess libdrm libX11 libXfixes libXext libwayland-client libv4l libass
RUN yum install -y bash libdrm libX11 libXfixes libXext libwayland-client libv4l libass

COPY --from=build /opt/dist /
RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig
Expand Down
4 changes: 1 addition & 3 deletions SG1/centos-7/media/dev/Dockerfile.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ include(centos-repo.m4)
include(cmake.m4)
include(libogg.m4)
include(libvorbis.m4)
include(openssl.m4)
ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)')
include(libopus.m4)
include(libvpx.m4)
include(libaom.m4)
include(libx264.m4)
include(libx265.m4)
include(dav1d.m4)
include(libvmaf.m4)
include(svt-hevc.m4)
include(svt-av1.m4)
include(svt-vp9.m4)
Expand Down
16 changes: 1 addition & 15 deletions SG1/centos-7/media/ffmpeg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,6 @@ RUN cd /opt/build/dav1d-0.9.0 && \
ninja install && \
DESTDIR=/opt/dist ninja install

RUN yum install -y meson wget tar gcc-c++ ninja-build devtoolset-9

# build VMAF
ARG VMAF_VER=2.1.1
ARG LIBVMAF_REPO=https://github.com/Netflix/vmaf/archive/refs/tags/v${VMAF_VER}.tar.gz
RUN cd /opt/build && \
wget -O - ${LIBVMAF_REPO} | tar xz && ls
RUN cd /opt/build/vmaf-2.1.1/libvmaf && \
ls && \
(. /opt/rh/devtoolset-9/enable && meson build --prefix=/usr/local --libdir /usr/local/lib64 --buildtype=plain && \
cd build && \
ninja install && \
DESTDIR=/opt/dist ninja install )

RUN yum install -y wget tar gcc-c++ make git

# build svt-hevc
Expand Down Expand Up @@ -333,7 +319,7 @@ RUN cd /opt/build/FFmpeg-n4.4 && \
RUN cd /opt/build/FFmpeg-n4.4 && \
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-static --disable-doc --disable-htmlpages \
--disable-manpages --disable-podpages --disable-txtpages \
--extra-cflags=-w --enable-gpl --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libvmaf --enable-version3 --enable-libdav1d && make -j$(nproc) && \
--extra-cflags=-w --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 -rpath=/usr/local/ssl/lib --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libdav1d && make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install

Expand Down
1 change: 0 additions & 1 deletion SG1/centos-7/media/ffmpeg/Dockerfile.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include(libvpx.m4)
include(libx264.m4)
include(libx265.m4)
include(dav1d.m4)
include(libvmaf.m4)
include(svt-hevc.m4)
include(svt-av1.m4)
include(svt-vp9.m4)
Expand Down
94 changes: 34 additions & 60 deletions SG1/ubuntu-18.04/media/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,24 @@ RUN cd /opt/build && \
make install DESTDIR=/opt/dist && \
make install

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates wget tar g++ make libtool autoconf && \
rm -rf /var/lib/apt/lists/*

# build openssl
ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1k.tar.gz
RUN cd /opt/build && \
wget -O - ${OPENSSL_REPO} | tar xz && \
cd openssl-OpenSSL_1_1_1k && \
./config no-ssl3 shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl -fPIC -Wl,-rpath=/usr/local/ssl/lib && \
make depend && \
make -s V=0 && \
make install DESTDIR=/opt/dist && \
(cd /opt/dist && mkdir -p ./usr/local/lib/pkgconfig && mv ./usr/local/ssl/lib/pkgconfig/*.pc ./usr/local/lib/pkgconfig/) && \
make install && \
(mkdir -p /usr/local/lib/pkgconfig && mv /usr/local/ssl/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/)

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates wget g++ autoconf libtool autotools-dev automake make && \
Expand Down Expand Up @@ -148,53 +166,6 @@ RUN cd /opt/build && \
make install DESTDIR=/opt/dist && \
make install

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git cmake make autoconf && \
rm -rf /var/lib/apt/lists/*

# build libx264
ARG LIBX264_REPO=https://github.com/mirror/x264
RUN cd /opt/build && \
git clone ${LIBX264_REPO} -b stable --depth 1 && \
cd x264 && \
./configure --prefix=/usr/local --libdir=/usr/local/lib \
--enable-shared && \
make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates wget tar g++ make && \
rm -rf /var/lib/apt/lists/*

# build yasm
ARG YASM_REPO=https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
RUN cd /opt/build && \
wget -O - ${YASM_REPO} | tar xz
RUN cd /opt/build/yasm-1.3.0 && \
# TODO remove the line below whether no other component inside this project requires it.
# `sed -i "s/) ytasm.*/)/" Makefile.in' && \
./configure --prefix=/usr/local --libdir=/usr/local/lib && \
make -j $(nproc) && \
make install

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libnuma-dev cmake make && \
rm -rf /var/lib/apt/lists/*

# build libx265
ARG LIBX265_REPO=https://github.com/videolan/x265/archive/3.4.tar.gz
RUN cd /opt/build && \
wget -O - ${LIBX265_REPO} | tar xz && \
cd x265-3.4/build/linux && \
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_INSTALL_DIR=/usr/local/lib ../../source && \
make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip ninja-build python3-setuptools && \
Expand Down Expand Up @@ -224,20 +195,19 @@ RUN cd /opt/build/dav1d-0.9.0 && \

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates tar g++ wget pkg-config ninja-build && \
ca-certificates wget tar g++ make && \
rm -rf /var/lib/apt/lists/*

# build VMAF
ARG VMAF_VER=2.1.1
ARG LIBVMAF_REPO=https://github.com/Netflix/vmaf/archive/refs/tags/v${VMAF_VER}.tar.gz
# build yasm
ARG YASM_REPO=https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
RUN cd /opt/build && \
wget -O - ${LIBVMAF_REPO} | tar xz && ls
RUN cd /opt/build/vmaf-2.1.1/libvmaf && \
ls && \
meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \
cd build && \
ninja install && \
DESTDIR=/opt/dist ninja install
wget -O - ${YASM_REPO} | tar xz
RUN cd /opt/build/yasm-1.3.0 && \
# TODO remove the line below whether no other component inside this project requires it.
# `sed -i "s/) ytasm.*/)/" Makefile.in' && \
./configure --prefix=/usr/local --libdir=/usr/local/lib && \
make -j $(nproc) && \
make install

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -381,7 +351,8 @@ RUN cd /opt/build/FFmpeg-n4.4 && \
RUN cd /opt/build/FFmpeg-n4.4 && \
./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-static --disable-doc --disable-htmlpages \
--disable-manpages --disable-podpages --disable-txtpages \
--extra-cflags=-w --enable-gpl --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libvmaf --enable-version3 --enable-libdav1d && make -j$(nproc) && \
--extra-cflags=-w --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-openssl --extra-ldflags=-Wldnl
--enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && make -j$(nproc) && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -391,6 +362,9 @@ RUN rm -rf /opt/dist/usr/local/include && \
find /opt/dist -name "*.a" -exec rm -f {} \; || echo ""
RUN rm -rf /opt/dist/usr/local/share/doc /opt/dist/usr/local/share/gtk-doc
RUN rm -rf /opt/dist/usr/local/share/man
RUN rm -rf /opt/dist/usr/local/ssl/include
RUN rm -rf /opt/dist/usr/local/ssl/share/man
RUN rm -rf /opt/dist/usr/local/ssl/share/doc

FROM ubuntu:18.04
LABEL Description="This is the base image for Gstreamer ubuntu 18.04"
Expand All @@ -401,7 +375,7 @@ WORKDIR /home
RUN apt-get update && apt-get upgrade -y systemd
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libnuma1 libdrm2 libx11-6 libxext6 libxfixes3 libwayland-client0 libpciaccess0 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \
libdrm2 libx11-6 libxext6 libxfixes3 libwayland-client0 libpciaccess0 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \
rm -rf /var/lib/apt/lists/*

COPY --from=build /opt/dist /
Expand Down
4 changes: 1 addition & 3 deletions SG1/ubuntu-18.04/media/dev/Dockerfile.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ include(begin.m4)
include(ubuntu.m4)
include(libogg.m4)
include(libvorbis.m4)
include(openssl.m4)
ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)')
include(libopus.m4)
include(libvpx.m4)
include(libaom.m4)
include(libx264.m4)
include(libx265.m4)
include(meson.m4)
include(dav1d.m4)
include(libvmaf.m4)
include(svt-hevc.m4)
include(svt-av1.m4)
include(svt-vp9.m4)
Expand Down
4 changes: 4 additions & 0 deletions SG1/ubuntu-18.04/media/ffmpeg-vmaf/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CMakeLists.txt
*.sh
*.m4
test/*
3 changes: 3 additions & 0 deletions SG1/ubuntu-18.04/media/ffmpeg-vmaf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(image "sg1_ffmpeg_vmaf_ubuntu1804")
include(image)
include(ffmpeg-tests)
Loading

0 comments on commit e9f8f97

Please sign in to comment.