From eef8e7fe4b844b03aa565f523bb41a2f94128ab2 Mon Sep 17 00:00:00 2001 From: kefeiyao Date: Thu, 9 Mar 2023 13:14:02 +0800 Subject: [PATCH] Merge ATSM related changes and affected templates (#816) * Update Docker image README (#704) * update README * Update dockerfiles * Doc changes for 21.6 * push dockerfiles remaining changes * README version changes for 21.6 * owt related fixes * ATSM SG2 dockerfiles WIP * ATSM Media-ffmpeg images * working ubuntu2204 changes * updated atsm media stack to media delivery v3 release * ATSM MA Stack * SG1 images changes * Merge in removal & SG1 changes * Merge in removal of 1804 * QAT changes * OWT changes * M4 Changes * revert shell RW perm * deleting c7 files * removing scratch files * Update Copyright notice * Sg2 readme file * test case changes * remove VCACA tests and some template changes * added ATSm tests & some test changes * openssl removal and some template changes * Bug fixes 1) Skip qsv tests for CPU only platforms 2) Correct a typo * include 'gst-libav.m4' to support testcase 'gst_x264' and 'gst_video_analytics' * Update README.md files --------- Co-authored-by: jhou5 Co-authored-by: Patel, Dhaval R Co-authored-by: Yulong Li --- QAT/centos-7/CMakeLists.txt | 3 - QAT/centos-7/media/dev/.gitignore | 1 - QAT/centos-7/media/dev/CMakeLists.txt | 6 - QAT/centos-7/media/dev/Dockerfile.m4 | 33 - QAT/centos-7/media/dev/README.md | 57 -- QAT/centos-7/media/dev/build.sh | 6 - QAT/centos-7/media/dev/nginx.conf | 176 ----- QAT/centos-7/media/dev/shell.sh | 6 - QAT/centos-7/media/nginx/.gitignore | 1 - QAT/centos-7/media/nginx/CMakeLists.txt | 6 - QAT/centos-7/media/nginx/Dockerfile.m4 | 30 - QAT/centos-7/media/nginx/README.md | 51 -- QAT/centos-7/media/nginx/build.sh | 6 - QAT/centos-7/media/nginx/nginx.conf | 176 ----- QAT/centos-7/media/nginx/shell.sh | 6 - QAT/centos-7/media/nginx_sw/.gitignore | 1 - QAT/centos-7/media/nginx_sw/CMakeLists.txt | 5 - QAT/centos-7/media/nginx_sw/Dockerfile.m4 | 32 - QAT/centos-7/media/nginx_sw/README.md | 52 -- QAT/centos-7/media/nginx_sw/build.sh | 6 - QAT/centos-7/media/nginx_sw/nginx.conf | 176 ----- QAT/centos-7/media/nginx_sw/shell.sh | 6 - QAT/ubuntu-20.04/media/dev/Dockerfile | 9 +- QAT/ubuntu-20.04/media/nginx/Dockerfile | 9 +- QAT/ubuntu-20.04/media/nginx_sw/Dockerfile | 9 +- README.md | 7 +- SG1/centos-7/media/dev/Dockerfile | 63 +- SG1/centos-7/media/dev/Dockerfile.m4 | 1 - SG1/centos-7/media/ffmpeg/Dockerfile | 73 +- SG1/ubuntu-20.04/media/dev/Dockerfile | 66 +- SG1/ubuntu-20.04/media/dev/Dockerfile.m4 | 1 - SG1/ubuntu-20.04/media/ffmpeg/Dockerfile | 73 +- SG1/ubuntu-22.04/CMakeLists.txt | 3 + .../ubuntu-22.04}/media/CMakeLists.txt | 0 SG1/ubuntu-22.04/media/dev/CMakeLists.txt | 3 + SG1/ubuntu-22.04/media/dev/Dockerfile | 360 +++++++++ SG1/ubuntu-22.04/media/dev/Dockerfile.m4 | 35 + SG1/ubuntu-22.04/media/dev/README.md | 46 ++ .../ubuntu-22.04}/media/dev/build.sh | 2 +- .../ubuntu-22.04/media/dev}/shell.sh | 2 +- .../ubuntu-22.04}/media/ffmpeg/.dockerignore | 0 .../ubuntu-22.04}/media/ffmpeg/CMakeLists.txt | 2 +- SG1/ubuntu-22.04/media/ffmpeg/Dockerfile | 406 ++++++++++ SG1/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 | 37 + SG1/ubuntu-22.04/media/ffmpeg/README.md | 47 ++ .../ubuntu-22.04/media/ffmpeg}/build.sh | 2 +- .../ubuntu-22.04/media/ffmpeg}/shell.sh | 2 +- SG2/CMakeLists.txt | 2 + SG2/README.md | 18 + SG2/ubuntu-20.04/CMakeLists.txt | 3 + .../ubuntu-20.04}/analytics/CMakeLists.txt | 0 .../analytics/dev}/CMakeLists.txt | 2 +- SG2/ubuntu-20.04/analytics/dev/Dockerfile | 716 +++++++++++++++++ SG2/ubuntu-20.04/analytics/dev/Dockerfile.m4 | 46 ++ .../ubuntu-20.04/analytics/dev}/README.md | 6 +- SG2/ubuntu-20.04/analytics/dev/build.sh | 6 + SG2/ubuntu-20.04/analytics/dev/shell.sh | 6 + SG2/ubuntu-20.04/analytics/gst/CMakeLists.txt | 4 + SG2/ubuntu-20.04/analytics/gst/Dockerfile | 720 ++++++++++++++++++ SG2/ubuntu-20.04/analytics/gst/Dockerfile.m4 | 46 ++ SG2/ubuntu-20.04/analytics/gst/README.md | 56 ++ SG2/ubuntu-20.04/analytics/gst/build.sh | 6 + SG2/ubuntu-20.04/analytics/gst/shell.sh | 6 + .../ubuntu-20.04}/media/CMakeLists.txt | 0 SG2/ubuntu-20.04/media/dev/CMakeLists.txt | 3 + SG2/ubuntu-20.04/media/dev/Dockerfile | 420 ++++++++++ SG2/ubuntu-20.04/media/dev/Dockerfile.m4 | 37 + SG2/ubuntu-20.04/media/dev/README.md | 46 ++ .../ubuntu-20.04/media/dev}/build.sh | 2 +- .../ubuntu-20.04}/media/dev/shell.sh | 2 +- .../ubuntu-20.04/media/ffmpeg}/.dockerignore | 0 SG2/ubuntu-20.04/media/ffmpeg/CMakeLists.txt | 3 + SG2/ubuntu-20.04/media/ffmpeg/Dockerfile | 436 +++++++++++ SG2/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 | 38 + SG2/ubuntu-20.04/media/ffmpeg/README.md | 47 ++ .../ubuntu-20.04/media/ffmpeg}/build.sh | 2 +- .../ubuntu-20.04/media/ffmpeg}/shell.sh | 2 +- SG2/ubuntu-22.04/CMakeLists.txt | 3 + .../ubuntu-22.04/analytics}/CMakeLists.txt | 0 SG2/ubuntu-22.04/analytics/dev/CMakeLists.txt | 4 + SG2/ubuntu-22.04/analytics/dev/Dockerfile | 716 +++++++++++++++++ SG2/ubuntu-22.04/analytics/dev/Dockerfile.m4 | 46 ++ SG2/ubuntu-22.04/analytics/dev/README.md | 56 ++ SG2/ubuntu-22.04/analytics/dev/build.sh | 6 + SG2/ubuntu-22.04/analytics/dev/shell.sh | 6 + SG2/ubuntu-22.04/analytics/gst/CMakeLists.txt | 4 + SG2/ubuntu-22.04/analytics/gst/Dockerfile | 720 ++++++++++++++++++ SG2/ubuntu-22.04/analytics/gst/Dockerfile.m4 | 46 ++ SG2/ubuntu-22.04/analytics/gst/README.md | 56 ++ SG2/ubuntu-22.04/analytics/gst/build.sh | 6 + SG2/ubuntu-22.04/analytics/gst/shell.sh | 6 + SG2/ubuntu-22.04/media/CMakeLists.txt | 1 + SG2/ubuntu-22.04/media/dev/CMakeLists.txt | 3 + SG2/ubuntu-22.04/media/dev/Dockerfile | 420 ++++++++++ SG2/ubuntu-22.04/media/dev/Dockerfile.m4 | 37 + SG2/ubuntu-22.04/media/dev/README.md | 46 ++ .../ubuntu-22.04/media/dev}/build.sh | 2 +- .../ubuntu-22.04/media/dev}/shell.sh | 2 +- .../ubuntu-22.04/media/ffmpeg}/.dockerignore | 0 SG2/ubuntu-22.04/media/ffmpeg/CMakeLists.txt | 3 + SG2/ubuntu-22.04/media/ffmpeg/Dockerfile | 436 +++++++++++ SG2/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 | 38 + SG2/ubuntu-22.04/media/ffmpeg/README.md | 47 ++ SG2/ubuntu-22.04/media/ffmpeg/build.sh | 6 + SG2/ubuntu-22.04/media/ffmpeg/shell.sh | 6 + Xeon/centos-7/CMakeLists.txt | 3 - Xeon/centos-7/media/nginx/CMakeLists.txt | 4 - Xeon/centos-7/media/srs/CMakeLists.txt | 4 - Xeon/centos-7/media/srs/shell.sh | 6 - Xeon/centos-7/media/svt/build.sh | 6 - Xeon/centos-7/media/svt/shell.sh | 6 - Xeon/centos-7/service/owt-dev/CMakeLists.txt | 3 - Xeon/centos-7/service/owt-dev/Dockerfile.m4 | 45 -- Xeon/centos-7/service/owt-dev/README.md | 49 -- Xeon/centos-7/service/owt-dev/build.sh | 6 - Xeon/centos-7/service/owt-dev/shell.sh | 6 - Xeon/centos-7/service/owt/CMakeLists.txt | 3 - Xeon/centos-7/service/owt/Dockerfile.m4 | 44 -- Xeon/centos-7/service/owt/README.md | 50 -- Xeon/centos-7/service/owt/build.sh | 6 - Xeon/centos-7/service/owt/shell.sh | 6 - Xeon/centos-7/service/owt360/CMakeLists.txt | 3 - Xeon/centos-7/service/owt360/Dockerfile | 517 ------------- Xeon/centos-7/service/owt360/Dockerfile.m4 | 36 - Xeon/centos-7/service/owt360/README.md | 42 - Xeon/centos-7/service/owt360/build.sh | 6 - Xeon/centos-7/service/owt360/shell.sh | 6 - Xeon/ubuntu-20.04/analytics/dev/Dockerfile | 269 +++++-- Xeon/ubuntu-20.04/analytics/dev/Dockerfile.m4 | 9 +- Xeon/ubuntu-20.04/analytics/ffmpeg/Dockerfile | 68 +- Xeon/ubuntu-20.04/analytics/gst/Dockerfile | 204 +++-- Xeon/ubuntu-20.04/analytics/gst/Dockerfile.m4 | 6 + Xeon/ubuntu-20.04/media/dev/Dockerfile | 201 +++-- Xeon/ubuntu-20.04/media/dev/Dockerfile.m4 | 6 +- Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile | 70 +- Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 | 2 +- Xeon/ubuntu-20.04/media/gst/Dockerfile | 166 +++- Xeon/ubuntu-20.04/media/gst/Dockerfile.m4 | 5 + Xeon/ubuntu-20.04/media/nginx/Dockerfile | 2 +- Xeon/ubuntu-20.04/media/srs/Dockerfile | 27 +- Xeon/ubuntu-20.04/media/srs/Dockerfile.m4 | 1 - Xeon/ubuntu-20.04/media/svt/Dockerfile | 5 +- Xeon/ubuntu-20.04/service/owt-dev/Dockerfile | 174 ++--- .../service/owt-dev/Dockerfile.m4 | 3 +- Xeon/ubuntu-20.04/service/owt/Dockerfile | 175 ++--- Xeon/ubuntu-20.04/service/owt/Dockerfile.m4 | 3 +- Xeon/ubuntu-22.04/CMakeLists.txt | 3 + Xeon/ubuntu-22.04/analytics/CMakeLists.txt | 1 + .../analytics/dev/CMakeLists.txt | 2 +- Xeon/ubuntu-22.04/analytics/dev/Dockerfile | 660 ++++++++++++++++ .../analytics/dev/Dockerfile.m4 | 22 +- .../analytics/dev/README.md | 10 +- .../analytics/dev}/build.sh | 2 +- .../analytics/dev}/shell.sh | 2 +- .../analytics/ffmpeg/CMakeLists.txt | 2 +- .../analytics/ffmpeg/Dockerfile | 229 +++--- .../analytics/ffmpeg/Dockerfile.m4 | 10 +- .../analytics/ffmpeg/README.md | 8 +- Xeon/ubuntu-22.04/analytics/ffmpeg/build.sh | 6 + Xeon/ubuntu-22.04/analytics/ffmpeg/shell.sh | 6 + .../ubuntu-22.04/analytics/gst/CMakeLists.txt | 4 + Xeon/ubuntu-22.04/analytics/gst/Dockerfile | 665 ++++++++++++++++ .../analytics/gst/Dockerfile.m4 | 17 +- Xeon/ubuntu-22.04/analytics/gst/README.md | 56 ++ Xeon/ubuntu-22.04/analytics/gst/build.sh | 6 + Xeon/ubuntu-22.04/analytics/gst/shell.sh | 6 + Xeon/ubuntu-22.04/media/CMakeLists.txt | 1 + .../media/dev/CMakeLists.txt | 2 +- Xeon/ubuntu-22.04/media/dev/Dockerfile | 455 +++++++++++ .../media/dev/Dockerfile.m4 | 20 +- .../media/dev/README.md | 6 +- .../media/dev}/build.sh | 2 +- .../media/dev}/shell.sh | 2 +- .../media/ffmpeg}/.dockerignore | 0 Xeon/ubuntu-22.04/media/ffmpeg/CMakeLists.txt | 3 + .../media/ffmpeg/Dockerfile | 191 +++-- .../media/ffmpeg/Dockerfile.m4 | 9 +- .../media/ffmpeg/README.md | 6 +- Xeon/ubuntu-22.04/media/ffmpeg/build.sh | 6 + Xeon/ubuntu-22.04/media/ffmpeg/shell.sh | 6 + Xeon/ubuntu-22.04/media/gst/.dockerignore | 4 + .../media/gst/CMakeLists.txt | 2 +- Xeon/ubuntu-22.04/media/gst/Dockerfile | 488 ++++++++++++ .../media/gst/Dockerfile.m4 | 17 +- .../media/gst/README.md | 6 +- .../nginx => ubuntu-22.04/media/gst}/build.sh | 2 +- Xeon/ubuntu-22.04/media/gst/shell.sh | 6 + Xeon/ubuntu-22.04/media/nginx/.dockerignore | 4 + Xeon/ubuntu-22.04/media/nginx/CMakeLists.txt | 4 + .../media/nginx/Dockerfile | 40 +- .../media/nginx/Dockerfile.m4 | 5 +- .../media/nginx/README.md | 6 +- Xeon/ubuntu-22.04/media/nginx/build.sh | 6 + .../media/nginx/nginx.conf | 0 .../media/nginx/nginx.conf.m4 | 0 Xeon/ubuntu-22.04/media/nginx/shell.sh | 6 + Xeon/ubuntu-22.04/media/srs/CMakeLists.txt | 4 + .../media/srs/Dockerfile | 43 +- .../media/srs/Dockerfile.m4 | 4 +- .../media/srs/README.md | 6 +- Xeon/ubuntu-22.04/media/srs/build.sh | 6 + Xeon/ubuntu-22.04/media/srs/shell.sh | 6 + Xeon/ubuntu-22.04/media/svt/.dockerignore | 4 + .../media/svt/CMakeLists.txt | 2 +- .../media/svt/Dockerfile | 41 +- .../media/svt/Dockerfile.m4 | 11 +- .../media/svt/README.md | 6 +- Xeon/ubuntu-22.04/media/svt/build.sh | 6 + Xeon/ubuntu-22.04/media/svt/shell.sh | 6 + doc/test.md | 27 +- script/build.sh | 2 +- script/shell.sh | 2 +- template/components/boost.m4 | 2 +- template/components/cmake.m4 | 2 +- template/components/dav1d.m4 | 2 +- template/components/dldt-ie.m4 | 15 +- template/components/ffmpeg.m4 | 56 +- template/components/gmmlib.m4 | 2 +- template/components/gmmlib.sg1.m4 | 6 +- template/components/gmmlib.sg2.m4 | 58 ++ template/components/gst-core.m4 | 14 +- template/components/gst-gva.m4 | 47 +- template/components/gst-libav.m4 | 6 +- template/components/gst-orc.m4 | 2 +- template/components/gst-plugins-bad.m4 | 7 +- template/components/gst-plugins-base.m4 | 6 +- template/components/gst-plugins-good.m4 | 6 +- template/components/gst-plugins-ugly.m4 | 7 +- template/components/gst-python.m4 | 2 +- template/components/gst-vaapi.m4 | 20 +- template/components/intel-gfx.m4 | 9 +- template/components/ipsecmb.m4 | 2 +- template/components/jsonhpp.m4 | 2 +- template/components/libaom.m4 | 2 +- template/components/libfdk-aac.m4 | 2 +- template/components/libjsonc.m4 | 2 +- template/components/libnice.m4 | 2 +- template/components/libogg.m4 | 2 +- template/components/libopus.m4 | 2 +- template/components/libpahomqtt.m4 | 2 +- template/components/librdkafka.m4 | 2 +- template/components/libre.m4 | 2 +- template/components/libsrtp2.m4 | 2 +- template/components/libva-utils.sg2.m4 | 68 ++ template/components/libva2.m4 | 2 +- template/components/libva2.sg1.m4 | 6 +- template/components/libva2.sg2.m4 | 73 ++ template/components/libvmaf.m4 | 2 +- template/components/libvorbis.m4 | 2 +- template/components/libvpx.m4 | 2 +- template/components/libx264.m4 | 2 +- template/components/libx265.m4 | 2 +- template/components/media-delivery.m4 | 45 ++ template/components/media-driver-pkg.sg2.m4 | 62 ++ template/components/media-driver.m4 | 2 +- template/components/media-driver.sg1.m4 | 6 +- template/components/media-driver.sg2.m4 | 60 ++ template/components/meson.m4 | 2 +- template/components/msdk.m4 | 2 +- template/components/msdk.sg1.m4 | 6 +- template/components/nasm.m4 | 5 +- template/components/nginx-cert.m4 | 2 +- template/components/nginx-flv.m4 | 2 +- template/components/nginx-upload.m4 | 2 +- template/components/nginx.m4 | 2 +- template/components/node.m4 | 2 +- template/components/onevpl-atsm.m4 | 64 ++ template/components/onevpl-dispatch.m4 | 75 ++ template/components/opencl.m4 | 2 +- template/components/opencv.m4 | 24 +- template/components/openh264.m4 | 2 +- template/components/openssl.m4 | 4 +- template/components/owt-gst-bad.m4 | 2 +- template/components/owt-gst-base.m4 | 2 +- template/components/owt-gst-good.m4 | 2 +- template/components/owt-gst-gva.m4 | 4 +- template/components/owt-gst-ugly.m4 | 2 +- template/components/owt.m4 | 3 +- template/components/owt360.m4 | 2 +- template/components/qat-core.m4 | 2 +- template/components/qat-cryptomb.m4 | 2 +- template/components/qat-engine.m4 | 2 +- template/components/qat-nginx.m4 | 2 +- template/components/qat-zip.m4 | 2 +- template/components/scvp.m4 | 2 +- template/components/srs.m4 | 2 +- template/components/svt-av1.m4 | 4 +- template/components/svt-hevc.m4 | 2 +- template/components/svt-vp9.m4 | 2 +- template/components/usrsctp.m4 | 2 +- template/components/yasm.m4 | 2 +- template/system/begin.m4 | 4 +- template/system/centos-repo.m4 | 2 +- template/system/end.m4 | 2 +- template/system/ubuntu.m4 | 4 +- test/dldt_gst_gvapython_vcaca.sh | 20 - test/dldt_gst_video_analytics_vcaca.sh | 31 - test/ffmpeg_h264_qsv_1280x720.sh | 11 + test/ffmpeg_h264_qsv_1920x1080.sh | 11 + test/ffmpeg_h264_qsv_320x240.sh | 11 + test/ffmpeg_h264_qsv_720x480.sh | 11 + test/ffmpeg_hevc_qsv_1280x720.sh | 11 + test/ffmpeg_hevc_qsv_1920x1080.sh | 11 + test/ffmpeg_hevc_qsv_320x240.sh | 11 + test/ffmpeg_hevc_qsv_720x480.sh | 11 + test/ffmpeg_svt_dash.sh | 7 - test/ffmpeg_svt_hls.sh | 7 - test/svt_aom.sh | 2 +- test/svt_av1.sh | 2 +- test/svt_dav1d.sh | 2 +- 310 files changed, 11001 insertions(+), 2990 deletions(-) delete mode 100644 QAT/centos-7/CMakeLists.txt delete mode 100644 QAT/centos-7/media/dev/.gitignore delete mode 100644 QAT/centos-7/media/dev/CMakeLists.txt delete mode 100644 QAT/centos-7/media/dev/Dockerfile.m4 delete mode 100644 QAT/centos-7/media/dev/README.md delete mode 100755 QAT/centos-7/media/dev/build.sh delete mode 100644 QAT/centos-7/media/dev/nginx.conf delete mode 100755 QAT/centos-7/media/dev/shell.sh delete mode 100644 QAT/centos-7/media/nginx/.gitignore delete mode 100644 QAT/centos-7/media/nginx/CMakeLists.txt delete mode 100644 QAT/centos-7/media/nginx/Dockerfile.m4 delete mode 100644 QAT/centos-7/media/nginx/README.md delete mode 100755 QAT/centos-7/media/nginx/build.sh delete mode 100644 QAT/centos-7/media/nginx/nginx.conf delete mode 100755 QAT/centos-7/media/nginx/shell.sh delete mode 100644 QAT/centos-7/media/nginx_sw/.gitignore delete mode 100644 QAT/centos-7/media/nginx_sw/CMakeLists.txt delete mode 100644 QAT/centos-7/media/nginx_sw/Dockerfile.m4 delete mode 100644 QAT/centos-7/media/nginx_sw/README.md delete mode 100755 QAT/centos-7/media/nginx_sw/build.sh delete mode 100644 QAT/centos-7/media/nginx_sw/nginx.conf delete mode 100755 QAT/centos-7/media/nginx_sw/shell.sh create mode 100644 SG1/ubuntu-22.04/CMakeLists.txt rename {QAT/centos-7 => SG1/ubuntu-22.04}/media/CMakeLists.txt (100%) create mode 100644 SG1/ubuntu-22.04/media/dev/CMakeLists.txt create mode 100644 SG1/ubuntu-22.04/media/dev/Dockerfile create mode 100644 SG1/ubuntu-22.04/media/dev/Dockerfile.m4 create mode 100644 SG1/ubuntu-22.04/media/dev/README.md rename {Xeon/centos-7 => SG1/ubuntu-22.04}/media/dev/build.sh (73%) rename {Xeon/centos-7/media/gst => SG1/ubuntu-22.04/media/dev}/shell.sh (73%) rename {Xeon/centos-7 => SG1/ubuntu-22.04}/media/ffmpeg/.dockerignore (100%) rename {Xeon/centos-7 => SG1/ubuntu-22.04}/media/ffmpeg/CMakeLists.txt (51%) create mode 100644 SG1/ubuntu-22.04/media/ffmpeg/Dockerfile create mode 100644 SG1/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 create mode 100644 SG1/ubuntu-22.04/media/ffmpeg/README.md rename {Xeon/centos-7/analytics/gst => SG1/ubuntu-22.04/media/ffmpeg}/build.sh (71%) rename {Xeon/centos-7/analytics/dev => SG1/ubuntu-22.04/media/ffmpeg}/shell.sh (71%) create mode 100644 SG2/CMakeLists.txt create mode 100644 SG2/README.md create mode 100644 SG2/ubuntu-20.04/CMakeLists.txt rename {Xeon/centos-7 => SG2/ubuntu-20.04}/analytics/CMakeLists.txt (100%) rename {Xeon/centos-7/analytics/gst => SG2/ubuntu-20.04/analytics/dev}/CMakeLists.txt (58%) create mode 100644 SG2/ubuntu-20.04/analytics/dev/Dockerfile create mode 100644 SG2/ubuntu-20.04/analytics/dev/Dockerfile.m4 rename {Xeon/centos-7/analytics/gst => SG2/ubuntu-20.04/analytics/dev}/README.md (92%) create mode 100755 SG2/ubuntu-20.04/analytics/dev/build.sh create mode 100755 SG2/ubuntu-20.04/analytics/dev/shell.sh create mode 100644 SG2/ubuntu-20.04/analytics/gst/CMakeLists.txt create mode 100644 SG2/ubuntu-20.04/analytics/gst/Dockerfile create mode 100644 SG2/ubuntu-20.04/analytics/gst/Dockerfile.m4 create mode 100644 SG2/ubuntu-20.04/analytics/gst/README.md create mode 100755 SG2/ubuntu-20.04/analytics/gst/build.sh create mode 100755 SG2/ubuntu-20.04/analytics/gst/shell.sh rename {Xeon/centos-7 => SG2/ubuntu-20.04}/media/CMakeLists.txt (100%) create mode 100644 SG2/ubuntu-20.04/media/dev/CMakeLists.txt create mode 100644 SG2/ubuntu-20.04/media/dev/Dockerfile create mode 100644 SG2/ubuntu-20.04/media/dev/Dockerfile.m4 create mode 100644 SG2/ubuntu-20.04/media/dev/README.md rename {Xeon/centos-7/media/gst => SG2/ubuntu-20.04/media/dev}/build.sh (73%) rename {Xeon/centos-7 => SG2/ubuntu-20.04}/media/dev/shell.sh (73%) rename {Xeon/centos-7/media/gst => SG2/ubuntu-20.04/media/ffmpeg}/.dockerignore (100%) create mode 100644 SG2/ubuntu-20.04/media/ffmpeg/CMakeLists.txt create mode 100644 SG2/ubuntu-20.04/media/ffmpeg/Dockerfile create mode 100644 SG2/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 create mode 100644 SG2/ubuntu-20.04/media/ffmpeg/README.md rename {Xeon/centos-7/analytics/dev => SG2/ubuntu-20.04/media/ffmpeg}/build.sh (71%) rename {Xeon/centos-7/analytics/gst => SG2/ubuntu-20.04/media/ffmpeg}/shell.sh (71%) create mode 100644 SG2/ubuntu-22.04/CMakeLists.txt rename {Xeon/centos-7/service => SG2/ubuntu-22.04/analytics}/CMakeLists.txt (100%) create mode 100644 SG2/ubuntu-22.04/analytics/dev/CMakeLists.txt create mode 100644 SG2/ubuntu-22.04/analytics/dev/Dockerfile create mode 100644 SG2/ubuntu-22.04/analytics/dev/Dockerfile.m4 create mode 100644 SG2/ubuntu-22.04/analytics/dev/README.md create mode 100755 SG2/ubuntu-22.04/analytics/dev/build.sh create mode 100755 SG2/ubuntu-22.04/analytics/dev/shell.sh create mode 100644 SG2/ubuntu-22.04/analytics/gst/CMakeLists.txt create mode 100644 SG2/ubuntu-22.04/analytics/gst/Dockerfile create mode 100644 SG2/ubuntu-22.04/analytics/gst/Dockerfile.m4 create mode 100644 SG2/ubuntu-22.04/analytics/gst/README.md create mode 100755 SG2/ubuntu-22.04/analytics/gst/build.sh create mode 100755 SG2/ubuntu-22.04/analytics/gst/shell.sh create mode 100644 SG2/ubuntu-22.04/media/CMakeLists.txt create mode 100644 SG2/ubuntu-22.04/media/dev/CMakeLists.txt create mode 100644 SG2/ubuntu-22.04/media/dev/Dockerfile create mode 100644 SG2/ubuntu-22.04/media/dev/Dockerfile.m4 create mode 100644 SG2/ubuntu-22.04/media/dev/README.md rename {Xeon/centos-7/media/srs => SG2/ubuntu-22.04/media/dev}/build.sh (73%) rename {Xeon/centos-7/media/nginx => SG2/ubuntu-22.04/media/dev}/shell.sh (73%) rename {Xeon/centos-7/media/nginx => SG2/ubuntu-22.04/media/ffmpeg}/.dockerignore (100%) create mode 100644 SG2/ubuntu-22.04/media/ffmpeg/CMakeLists.txt create mode 100644 SG2/ubuntu-22.04/media/ffmpeg/Dockerfile create mode 100644 SG2/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 create mode 100644 SG2/ubuntu-22.04/media/ffmpeg/README.md create mode 100755 SG2/ubuntu-22.04/media/ffmpeg/build.sh create mode 100755 SG2/ubuntu-22.04/media/ffmpeg/shell.sh delete mode 100644 Xeon/centos-7/CMakeLists.txt delete mode 100644 Xeon/centos-7/media/nginx/CMakeLists.txt delete mode 100644 Xeon/centos-7/media/srs/CMakeLists.txt delete mode 100755 Xeon/centos-7/media/srs/shell.sh delete mode 100755 Xeon/centos-7/media/svt/build.sh delete mode 100755 Xeon/centos-7/media/svt/shell.sh delete mode 100644 Xeon/centos-7/service/owt-dev/CMakeLists.txt delete mode 100644 Xeon/centos-7/service/owt-dev/Dockerfile.m4 delete mode 100644 Xeon/centos-7/service/owt-dev/README.md delete mode 100755 Xeon/centos-7/service/owt-dev/build.sh delete mode 100755 Xeon/centos-7/service/owt-dev/shell.sh delete mode 100644 Xeon/centos-7/service/owt/CMakeLists.txt delete mode 100644 Xeon/centos-7/service/owt/Dockerfile.m4 delete mode 100644 Xeon/centos-7/service/owt/README.md delete mode 100755 Xeon/centos-7/service/owt/build.sh delete mode 100755 Xeon/centos-7/service/owt/shell.sh delete mode 100644 Xeon/centos-7/service/owt360/CMakeLists.txt delete mode 100644 Xeon/centos-7/service/owt360/Dockerfile delete mode 100644 Xeon/centos-7/service/owt360/Dockerfile.m4 delete mode 100644 Xeon/centos-7/service/owt360/README.md delete mode 100755 Xeon/centos-7/service/owt360/build.sh delete mode 100755 Xeon/centos-7/service/owt360/shell.sh create mode 100644 Xeon/ubuntu-22.04/CMakeLists.txt create mode 100644 Xeon/ubuntu-22.04/analytics/CMakeLists.txt rename Xeon/{centos-7 => ubuntu-22.04}/analytics/dev/CMakeLists.txt (64%) create mode 100644 Xeon/ubuntu-22.04/analytics/dev/Dockerfile rename Xeon/{centos-7 => ubuntu-22.04}/analytics/dev/Dockerfile.m4 (77%) rename Xeon/{centos-7 => ubuntu-22.04}/analytics/dev/README.md (93%) rename Xeon/{centos-7/analytics/ffmpeg => ubuntu-22.04/analytics/dev}/build.sh (70%) rename Xeon/{centos-7/analytics/ffmpeg => ubuntu-22.04/analytics/dev}/shell.sh (70%) rename Xeon/{centos-7 => ubuntu-22.04}/analytics/ffmpeg/CMakeLists.txt (58%) rename Xeon/{centos-7 => ubuntu-22.04}/analytics/ffmpeg/Dockerfile (59%) rename Xeon/{centos-7 => ubuntu-22.04}/analytics/ffmpeg/Dockerfile.m4 (83%) rename Xeon/{centos-7 => ubuntu-22.04}/analytics/ffmpeg/README.md (90%) create mode 100755 Xeon/ubuntu-22.04/analytics/ffmpeg/build.sh create mode 100755 Xeon/ubuntu-22.04/analytics/ffmpeg/shell.sh create mode 100644 Xeon/ubuntu-22.04/analytics/gst/CMakeLists.txt create mode 100644 Xeon/ubuntu-22.04/analytics/gst/Dockerfile rename Xeon/{centos-7 => ubuntu-22.04}/analytics/gst/Dockerfile.m4 (76%) create mode 100644 Xeon/ubuntu-22.04/analytics/gst/README.md create mode 100755 Xeon/ubuntu-22.04/analytics/gst/build.sh create mode 100755 Xeon/ubuntu-22.04/analytics/gst/shell.sh create mode 100644 Xeon/ubuntu-22.04/media/CMakeLists.txt rename Xeon/{centos-7 => ubuntu-22.04}/media/dev/CMakeLists.txt (57%) create mode 100644 Xeon/ubuntu-22.04/media/dev/Dockerfile rename Xeon/{centos-7 => ubuntu-22.04}/media/dev/Dockerfile.m4 (61%) rename Xeon/{centos-7 => ubuntu-22.04}/media/dev/README.md (92%) rename Xeon/{centos-7/media/ffmpeg => ubuntu-22.04/media/dev}/build.sh (72%) rename Xeon/{centos-7/media/ffmpeg => ubuntu-22.04/media/dev}/shell.sh (72%) rename Xeon/{centos-7/media/svt => ubuntu-22.04/media/ffmpeg}/.dockerignore (100%) create mode 100644 Xeon/ubuntu-22.04/media/ffmpeg/CMakeLists.txt rename Xeon/{centos-7 => ubuntu-22.04}/media/ffmpeg/Dockerfile (54%) rename Xeon/{centos-7 => ubuntu-22.04}/media/ffmpeg/Dockerfile.m4 (80%) rename Xeon/{centos-7 => ubuntu-22.04}/media/ffmpeg/README.md (90%) create mode 100755 Xeon/ubuntu-22.04/media/ffmpeg/build.sh create mode 100755 Xeon/ubuntu-22.04/media/ffmpeg/shell.sh create mode 100644 Xeon/ubuntu-22.04/media/gst/.dockerignore rename Xeon/{centos-7 => ubuntu-22.04}/media/gst/CMakeLists.txt (50%) create mode 100644 Xeon/ubuntu-22.04/media/gst/Dockerfile rename Xeon/{centos-7 => ubuntu-22.04}/media/gst/Dockerfile.m4 (75%) rename Xeon/{centos-7 => ubuntu-22.04}/media/gst/README.md (92%) rename Xeon/{centos-7/media/nginx => ubuntu-22.04/media/gst}/build.sh (72%) create mode 100755 Xeon/ubuntu-22.04/media/gst/shell.sh create mode 100644 Xeon/ubuntu-22.04/media/nginx/.dockerignore create mode 100644 Xeon/ubuntu-22.04/media/nginx/CMakeLists.txt rename Xeon/{centos-7 => ubuntu-22.04}/media/nginx/Dockerfile (82%) rename Xeon/{centos-7 => ubuntu-22.04}/media/nginx/Dockerfile.m4 (82%) rename Xeon/{centos-7 => ubuntu-22.04}/media/nginx/README.md (90%) create mode 100755 Xeon/ubuntu-22.04/media/nginx/build.sh rename Xeon/{centos-7 => ubuntu-22.04}/media/nginx/nginx.conf (100%) rename Xeon/{centos-7 => ubuntu-22.04}/media/nginx/nginx.conf.m4 (100%) create mode 100755 Xeon/ubuntu-22.04/media/nginx/shell.sh create mode 100644 Xeon/ubuntu-22.04/media/srs/CMakeLists.txt rename Xeon/{centos-7 => ubuntu-22.04}/media/srs/Dockerfile (68%) rename Xeon/{centos-7 => ubuntu-22.04}/media/srs/Dockerfile.m4 (78%) rename Xeon/{centos-7 => ubuntu-22.04}/media/srs/README.md (90%) create mode 100755 Xeon/ubuntu-22.04/media/srs/build.sh create mode 100755 Xeon/ubuntu-22.04/media/srs/shell.sh create mode 100644 Xeon/ubuntu-22.04/media/svt/.dockerignore rename Xeon/{centos-7 => ubuntu-22.04}/media/svt/CMakeLists.txt (50%) rename Xeon/{centos-7 => ubuntu-22.04}/media/svt/Dockerfile (71%) rename Xeon/{centos-7 => ubuntu-22.04}/media/svt/Dockerfile.m4 (60%) rename Xeon/{centos-7 => ubuntu-22.04}/media/svt/README.md (90%) create mode 100755 Xeon/ubuntu-22.04/media/svt/build.sh create mode 100755 Xeon/ubuntu-22.04/media/svt/shell.sh create mode 100644 template/components/gmmlib.sg2.m4 create mode 100644 template/components/libva-utils.sg2.m4 create mode 100644 template/components/libva2.sg2.m4 create mode 100644 template/components/media-delivery.m4 create mode 100644 template/components/media-driver-pkg.sg2.m4 create mode 100644 template/components/media-driver.sg2.m4 create mode 100644 template/components/onevpl-atsm.m4 create mode 100644 template/components/onevpl-dispatch.m4 delete mode 100755 test/dldt_gst_gvapython_vcaca.sh delete mode 100755 test/dldt_gst_video_analytics_vcaca.sh create mode 100755 test/ffmpeg_h264_qsv_1280x720.sh create mode 100755 test/ffmpeg_h264_qsv_1920x1080.sh create mode 100755 test/ffmpeg_h264_qsv_320x240.sh create mode 100755 test/ffmpeg_h264_qsv_720x480.sh create mode 100755 test/ffmpeg_hevc_qsv_1280x720.sh create mode 100755 test/ffmpeg_hevc_qsv_1920x1080.sh create mode 100755 test/ffmpeg_hevc_qsv_320x240.sh create mode 100755 test/ffmpeg_hevc_qsv_720x480.sh diff --git a/QAT/centos-7/CMakeLists.txt b/QAT/centos-7/CMakeLists.txt deleted file mode 100644 index 22fb9af27..000000000 --- a/QAT/centos-7/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(OS_NAME "centos") -set(OS_VERSION "7") -include(os) diff --git a/QAT/centos-7/media/dev/.gitignore b/QAT/centos-7/media/dev/.gitignore deleted file mode 100644 index 335ec9573..000000000 --- a/QAT/centos-7/media/dev/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.tar.gz diff --git a/QAT/centos-7/media/dev/CMakeLists.txt b/QAT/centos-7/media/dev/CMakeLists.txt deleted file mode 100644 index e1740de2c..000000000 --- a/QAT/centos-7/media/dev/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(image "qat_media_devel_centos7") -set(dep_image "xeon_media_devel_centos7") -set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/qat.tar.gz") -include(image) -include(nginx-tests) -include(qat-tests) diff --git a/QAT/centos-7/media/dev/Dockerfile.m4 b/QAT/centos-7/media/dev/Dockerfile.m4 deleted file mode 100644 index e2541ff0c..000000000 --- a/QAT/centos-7/media/dev/Dockerfile.m4 +++ /dev/null @@ -1,33 +0,0 @@ - -include(begin.m4) -include(nasm.m4) -include(qat-core.m4) -include(qat-zip.m4) -include(openssl.m4) -include(qat-cryptomb.m4) -include(ipsecmb.m4) -include(qat-engine.m4) -include(nginx-flv.m4) -include(nginx-upload.m4) -include(qat-nginx.m4) -include(nginx-cert.m4) -include(end.m4) - -PREAMBLE -FROM OS_NAME:OS_VERSION AS build -include(centos-repo.m4) -INSTALL_CENTOS_REPO(epel-release centos-release-scl) - -BUILD_ALL()dnl -define(`CLEANUP_CC',no)dnl -CLEANUP()dnl - -FROM openvisualcloud/xeon-OS_NAME`'patsubst(OS_VERSION,\.)-media-dev:BUILD_VERSION -LABEL Description="This is the QAT development image for OS_NAME OS_VERSION" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -INSTALL_CENTOS_REPO(epel-release) -INSTALL_ALL(devel,build) - diff --git a/QAT/centos-7/media/dev/README.md b/QAT/centos-7/media/dev/README.md deleted file mode 100644 index 79a188aa9..000000000 --- a/QAT/centos-7/media/dev/README.md +++ /dev/null @@ -1,57 +0,0 @@ -This docker image is part of Open Visual Cloud software stacks. Optimized for NGINX web server with compute-intensive operations acceleration with Intel® QuickAssist Technology (Intel® QAT).The docker image can be used in the FROM field of a downstream Dockerfile. -This Image implements Software Implementation of [QAT-Engine](https://github.com/intel/QAT_Engine). -Refer to [Nginx image](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/QAT/centos-7/media/nginx) for Hardware Implementation. - -## Supported tags and respective Dockerfile links - - [qat-centos-7-media-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/QAT/centos-7/media/dev/Dockerfile) - -## Quick reference -- #### Supported platform and OS - Intel® QAT platform, CentOS-7 - -- #### Usage instructions: - [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) - - -- #### Getting started with Dockerfiles: - [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) - -- #### File issues: - [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) - - -## License -This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. - - -| Components | License | -| ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | -|QATzip|BSD 3-clause "New" or "Revised" License| -|OpenSSL|Apache License 2.0| -|ipp crypo|Apache-2.0 License| -|QAT OpenSSL engine|BSD 3-clause "New" or "Revised" License| -|nginx http flv|BSD 2-clause "Simplified" License| -|nginx upload module|BSD 3-clause "Simplified" License| -|asynch mode nginx |BSD 3-clause "New" or "Revised" License| -|libogg|BSD 3-clause "New" or "Revised" License| -|libvorbis|BSD 3-clause "New" or "Revised" License| -|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| -|libvpx|BSD 3-clause "New" or "Revised" License| -|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| -|dav1d|BSD 2-clause "Simplified" License| -|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| -|Intel SVT-AV1|BSD-2-Clause Plus Patent License| -|Intel SVT-VP9|BSD-2-Clause Plus Patent License| -|gstreamer|GNU Lesser General Public License v2.1 or later| -|gst plugins base|GNU Lesser General Public License v2.1 or later| -|gst plugins good|GNU Lesser General Public License v2.1 or later| -|gst plugins bad|GNU Lesser General Public License v2.1 or later| -|gst plugins ugly|GNU Lesser General Public License v2.1 or later| -|gst libav|GNU Library General Public License Version 2.1 or later| -|gst svt|GNU Lesser General Public License v2.1 or later| -|FFmpeg|GNU Lesser General Public License v2.1 or later| - - -More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/QAT/centos-7/media/dev/build.sh b/QAT/centos-7/media/dev/build.sh deleted file mode 100755 index 4ab96f209..000000000 --- a/QAT/centos-7/media/dev/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="qat-centos7-media-dev" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/qatbuild.sh" diff --git a/QAT/centos-7/media/dev/nginx.conf b/QAT/centos-7/media/dev/nginx.conf deleted file mode 100644 index 251d05e97..000000000 --- a/QAT/centos-7/media/dev/nginx.conf +++ /dev/null @@ -1,176 +0,0 @@ - -user root; -worker_processes 1; -daemon off; - -load_module modules/ngx_http_qatzip_filter_module.so; -load_module modules/ngx_ssl_engine_qat_module.so; - -events { - worker_connections 4096; -} - -# Enable QAT engine in heretic mode. -ssl_engine { - use_engine qatengine; - default_algorithms RSA,EC,DH,DSA; - qat_engine { - qat_offload_mode async; - qat_notify_mode poll; - qat_poll_mode heuristic; - #qat_sw_fallback on; - } -} - -# Configure RTMP -rtmp { - server { - listen 1935; - chunk_size 4000; - - application stream { - live on; - } - - application hls { - live on; - hls on; - hls_path /var/www/hls; - hls_nested on; - hls_fragment 3; - hls_playlist_length 60; - } - - application dash { - live on; - dash on; - dash_path /var/www/dash; - dash_fragment 3; - dash_playlist_length 60; - dash_nested on; - } - } -} - -http { - gzip on; - gzip_min_length 128; - gzip_comp_level 1; - gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml; - gzip_vary on; - gzip_disable "msie6"; - gzip_http_version 1.0; - - qatzip_sw failover; - qatzip_min_length 128; - qatzip_comp_level 1; - qatzip_buffers 16 8k; - qatzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml application/octet-stream image/jpeg; - qatzip_chunk_size 64k; - qatzip_stream_size 256k; - qatzip_sw_threshold 256; - - # HTTP server with QATZip enabled. - server { - listen 80; - server_name localhost; - - location / { - root html; - index index.html index.htm; - } - - location /hls { - alias /var/www/hls; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/vnd.apple.mpegurl m3u8; - video/mp2t ts; - } - } - - location /dash { - alias /var/www/dash; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/dash+xml mpd; - } - } - - location /stat { - rtmp_stat all; - rtmp_stat_stylesheet stat.xsl; - } - - location /upload { - client_max_body_size 1024M; - upload_pass @upload; - upload_pass_args on; - upload_store /var/www/upload; - upload_set_form_field $upload_field_name.path "$upload_tmp_path"; - upload_cleanup 400 404 499 500-505; - } - - location @upload { - return 200; - } - } - - # HTTPS server with QATZip enabled. - server { - listen 443 ssl asynch; - server_name localhost; - - ssl_protocols TLSv1.2; - ssl_certificate cert.crt; - ssl_certificate_key cert.key; - - location / { - root html; - index index.html index.htm; - } - - location /hls { - alias /var/www/hls; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/vnd.apple.mpegurl m3u8; - video/mp2t ts; - } - } - - location /dash { - alias /var/www/dash; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/dash+xml mpd; - } - } - - location /stat { - rtmp_stat all; - rtmp_stat_stylesheet stat.xsl; - } - - location /upload { - client_max_body_size 1024M; - upload_pass @upload; - upload_pass_args on; - upload_store /var/www/upload; - upload_set_form_field $upload_field_name.path "$upload_tmp_path"; - upload_cleanup 400 404 499 500-505; - } - - location @upload { - return 200; - } - } -} diff --git a/QAT/centos-7/media/dev/shell.sh b/QAT/centos-7/media/dev/shell.sh deleted file mode 100755 index 433250de5..000000000 --- a/QAT/centos-7/media/dev/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="qat-centos7-media-dev" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/qatshell.sh" diff --git a/QAT/centos-7/media/nginx/.gitignore b/QAT/centos-7/media/nginx/.gitignore deleted file mode 100644 index 335ec9573..000000000 --- a/QAT/centos-7/media/nginx/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.tar.gz diff --git a/QAT/centos-7/media/nginx/CMakeLists.txt b/QAT/centos-7/media/nginx/CMakeLists.txt deleted file mode 100644 index d0f9d889a..000000000 --- a/QAT/centos-7/media/nginx/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(image "qat_media_nginx_centos7") -set(dep_image "xeon_ffmpeg_centos7") -set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/qat.tar.gz") -include(image) -include(nginx-tests) -include(qat-tests) diff --git a/QAT/centos-7/media/nginx/Dockerfile.m4 b/QAT/centos-7/media/nginx/Dockerfile.m4 deleted file mode 100644 index 21e8ba98e..000000000 --- a/QAT/centos-7/media/nginx/Dockerfile.m4 +++ /dev/null @@ -1,30 +0,0 @@ - -include(begin.m4) -include(nasm.m4) -include(qat-core.m4) -include(qat-zip.m4) -include(openssl.m4) -include(qat-engine.m4) -include(nginx-flv.m4) -include(nginx-upload.m4) -include(qat-nginx.m4) -include(nginx-cert.m4) -include(end.m4) - -PREAMBLE -FROM OS_NAME:OS_VERSION AS build -include(centos-repo.m4) -INSTALL_CENTOS_REPO(epel-release centos-release-scl) - -BUILD_ALL()dnl -CLEANUP()dnl - -FROM openvisualcloud/xeon-OS_NAME`'patsubst(OS_VERSION,\.)-media-ffmpeg:BUILD_VERSION -LABEL Description="This is the base image for QAT NGINX OS_NAME OS_VERSION" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -INSTALL_CENTOS_REPO(epel-release) -INSTALL_ALL(runtime,build) - diff --git a/QAT/centos-7/media/nginx/README.md b/QAT/centos-7/media/nginx/README.md deleted file mode 100644 index d4f2cc385..000000000 --- a/QAT/centos-7/media/nginx/README.md +++ /dev/null @@ -1,51 +0,0 @@ -This docker image is part of Open Visual Cloud software stacks. Optimized for NGINX web server with compute-intensive operations acceleration with Intel® QuickAssist Technology (Intel® QAT).The docker image can be used in the FROM field of a downstream Dockerfile. -This Image implements Hardware Implementation of [QAT-Engine](https://github.com/intel/QAT_Engine). -Refer to [Nginx SW image](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/QAT/centos-7/media/nginx_sw) or [Development image](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/QAT/centos-7/media/dev) for Software Implementation. - -## Supported tags and respective Dockerfile links - - [qat-centos-7-media-nginx](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/QAT/centos-7/media/nginx/Dockerfile) - -## Quick reference -- #### Supported platform and OS - Intel® QAT platform, CentOS-7 - -- #### Usage instructions: - [NGINX](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/nginx.md) - - -- #### Getting started with Dockerfiles: - [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) - -- #### File issues: - [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) - - -## License -This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. - - -| Components | License | -| ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | -|QATzip|BSD 3-clause "New" or "Revised" License| -|OpenSSL|Apache License 2.0| -|QAT OpenSSL engine|BSD 3-clause "New" or "Revised" License| -|nginx http flv|BSD 2-clause "Simplified" License| -|nginx upload module|BSD 3-clause "Simplified" License| -|asynch mode nginx |BSD 3-clause "New" or "Revised" License| -|libogg|BSD 3-clause "New" or "Revised" License| -|libvorbis|BSD 3-clause "New" or "Revised" License| -|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| -|libvpx|BSD 3-clause "New" or "Revised" License| -|x264|GNU General Public License v2.0 or later| -|x265|GNU General Public License v2.0 or later| -|dav1d|BSD 2-clause "Simplified" License| -|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| -|Intel SVT-AV1|BSD-2-Clause Plus Patent License| -|Intel SVT-VP9|BSD-2-Clause Plus Patent License| -|OpenCV|BSD 3-clause "New" or "Revised" License| -|FFmpeg|GNU General Public License v2.0 or later| - - -More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/QAT/centos-7/media/nginx/build.sh b/QAT/centos-7/media/nginx/build.sh deleted file mode 100755 index e29d6c956..000000000 --- a/QAT/centos-7/media/nginx/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="qat-centos7-media-nginx" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/qatbuild.sh" diff --git a/QAT/centos-7/media/nginx/nginx.conf b/QAT/centos-7/media/nginx/nginx.conf deleted file mode 100644 index 251d05e97..000000000 --- a/QAT/centos-7/media/nginx/nginx.conf +++ /dev/null @@ -1,176 +0,0 @@ - -user root; -worker_processes 1; -daemon off; - -load_module modules/ngx_http_qatzip_filter_module.so; -load_module modules/ngx_ssl_engine_qat_module.so; - -events { - worker_connections 4096; -} - -# Enable QAT engine in heretic mode. -ssl_engine { - use_engine qatengine; - default_algorithms RSA,EC,DH,DSA; - qat_engine { - qat_offload_mode async; - qat_notify_mode poll; - qat_poll_mode heuristic; - #qat_sw_fallback on; - } -} - -# Configure RTMP -rtmp { - server { - listen 1935; - chunk_size 4000; - - application stream { - live on; - } - - application hls { - live on; - hls on; - hls_path /var/www/hls; - hls_nested on; - hls_fragment 3; - hls_playlist_length 60; - } - - application dash { - live on; - dash on; - dash_path /var/www/dash; - dash_fragment 3; - dash_playlist_length 60; - dash_nested on; - } - } -} - -http { - gzip on; - gzip_min_length 128; - gzip_comp_level 1; - gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml; - gzip_vary on; - gzip_disable "msie6"; - gzip_http_version 1.0; - - qatzip_sw failover; - qatzip_min_length 128; - qatzip_comp_level 1; - qatzip_buffers 16 8k; - qatzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml application/octet-stream image/jpeg; - qatzip_chunk_size 64k; - qatzip_stream_size 256k; - qatzip_sw_threshold 256; - - # HTTP server with QATZip enabled. - server { - listen 80; - server_name localhost; - - location / { - root html; - index index.html index.htm; - } - - location /hls { - alias /var/www/hls; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/vnd.apple.mpegurl m3u8; - video/mp2t ts; - } - } - - location /dash { - alias /var/www/dash; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/dash+xml mpd; - } - } - - location /stat { - rtmp_stat all; - rtmp_stat_stylesheet stat.xsl; - } - - location /upload { - client_max_body_size 1024M; - upload_pass @upload; - upload_pass_args on; - upload_store /var/www/upload; - upload_set_form_field $upload_field_name.path "$upload_tmp_path"; - upload_cleanup 400 404 499 500-505; - } - - location @upload { - return 200; - } - } - - # HTTPS server with QATZip enabled. - server { - listen 443 ssl asynch; - server_name localhost; - - ssl_protocols TLSv1.2; - ssl_certificate cert.crt; - ssl_certificate_key cert.key; - - location / { - root html; - index index.html index.htm; - } - - location /hls { - alias /var/www/hls; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/vnd.apple.mpegurl m3u8; - video/mp2t ts; - } - } - - location /dash { - alias /var/www/dash; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/dash+xml mpd; - } - } - - location /stat { - rtmp_stat all; - rtmp_stat_stylesheet stat.xsl; - } - - location /upload { - client_max_body_size 1024M; - upload_pass @upload; - upload_pass_args on; - upload_store /var/www/upload; - upload_set_form_field $upload_field_name.path "$upload_tmp_path"; - upload_cleanup 400 404 499 500-505; - } - - location @upload { - return 200; - } - } -} diff --git a/QAT/centos-7/media/nginx/shell.sh b/QAT/centos-7/media/nginx/shell.sh deleted file mode 100755 index 2056f64ab..000000000 --- a/QAT/centos-7/media/nginx/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="qat-centos7-media-nginx" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/qatshell.sh" diff --git a/QAT/centos-7/media/nginx_sw/.gitignore b/QAT/centos-7/media/nginx_sw/.gitignore deleted file mode 100644 index 335ec9573..000000000 --- a/QAT/centos-7/media/nginx_sw/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.tar.gz diff --git a/QAT/centos-7/media/nginx_sw/CMakeLists.txt b/QAT/centos-7/media/nginx_sw/CMakeLists.txt deleted file mode 100644 index fea61f6b7..000000000 --- a/QAT/centos-7/media/nginx_sw/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -set(image "qat_media_nginxsw_centos7") -set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/qat.tar.gz") -include(image) -include(nginx-tests) -include(qat-tests) diff --git a/QAT/centos-7/media/nginx_sw/Dockerfile.m4 b/QAT/centos-7/media/nginx_sw/Dockerfile.m4 deleted file mode 100644 index 9861cad2a..000000000 --- a/QAT/centos-7/media/nginx_sw/Dockerfile.m4 +++ /dev/null @@ -1,32 +0,0 @@ - -include(begin.m4) -include(nasm.m4) -include(qat-core.m4) -include(qat-zip.m4) -include(openssl.m4) -include(qat-cryptomb.m4) -include(ipsecmb.m4) -include(qat-engine.m4) -include(nginx-flv.m4) -include(nginx-upload.m4) -include(qat-nginx.m4) -include(nginx-cert.m4) -include(end.m4) - -PREAMBLE -FROM OS_NAME:OS_VERSION AS build -include(centos-repo.m4) -INSTALL_CENTOS_REPO(epel-release centos-release-scl) - -BUILD_ALL()dnl -CLEANUP()dnl - -FROM openvisualcloud/xeon-OS_NAME`'patsubst(OS_VERSION,\.)-media-ffmpeg:BUILD_VERSION -LABEL Description="This is the base image for QAT NGINX OS_NAME OS_VERSION" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -INSTALL_CENTOS_REPO(epel-release) -INSTALL_ALL(runtime,build) - diff --git a/QAT/centos-7/media/nginx_sw/README.md b/QAT/centos-7/media/nginx_sw/README.md deleted file mode 100644 index eb9e59f5f..000000000 --- a/QAT/centos-7/media/nginx_sw/README.md +++ /dev/null @@ -1,52 +0,0 @@ -This docker image is part of Open Visual Cloud software stacks. Optimized for NGINX web server with compute-intensive operations acceleration with Intel® QuickAssist Technology (Intel® QAT).The docker image can be used in the FROM field of a downstream Dockerfile. -This Image implements Software Implementation of [QAT-Engine](https://github.com/intel/QAT_Engine). -Refer to [Nginx image](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/QAT/centos-7/media/nginx) for Hardware Implementation. - -## Supported tags and respective Dockerfile links - - [qat-centos-7-media-nginx_sw](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/QAT/centos-7/media/nginx_sw/Dockerfile) - -## Quick reference -- #### Supported platform and OS - Intel® QAT platform, CentOS-7 - -- #### Usage instructions: - [NGINX](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/nginx.md) - - -- #### Getting started with Dockerfiles: - [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) - -- #### File issues: - [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) - - -## License -This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. - - -| Components | License | -| ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | -|QATzip|BSD 3-clause "New" or "Revised" License| -|OpenSSL|Apache License 2.0| -|ipp crypo|Apache-2.0 License| -|QAT OpenSSL engine|BSD 3-clause "New" or "Revised" License| -|nginx http flv|BSD 2-clause "Simplified" License| -|nginx upload module|BSD 3-clause "Simplified" License| -|asynch mode nginx |BSD 3-clause "New" or "Revised" License| -|libogg|BSD 3-clause "New" or "Revised" License| -|libvorbis|BSD 3-clause "New" or "Revised" License| -|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| -|libvpx|BSD 3-clause "New" or "Revised" License| -|x264|GNU General Public License v2.0 or later| -|x265|GNU General Public License v2.0 or later| -|dav1d|BSD 2-clause "Simplified" License| -|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| -|Intel SVT-AV1|BSD-2-Clause Plus Patent License| -|Intel SVT-VP9|BSD-2-Clause Plus Patent License| -|OpenCV|BSD 3-clause "New" or "Revised" License| -|FFmpeg|GNU General Public License v2.0 or later| - - -More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/QAT/centos-7/media/nginx_sw/build.sh b/QAT/centos-7/media/nginx_sw/build.sh deleted file mode 100755 index 7b19a541a..000000000 --- a/QAT/centos-7/media/nginx_sw/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="qat-centos7-media-nginx_sw" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/qatbuild.sh" diff --git a/QAT/centos-7/media/nginx_sw/nginx.conf b/QAT/centos-7/media/nginx_sw/nginx.conf deleted file mode 100644 index 251d05e97..000000000 --- a/QAT/centos-7/media/nginx_sw/nginx.conf +++ /dev/null @@ -1,176 +0,0 @@ - -user root; -worker_processes 1; -daemon off; - -load_module modules/ngx_http_qatzip_filter_module.so; -load_module modules/ngx_ssl_engine_qat_module.so; - -events { - worker_connections 4096; -} - -# Enable QAT engine in heretic mode. -ssl_engine { - use_engine qatengine; - default_algorithms RSA,EC,DH,DSA; - qat_engine { - qat_offload_mode async; - qat_notify_mode poll; - qat_poll_mode heuristic; - #qat_sw_fallback on; - } -} - -# Configure RTMP -rtmp { - server { - listen 1935; - chunk_size 4000; - - application stream { - live on; - } - - application hls { - live on; - hls on; - hls_path /var/www/hls; - hls_nested on; - hls_fragment 3; - hls_playlist_length 60; - } - - application dash { - live on; - dash on; - dash_path /var/www/dash; - dash_fragment 3; - dash_playlist_length 60; - dash_nested on; - } - } -} - -http { - gzip on; - gzip_min_length 128; - gzip_comp_level 1; - gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml; - gzip_vary on; - gzip_disable "msie6"; - gzip_http_version 1.0; - - qatzip_sw failover; - qatzip_min_length 128; - qatzip_comp_level 1; - qatzip_buffers 16 8k; - qatzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml application/octet-stream image/jpeg; - qatzip_chunk_size 64k; - qatzip_stream_size 256k; - qatzip_sw_threshold 256; - - # HTTP server with QATZip enabled. - server { - listen 80; - server_name localhost; - - location / { - root html; - index index.html index.htm; - } - - location /hls { - alias /var/www/hls; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/vnd.apple.mpegurl m3u8; - video/mp2t ts; - } - } - - location /dash { - alias /var/www/dash; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/dash+xml mpd; - } - } - - location /stat { - rtmp_stat all; - rtmp_stat_stylesheet stat.xsl; - } - - location /upload { - client_max_body_size 1024M; - upload_pass @upload; - upload_pass_args on; - upload_store /var/www/upload; - upload_set_form_field $upload_field_name.path "$upload_tmp_path"; - upload_cleanup 400 404 499 500-505; - } - - location @upload { - return 200; - } - } - - # HTTPS server with QATZip enabled. - server { - listen 443 ssl asynch; - server_name localhost; - - ssl_protocols TLSv1.2; - ssl_certificate cert.crt; - ssl_certificate_key cert.key; - - location / { - root html; - index index.html index.htm; - } - - location /hls { - alias /var/www/hls; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/vnd.apple.mpegurl m3u8; - video/mp2t ts; - } - } - - location /dash { - alias /var/www/dash; - add_header Cache-Control no-cache; - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Expose-Headers' 'Content-Length'; - types { - application/dash+xml mpd; - } - } - - location /stat { - rtmp_stat all; - rtmp_stat_stylesheet stat.xsl; - } - - location /upload { - client_max_body_size 1024M; - upload_pass @upload; - upload_pass_args on; - upload_store /var/www/upload; - upload_set_form_field $upload_field_name.path "$upload_tmp_path"; - upload_cleanup 400 404 499 500-505; - } - - location @upload { - return 200; - } - } -} diff --git a/QAT/centos-7/media/nginx_sw/shell.sh b/QAT/centos-7/media/nginx_sw/shell.sh deleted file mode 100755 index adc70ad7b..000000000 --- a/QAT/centos-7/media/nginx_sw/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="qat-centos7-media-nginx_sw" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/qatshell.sh" diff --git a/QAT/ubuntu-20.04/media/dev/Dockerfile b/QAT/ubuntu-20.04/media/dev/Dockerfile index d437f4edc..baadeed15 100644 --- a/QAT/ubuntu-20.04/media/dev/Dockerfile +++ b/QAT/ubuntu-20.04/media/dev/Dockerfile @@ -3,7 +3,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -47,7 +47,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -85,10 +86,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build openssl -ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1q.tar.gz +ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1s.tar.gz RUN cd /opt/build && \ wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ + cd openssl-OpenSSL_1_1_1s && \ ./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 && \ diff --git a/QAT/ubuntu-20.04/media/nginx/Dockerfile b/QAT/ubuntu-20.04/media/nginx/Dockerfile index e4e02d135..b94936989 100644 --- a/QAT/ubuntu-20.04/media/nginx/Dockerfile +++ b/QAT/ubuntu-20.04/media/nginx/Dockerfile @@ -3,7 +3,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -47,7 +47,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -85,10 +86,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build openssl -ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1q.tar.gz +ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1s.tar.gz RUN cd /opt/build && \ wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ + cd openssl-OpenSSL_1_1_1s && \ ./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 && \ diff --git a/QAT/ubuntu-20.04/media/nginx_sw/Dockerfile b/QAT/ubuntu-20.04/media/nginx_sw/Dockerfile index 7995d3ab3..f1d3cd56f 100644 --- a/QAT/ubuntu-20.04/media/nginx_sw/Dockerfile +++ b/QAT/ubuntu-20.04/media/nginx_sw/Dockerfile @@ -3,7 +3,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -47,7 +47,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -85,10 +86,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build openssl -ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1q.tar.gz +ARG OPENSSL_REPO=https://github.com/openssl/openssl/archive/OpenSSL_1_1_1s.tar.gz RUN cd /opt/build && \ wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ + cd openssl-OpenSSL_1_1_1s && \ ./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 && \ diff --git a/README.md b/README.md index 25c1bdbf7..2111ba4b7 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,10 @@ The project supports the following platforms and OS'es: | Supported Platforms | Supported OS'es | | :---: | :--- | -| [Xeon](Xeon) | Ubuntu 20.04 LTS, CentOS 7 | -| [QAT](QAT) | Ubuntu 20.04 LTS, CentOS 7 | -| [SG1](SG1) | Ubuntu 20.04 LTS, CentOS 7 | +| [Xeon](Xeon) | Ubuntu 20.04 LTS, Ubuntu 22.04 LTS | +| [QAT](QAT) | Ubuntu 20.04 LTS | +| [SG1](SG1) | Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, CentOS 7 | +| [SG2](SG2) | Ubuntu 20.04 LTS, Ubuntu 22.04 LTS | Please see [Development and Test Report](doc/test.md) for the latest development statuses. diff --git a/SG1/centos-7/media/dev/Dockerfile b/SG1/centos-7/media/dev/Dockerfile index 82b877b9a..068f67d23 100644 --- a/SG1/centos-7/media/dev/Dockerfile +++ b/SG1/centos-7/media/dev/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -80,21 +80,6 @@ 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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 @@ -124,7 +109,8 @@ RUN yum install -y ca-certificates wget tar gcc-c++ make bzip2 # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -201,10 +187,10 @@ RUN cd /opt/build/SVT-HEVC/Build/linux && \ RUN yum install -y wget tar gcc-c++ make git # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -227,10 +213,10 @@ RUN cd /opt/build && \ RUN yum install -y gcc-c++ make wget # build gmmlib -ARG GMMLIB_REPO=https://github.com/VCDP/gmmlib/archive/intel-media-sg1-pv1.3.tar.gz +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${GMMLIB_REPO} | tar xz -RUN cd /opt/build/gmmlib-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/gmmlib-intel-gmmlib-22.3.0 && mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -239,10 +225,10 @@ RUN cd /opt/build/gmmlib-intel-media-sg1-pv1.3 && mkdir build && cd build && \ RUN yum install -y automake gcc libdrm-devel libtool make pkg-config wget which libX11-devel libXfixes-devel libXext-devel wayland-devel # build libva2 -ARG LIBVA2_REPO=https://github.com/VCDP/libva/archive/intel-media-sg1-pv1.3.tar.gz +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/refs/tags/2.16.0.tar.gz RUN cd /opt/build && \ wget -O - ${LIBVA2_REPO} | tar xz -RUN cd /opt/build/libva-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/libva-2.16.0 && \ ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib64 && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -251,10 +237,10 @@ RUN cd /opt/build/libva-intel-media-sg1-pv1.3 && \ RUN yum install -y gcc-c++ libpciaccess-devel make pkg-config wget devtoolset-9 # build media driver -ARG MEDIA_DRIVER_REPO=https://github.com/VCDP/media-driver/archive/intel-media-sg1-pv1.3.tar.gz +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MEDIA_DRIVER_REPO} | tar xz -RUN cd /opt/build/media-driver-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/media-driver-intel-media-22.5.4 && mkdir build && cd build && \ (. /opt/rh/devtoolset-9/enable && cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DENABLE_PRODUCTION_KMD=ON .. && \ make -j$(nproc) ) && \ make install DESTDIR=/opt/dist && \ @@ -263,10 +249,10 @@ RUN cd /opt/build/media-driver-intel-media-sg1-pv1.3 && mkdir build && cd build RUN yum install -y gcc gcc-c++ make pkg-config wget devtoolset-9 # build media sdk -ARG MSDK_REPO=https://github.com/VCDP/MediaSDK/archive/intel-media-sg1-pv1.3.tar.gz +ARG MSDK_REPO=https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MSDK_REPO} | tar xz -RUN cd /opt/build/MediaSDK-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/MediaSDK-intel-mediasdk-22.5.4 && \ mkdir -p build && cd build && \ (. /opt/rh/devtoolset-9/enable && cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -281,27 +267,31 @@ RUN cd /opt/build/MediaSDK-intel-media-sg1-pv1.3 && \ RUN yum install -y wget patch git libv4l-devel libass-devel freetype-devel # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz RUN cd /opt/build && \ wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ - cd /opt/build/FFmpeg-n4.4 && \ + cd /opt/build/FFmpeg && \ patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-openssl --extra-ldflags=-Wl,-rpath=/usr/local/ssl/lib --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --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-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install @@ -311,9 +301,6 @@ 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" diff --git a/SG1/centos-7/media/dev/Dockerfile.m4 b/SG1/centos-7/media/dev/Dockerfile.m4 index a555c3899..0dfa5f6f3 100644 --- a/SG1/centos-7/media/dev/Dockerfile.m4 +++ b/SG1/centos-7/media/dev/Dockerfile.m4 @@ -4,7 +4,6 @@ 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) diff --git a/SG1/centos-7/media/ffmpeg/Dockerfile b/SG1/centos-7/media/ffmpeg/Dockerfile index a317256ce..f6641c96a 100644 --- a/SG1/centos-7/media/ffmpeg/Dockerfile +++ b/SG1/centos-7/media/ffmpeg/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -109,7 +109,8 @@ RUN yum install -y ca-certificates wget tar gcc-c++ make bzip2 # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -199,10 +200,10 @@ RUN cd /opt/build/SVT-HEVC/Build/linux && \ RUN yum install -y wget tar gcc-c++ make git # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -225,10 +226,10 @@ RUN cd /opt/build && \ RUN yum install -y gcc-c++ make wget # build gmmlib -ARG GMMLIB_REPO=https://github.com/VCDP/gmmlib/archive/intel-media-sg1-pv1.3.tar.gz +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${GMMLIB_REPO} | tar xz -RUN cd /opt/build/gmmlib-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/gmmlib-intel-gmmlib-22.3.0 && mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -237,10 +238,10 @@ RUN cd /opt/build/gmmlib-intel-media-sg1-pv1.3 && mkdir build && cd build && \ RUN yum install -y automake gcc libdrm-devel libtool make pkg-config wget which libX11-devel libXfixes-devel libXext-devel wayland-devel # build libva2 -ARG LIBVA2_REPO=https://github.com/VCDP/libva/archive/intel-media-sg1-pv1.3.tar.gz +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/refs/tags/2.16.0.tar.gz RUN cd /opt/build && \ wget -O - ${LIBVA2_REPO} | tar xz -RUN cd /opt/build/libva-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/libva-2.16.0 && \ ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib64 && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -249,10 +250,10 @@ RUN cd /opt/build/libva-intel-media-sg1-pv1.3 && \ RUN yum install -y gcc-c++ libpciaccess-devel make pkg-config wget devtoolset-9 # build media driver -ARG MEDIA_DRIVER_REPO=https://github.com/VCDP/media-driver/archive/intel-media-sg1-pv1.3.tar.gz +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MEDIA_DRIVER_REPO} | tar xz -RUN cd /opt/build/media-driver-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/media-driver-intel-media-22.5.4 && mkdir build && cd build && \ (. /opt/rh/devtoolset-9/enable && cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DENABLE_PRODUCTION_KMD=ON .. && \ make -j$(nproc) ) && \ make install DESTDIR=/opt/dist && \ @@ -261,10 +262,10 @@ RUN cd /opt/build/media-driver-intel-media-sg1-pv1.3 && mkdir build && cd build RUN yum install -y gcc gcc-c++ make pkg-config wget devtoolset-9 # build media sdk -ARG MSDK_REPO=https://github.com/VCDP/MediaSDK/archive/intel-media-sg1-pv1.3.tar.gz +ARG MSDK_REPO=https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MSDK_REPO} | tar xz -RUN cd /opt/build/MediaSDK-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/MediaSDK-intel-mediasdk-22.5.4 && \ mkdir -p build && cd build && \ (. /opt/rh/devtoolset-9/enable && cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -279,14 +280,11 @@ RUN cd /opt/build/MediaSDK-intel-media-sg1-pv1.3 && \ RUN yum install -y gcc gcc-c++ make wget python36-numpy ccache eigen3-devel devtoolset-9 # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ (. /opt/rh/devtoolset-9/enable && cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -296,6 +294,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -304,45 +305,35 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ RUN yum install -y wget patch git libv4l-devel libass-devel freetype-devel # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz RUN cd /opt/build && \ wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ - cd /opt/build/FFmpeg-n4.4 && \ + cd /opt/build/FFmpeg && \ patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-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-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --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-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libdav1d && make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - (. /opt/rh/devtoolset-9/enable && cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib64 ) +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup RUN rm -rf /opt/dist/usr/local/include && \ diff --git a/SG1/ubuntu-20.04/media/dev/Dockerfile b/SG1/ubuntu-20.04/media/dev/Dockerfile index 0c9510cbb..029fdf5cf 100644 --- a/SG1/ubuntu-20.04/media/dev/Dockerfile +++ b/SG1/ubuntu-20.04/media/dev/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -72,24 +72,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 \ - 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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 && \ @@ -128,7 +110,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -223,10 +206,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -255,10 +238,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gmmlib -ARG GMMLIB_REPO=https://github.com/VCDP/gmmlib/archive/intel-media-sg1-pv1.3.tar.gz +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${GMMLIB_REPO} | tar xz -RUN cd /opt/build/gmmlib-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/gmmlib-intel-gmmlib-22.3.0 && mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -270,10 +253,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build libva2 -ARG LIBVA2_REPO=https://github.com/VCDP/libva/archive/intel-media-sg1-pv1.3.tar.gz +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/refs/tags/2.16.0.tar.gz RUN cd /opt/build && \ wget -O - ${LIBVA2_REPO} | tar xz -RUN cd /opt/build/libva-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/libva-2.16.0 && \ ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -285,10 +268,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build media driver -ARG MEDIA_DRIVER_REPO=https://github.com/VCDP/media-driver/archive/intel-media-sg1-pv1.3.tar.gz +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MEDIA_DRIVER_REPO} | tar xz -RUN cd /opt/build/media-driver-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/media-driver-intel-media-22.5.4 && mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -300,10 +283,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build media sdk -ARG MSDK_REPO=https://github.com/VCDP/MediaSDK/archive/intel-media-sg1-pv1.3.tar.gz +ARG MSDK_REPO=https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MSDK_REPO} | tar xz -RUN cd /opt/build/MediaSDK-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/MediaSDK-intel-mediasdk-22.5.4 && \ mkdir -p build && cd build && \ cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -321,27 +304,31 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz RUN cd /opt/build && \ wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ - cd /opt/build/FFmpeg-n4.4 && \ + cd /opt/build/FFmpeg && \ patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-libmfx --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-openssl --extra-ldflags=-Wl,-rpath=/usr/local/ssl/lib --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --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-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install @@ -351,9 +338,6 @@ 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:20.04 LABEL Description="This is the base image for Gstreamer ubuntu 20.04" diff --git a/SG1/ubuntu-20.04/media/dev/Dockerfile.m4 b/SG1/ubuntu-20.04/media/dev/Dockerfile.m4 index 70903c1d0..3b6d8d060 100644 --- a/SG1/ubuntu-20.04/media/dev/Dockerfile.m4 +++ b/SG1/ubuntu-20.04/media/dev/Dockerfile.m4 @@ -3,7 +3,6 @@ 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) diff --git a/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile b/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile index 828ee7271..0a8582b71 100644 --- a/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile +++ b/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -110,7 +110,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -221,10 +222,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -253,10 +254,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gmmlib -ARG GMMLIB_REPO=https://github.com/VCDP/gmmlib/archive/intel-media-sg1-pv1.3.tar.gz +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${GMMLIB_REPO} | tar xz -RUN cd /opt/build/gmmlib-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/gmmlib-intel-gmmlib-22.3.0 && mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -268,10 +269,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build libva2 -ARG LIBVA2_REPO=https://github.com/VCDP/libva/archive/intel-media-sg1-pv1.3.tar.gz +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/refs/tags/2.16.0.tar.gz RUN cd /opt/build && \ wget -O - ${LIBVA2_REPO} | tar xz -RUN cd /opt/build/libva-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/libva-2.16.0 && \ ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -283,10 +284,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build media driver -ARG MEDIA_DRIVER_REPO=https://github.com/VCDP/media-driver/archive/intel-media-sg1-pv1.3.tar.gz +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MEDIA_DRIVER_REPO} | tar xz -RUN cd /opt/build/media-driver-intel-media-sg1-pv1.3 && mkdir build && cd build && \ +RUN cd /opt/build/media-driver-intel-media-22.5.4 && mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -298,10 +299,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build media sdk -ARG MSDK_REPO=https://github.com/VCDP/MediaSDK/archive/intel-media-sg1-pv1.3.tar.gz +ARG MSDK_REPO=https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-22.5.4.tar.gz RUN cd /opt/build && \ wget -O - ${MSDK_REPO} | tar xz -RUN cd /opt/build/MediaSDK-intel-media-sg1-pv1.3 && \ +RUN cd /opt/build/MediaSDK-intel-mediasdk-22.5.4 && \ mkdir -p build && cd build && \ cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -319,14 +320,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -336,6 +334,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -347,45 +348,35 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz RUN cd /opt/build && \ wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ - cd /opt/build/FFmpeg-n4.4 && \ + cd /opt/build/FFmpeg && \ patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-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-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --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-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libdav1d && make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup RUN rm -rf /opt/dist/usr/local/include && \ diff --git a/SG1/ubuntu-22.04/CMakeLists.txt b/SG1/ubuntu-22.04/CMakeLists.txt new file mode 100644 index 000000000..7b997e48f --- /dev/null +++ b/SG1/ubuntu-22.04/CMakeLists.txt @@ -0,0 +1,3 @@ +set(OS_NAME "ubuntu") +set(OS_VERSION "22.04") +include(os) diff --git a/QAT/centos-7/media/CMakeLists.txt b/SG1/ubuntu-22.04/media/CMakeLists.txt similarity index 100% rename from QAT/centos-7/media/CMakeLists.txt rename to SG1/ubuntu-22.04/media/CMakeLists.txt diff --git a/SG1/ubuntu-22.04/media/dev/CMakeLists.txt b/SG1/ubuntu-22.04/media/dev/CMakeLists.txt new file mode 100644 index 000000000..f64ac91f9 --- /dev/null +++ b/SG1/ubuntu-22.04/media/dev/CMakeLists.txt @@ -0,0 +1,3 @@ +set(image "sg1_media_devel_ubuntu2204") +include(image) +include(ffmpeg-tests) diff --git a/SG1/ubuntu-22.04/media/dev/Dockerfile b/SG1/ubuntu-22.04/media/dev/Dockerfile new file mode 100644 index 000000000..99098c002 --- /dev/null +++ b/SG1/ubuntu-22.04/media/dev/Dockerfile @@ -0,0 +1,360 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + 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 meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake g++ make wget && \ + rm -rf /var/lib/apt/lists/* + +# build gmmlib +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd /opt/build/gmmlib-intel-gmmlib-22.3.0 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + automake ca-certificates gcc libdrm-dev libtool make pkg-config wget libx11-dev libxext-dev libxfixes-dev libwayland-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libva2 +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/refs/tags/2.16.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd /opt/build/libva-2.16.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 cmake g++ libpciaccess-dev make pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media driver +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.5.4.tar.gz +RUN cd /opt/build && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd /opt/build/media-driver-intel-media-22.5.4 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ + 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 gcc g++ make cmake pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media sdk +ARG MSDK_REPO=https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-22.5.4.tar.gz +RUN cd /opt/build && \ + wget -O - ${MSDK_REPO} | tar xz +RUN cd /opt/build/MediaSDK-intel-mediasdk-22.5.4 && \ + mkdir -p build && cd build && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=no \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd /opt/build && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd /opt/build/FFmpeg && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true + + + + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-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-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:22.04 +LABEL Description="This is the base image for Gstreamer ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + 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 / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV LIBVA_DRIVERS_PATH=/usr/local/lib/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 + diff --git a/SG1/ubuntu-22.04/media/dev/Dockerfile.m4 b/SG1/ubuntu-22.04/media/dev/Dockerfile.m4 new file mode 100644 index 000000000..3b6d8d060 --- /dev/null +++ b/SG1/ubuntu-22.04/media/dev/Dockerfile.m4 @@ -0,0 +1,35 @@ + +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libaom.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(gmmlib.sg1.m4) +include(libva2.sg1.m4) +include(media-driver.sg1.m4) +include(msdk.sg1.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(devel,build)dnl + diff --git a/SG1/ubuntu-22.04/media/dev/README.md b/SG1/ubuntu-22.04/media/dev/README.md new file mode 100644 index 000000000..0e0c410af --- /dev/null +++ b/SG1/ubuntu-22.04/media/dev/README.md @@ -0,0 +1,46 @@ +This docker image is part of Open Visual Cloud software stacks. This is development image aim towards enabling C++ application compilation, debugging (with the debugging, profiling tools) and optimization (with the optimization tools.) You can compile C++ applications with this image and then copy the applications to the corresponding deployment image. Included what are in FFmpeg or GStreamer media creation and delivery images . Also included Intel hardware accelaration software stack such as media SDK, media driver, gmmlib and libva. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [sg1-ubuntu-2004-media-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/SG1/ubuntu-20.04/media/dev/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® SG1 platform, Ubuntu 20.04 + +- #### Usage instructions: + [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|OpenSSL|Apache License 2.0| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|Intel Graphics Memory Management Library| MIT License| +|Intel libva| MIT License +|Intel media driver | MIT License| +|Intel media SDK|MIT License| +|FFmpeg|GNU Lesser General Public License v2.1 or later| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/media/dev/build.sh b/SG1/ubuntu-22.04/media/dev/build.sh similarity index 73% rename from Xeon/centos-7/media/dev/build.sh rename to SG1/ubuntu-22.04/media/dev/build.sh index 7328867a1..037a61482 100755 --- a/Xeon/centos-7/media/dev/build.sh +++ b/SG1/ubuntu-22.04/media/dev/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-dev" +IMAGE="sg1-ubuntu2204-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/media/gst/shell.sh b/SG1/ubuntu-22.04/media/dev/shell.sh similarity index 73% rename from Xeon/centos-7/media/gst/shell.sh rename to SG1/ubuntu-22.04/media/dev/shell.sh index 609ceb49f..512ef64a9 100755 --- a/Xeon/centos-7/media/gst/shell.sh +++ b/SG1/ubuntu-22.04/media/dev/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-gst" +IMAGE="sg1-ubuntu2204-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/media/ffmpeg/.dockerignore b/SG1/ubuntu-22.04/media/ffmpeg/.dockerignore similarity index 100% rename from Xeon/centos-7/media/ffmpeg/.dockerignore rename to SG1/ubuntu-22.04/media/ffmpeg/.dockerignore diff --git a/Xeon/centos-7/media/ffmpeg/CMakeLists.txt b/SG1/ubuntu-22.04/media/ffmpeg/CMakeLists.txt similarity index 51% rename from Xeon/centos-7/media/ffmpeg/CMakeLists.txt rename to SG1/ubuntu-22.04/media/ffmpeg/CMakeLists.txt index 7409ee4e7..f3c692681 100644 --- a/Xeon/centos-7/media/ffmpeg/CMakeLists.txt +++ b/SG1/ubuntu-22.04/media/ffmpeg/CMakeLists.txt @@ -1,3 +1,3 @@ -set(image "xeon_ffmpeg_centos7") +set(image "sg1_ffmpeg_ubuntu2204") include(image) include(ffmpeg-tests) diff --git a/SG1/ubuntu-22.04/media/ffmpeg/Dockerfile b/SG1/ubuntu-22.04/media/ffmpeg/Dockerfile new file mode 100644 index 000000000..52e577081 --- /dev/null +++ b/SG1/ubuntu-22.04/media/ffmpeg/Dockerfile @@ -0,0 +1,406 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake g++ make wget && \ + rm -rf /var/lib/apt/lists/* + +# build gmmlib +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd /opt/build/gmmlib-intel-gmmlib-22.3.0 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + automake ca-certificates gcc libdrm-dev libtool make pkg-config wget libx11-dev libxext-dev libxfixes-dev libwayland-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libva2 +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/refs/tags/2.16.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd /opt/build/libva-2.16.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 cmake g++ libpciaccess-dev make pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media driver +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.5.4.tar.gz +RUN cd /opt/build && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd /opt/build/media-driver-intel-media-22.5.4 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ + 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 gcc g++ make cmake pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media sdk +ARG MSDK_REPO=https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-22.5.4.tar.gz +RUN cd /opt/build && \ + wget -O - ${MSDK_REPO} | tar xz +RUN cd /opt/build/MediaSDK-intel-mediasdk-22.5.4 && \ + mkdir -p build && cd build && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=no \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + 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 cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${OPENCV_REPO} | tar xz +# TODO: file a bug against opencv since they do not accept full libdir +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ + .. && \ + make -j $(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd /opt/build && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd /opt/build/FFmpeg && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true + + + + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-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-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libdav1d && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +#REBUILD_OPENCV_VIDEOIO()dnl + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:22.04 +LABEL Description="This is the base image for FFMPEG ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +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 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV LIBVA_DRIVERS_PATH=/usr/local/lib/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 + diff --git a/SG1/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 b/SG1/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 new file mode 100644 index 000000000..3e326e04f --- /dev/null +++ b/SG1/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 @@ -0,0 +1,37 @@ + +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libx264.m4) +include(libx265.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(gmmlib.sg1.m4) +include(libva2.sg1.m4) +include(media-driver.sg1.m4) +include(msdk.sg1.m4) +include(opencv.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for FFMPEG OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl + diff --git a/SG1/ubuntu-22.04/media/ffmpeg/README.md b/SG1/ubuntu-22.04/media/ffmpeg/README.md new file mode 100644 index 000000000..17e095eb7 --- /dev/null +++ b/SG1/ubuntu-22.04/media/ffmpeg/README.md @@ -0,0 +1,47 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Included FFmpeg and codecs such as opus, ogg, vorbis, x264, x265, vp8/9, av1 and SVT-HEVC. Also included Intel hardware accelaration software stack such as media SDK, media driver, gmmlib and libva. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [sg1-ubuntu-2004-media-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® SG1 platform, Ubuntu 20.04 + +- #### Usage instructions: + [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|Intel Graphics Memory Management Library| MIT License| +|Intel libva| MIT License +|Intel media driver | MIT License| +|Intel media SDK|MIT License| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|FFmpeg|GNU General Public License v2.0 or later| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/analytics/gst/build.sh b/SG1/ubuntu-22.04/media/ffmpeg/build.sh similarity index 71% rename from Xeon/centos-7/analytics/gst/build.sh rename to SG1/ubuntu-22.04/media/ffmpeg/build.sh index 7211aae97..5371e8fef 100755 --- a/Xeon/centos-7/analytics/gst/build.sh +++ b/SG1/ubuntu-22.04/media/ffmpeg/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-analytics-gst" +IMAGE="sg1-ubuntu2204-media-ffmpeg" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/analytics/dev/shell.sh b/SG1/ubuntu-22.04/media/ffmpeg/shell.sh similarity index 71% rename from Xeon/centos-7/analytics/dev/shell.sh rename to SG1/ubuntu-22.04/media/ffmpeg/shell.sh index c53363ed6..88a6a133a 100755 --- a/Xeon/centos-7/analytics/dev/shell.sh +++ b/SG1/ubuntu-22.04/media/ffmpeg/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-analytics-dev" +IMAGE="sg1-ubuntu2204-media-ffmpeg" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/SG2/CMakeLists.txt b/SG2/CMakeLists.txt new file mode 100644 index 000000000..c882766a5 --- /dev/null +++ b/SG2/CMakeLists.txt @@ -0,0 +1,2 @@ +set(platform "sg2") +include(platform) diff --git a/SG2/README.md b/SG2/README.md new file mode 100644 index 000000000..dbd00f46e --- /dev/null +++ b/SG2/README.md @@ -0,0 +1,18 @@ + + +This folder contains dockerfiles to build Server GPU SG2 software stack for Intel(R) Xeon(R) -SP or -D scalable processors with processor graphics. These are meant to be run on [Intel(R) Data Center GPU Flex series](https://www.intel.in/content/www/in/en/products/docs/discrete-gpus/data-center-gpu/flex-series/overview.html). + +### Setup host platform: + +Refer to below instructions to setup host platform: +- Install GPU and setup instructions (see [here](https://www.intel.com/content/www/us/en/developer/platform/data-center-gpu-flex.html#gs.mof7wp)) + +- Installing the docker.ce service (see [../README.md](../README.md).) + +### Docker Images: + +|Image|Dockerfile|Docker Image| +|:-:|---|---| +|media-dev|[ubuntu-20.04/media/dev](ubuntu-20.04/media/dev)
[ubuntu-22.04/media/dev](ubuntu-22.04/media/dev)|[openvisualcloud/sg2-ubuntu2004-media-dev](https://hub.docker.com/r/openvisualcloud/sg2-ubuntu2004-media-dev)
[openvisualcloud/sg2-ubuntu2204-media-dev](https://hub.docker.com/r/openvisualcloud/sg2-ubuntu2204-media-dev)| +|media-ffmpeg|[ubuntu-20.04/media/ffmpeg](ubuntu-20.04/media/ffmpeg)
[ubuntu-22.04/media/ffmpeg](ubuntu-22.04/media/ffmpeg)|[openvisualcloud/sg2-ubuntu2004-media-ffmpeg](https://hub.docker.com/r/openvisualcloud/sg2-ubuntu2004-media-ffmpeg)
[openvisualcloud/sg2-ubuntu2204-media-ffmpeg](https://hub.docker.com/r/openvisualcloud/sg2-ubuntu2204-media-ffmpeg)| +|media-ffmpeg|[ubuntu-20.04/media/ffmpeg](ubuntu-20.04/media/ffmpeg)
[ubuntu-22.04/media/ffmpeg](ubuntu-22.04/media/ffmpeg)|[openvisualcloud/sg2-ubuntu2004-media-ffmpeg](https://hub.docker.com/r/openvisualcloud/sg2-ubuntu2004-media-ffmpeg)
[openvisualcloud/sg2-ubuntu2204-media-ffmpeg](https://hub.docker.com/r/openvisualcloud/sg2-ubuntu2204-media-ffmpeg)| diff --git a/SG2/ubuntu-20.04/CMakeLists.txt b/SG2/ubuntu-20.04/CMakeLists.txt new file mode 100644 index 000000000..a09d7d877 --- /dev/null +++ b/SG2/ubuntu-20.04/CMakeLists.txt @@ -0,0 +1,3 @@ +set(OS_NAME "ubuntu") +set(OS_VERSION "20.04") +include(os) diff --git a/Xeon/centos-7/analytics/CMakeLists.txt b/SG2/ubuntu-20.04/analytics/CMakeLists.txt similarity index 100% rename from Xeon/centos-7/analytics/CMakeLists.txt rename to SG2/ubuntu-20.04/analytics/CMakeLists.txt diff --git a/Xeon/centos-7/analytics/gst/CMakeLists.txt b/SG2/ubuntu-20.04/analytics/dev/CMakeLists.txt similarity index 58% rename from Xeon/centos-7/analytics/gst/CMakeLists.txt rename to SG2/ubuntu-20.04/analytics/dev/CMakeLists.txt index efe2ada41..3afaaeaae 100644 --- a/Xeon/centos-7/analytics/gst/CMakeLists.txt +++ b/SG2/ubuntu-20.04/analytics/dev/CMakeLists.txt @@ -1,4 +1,4 @@ -set(image "xeon_analytics_gst_centos7") +set(image "sg2_analytics_dev_ubuntu2004") include(image) include(gst-tests) include(dldt-gst-tests) diff --git a/SG2/ubuntu-20.04/analytics/dev/Dockerfile b/SG2/ubuntu-20.04/analytics/dev/Dockerfile new file mode 100644 index 000000000..c2f812d0a --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/dev/Dockerfile @@ -0,0 +1,716 @@ + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:20.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + 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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 gpg-agent software-properties-common wget && \ + rm -rf /var/lib/apt/lists/* + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal main" | tee /etc/apt/sources.list.d/intel.gpu.focal.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${OPENCV_REPO} | tar xz +# TODO: file a bug against opencv since they do not accept full libdir +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ + .. && \ + 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 cmake gcc g++ git libboost-all-dev libgtk2.0-dev libgtk-3-dev libtool libusb-1.0-0-dev make xz-utils libnuma-dev ocl-icd-opencl-dev opencl-headers && \ + rm -rf /var/lib/apt/lists/* + +# build dldt +ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git +RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ + cd /opt/build/openvino && \ + git submodule update --init --recursive + +RUN cd /opt/build/openvino && \ + mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ + -DENABLE_CPPLINT=OFF \ + -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ + -DENABLE_VPU=OFF \ + -DENABLE_OPENCV=OFF \ + -DENABLE_MKL_DNN=ON \ + -DENABLE_CLDNN=ON \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. && \ + make -j $(nproc) && \ + make install && \ + make install DESTDIR=/opt/dist + + +ARG OPENVINO_INSTALL_DIR=/usr/local/openvino +ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ + +ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake +ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake +ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake + + + +ARG LIBJSONC_REPO=https://github.com/json-c/json-c/archive/json-c-0.16-20220414.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBJSONC_REPO} | tar xz && \ + cd json-c-json-c-0.16-20220414 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +ARG KAFKA_VER=1.9.2 +ARG LIBRDKAFKA_REPO=https://github.com/edenhill/librdkafka/archive/v${KAFKA_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBRDKAFKA_REPO} | tar xz && \ + cd librdkafka-1.9.2 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=disabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=disabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libdrm-dev libglib2.0-dev libudev-dev flex bison libva-dev && \ + rm -rf /var/lib/apt/lists/* + +# patch gst-vaapi with gst-video-analytics patch +ARG GST_PLUGIN_VAAPI_PATCH_VER=ec2748da5b577bbf510525f57eabde6c58efd589 +ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/dlstreamer/dlstreamer + +# build gst-plugin-vaapi +ARG GSTVAAPI_REPO=https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTVAAPI_REPO} | tar xJ + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + git clone ${GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS} && \ + cd dlstreamer && git checkout ${GST_PLUGIN_VAAPI_PATCH_VER} && \ + cd .. && \ + git apply dlstreamer/patches/gstreamer-vaapi/*.patch && \ + rm -fr dlstreamer + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=release \ + -Dexamples=disabled \ + -Dtests=disabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget make libssl-dev uuid-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libpahomqtt +ARG PAHO_VER=1.3.10 +ARG LIBPAHO_REPO=https://github.com/eclipse/paho.mqtt.c/archive/v${PAHO_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBPAHO_REPO} | tar -xz +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + make && \ + make install + +#Copy and link in runtime layer +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + cp build/output/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/paho_c_version /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_sub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_sub /opt/dist/usr/local/bin/ && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3c.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3a.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3as.so && \ + cp src/MQTTAsync.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClient.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClientPersistence.h /opt/dist/usr/local/include/ && \ + cp src/MQTTProperties.h /opt/dist/usr/local/include/ && \ + cp src/MQTTReasonCodes.h /opt/dist/usr/local/include/ && \ + cp src/MQTTSubscribeOpts.h /opt/dist/usr/local/include/; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-gva +# formerly https://github.com/opencv/gst-video-analytics +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer +ENV LIBRARY_PATH=/usr/local/lib +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ + cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ + git submodule update --init && \ + mkdir -p build && cd build && \ + cmake \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=ON \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ + && make -j $(nproc) \ + && make install \ + && make install DESTDIR=/opt/dist + +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ + +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /opt/dist//usr/local/lib/gstreamer-1.0/. +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + +RUN mkdir -p /opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/intel/dl_streamer/python + +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs +sed -i "s/.*python\.dependency.*/pythonver \= python\.language_version\(\)\npython_dep \= dependency\(\'python-\@0\@-embed\'\.format\(pythonver\)\, version\: \'\>\=3\'\, required\: false\)\nif not python_dep\.found\(\)\n\tpython_dep \= python\.dependency\(required \: true\)\nendif/g" meson.build && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout f6a36c7 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl + + +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1; + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +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/openvino/inference-engine/external/tbb/doc + +FROM ubuntu:20.04 +LABEL Description="This is the development image for ubuntu 20.04 on Flex Series GPU" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gpg-agent software-properties-common wget libgtk-3-0 libnuma1 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libdrm2 libpciaccess0 libgl1-mesa-dev libva2 libva-drm2 libva-x11-2 libva-wayland2 libgles2 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + rm -rf /var/lib/apt/lists/* +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + + +ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ +ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake +ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner +ENV GST_VAAPI_ALL_DRIVERS=1 + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal main" | tee /etc/apt/sources.list.d/intel.gpu.focal.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +# install DLDT +ARG CUSTOM_IE_DIR=/usr/local/openvino/ +ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 +RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/SG2/ubuntu-20.04/analytics/dev/Dockerfile.m4 b/SG2/ubuntu-20.04/analytics/dev/Dockerfile.m4 new file mode 100644 index 000000000..b813dcfe3 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/dev/Dockerfile.m4 @@ -0,0 +1,46 @@ +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libaom.m4) +include(meson.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(media-driver-pkg.sg2.m4) +include(dldt-ie.m4) +include(libjsonc.m4) +include(librdkafka.m4) +include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-vaapi.m4) +include(gst-svt.m4) +include(opencv.m4) +include(libpahomqtt.m4) +include(gst-gva.m4) +include(gst-python.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +define(`CLEANUP_CC',no)dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the development image for OS_NAME OS_VERSION on Flex Series GPU" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl diff --git a/Xeon/centos-7/analytics/gst/README.md b/SG2/ubuntu-20.04/analytics/dev/README.md similarity index 92% rename from Xeon/centos-7/analytics/gst/README.md rename to SG2/ubuntu-20.04/analytics/dev/README.md index cdf6cbce5..8e0ecc2e7 100644 --- a/Xeon/centos-7/analytics/gst/README.md +++ b/SG2/ubuntu-20.04/analytics/dev/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for Media Analytics. Included what are in media delivery GStreamer image, inferencing engine and video analytics plugins. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-analytics-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/analytics/gst/Dockerfile) + - [xeon-ubuntu-2004-analytics-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/ubuntu-20.04/analytics/gst/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 20.04 - #### Usage instructions: [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| |Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| diff --git a/SG2/ubuntu-20.04/analytics/dev/build.sh b/SG2/ubuntu-20.04/analytics/dev/build.sh new file mode 100755 index 000000000..598b0f0c9 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/dev/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2004-analytics-dev" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/SG2/ubuntu-20.04/analytics/dev/shell.sh b/SG2/ubuntu-20.04/analytics/dev/shell.sh new file mode 100755 index 000000000..e23687b7b --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/dev/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2004-analytics-dev" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/SG2/ubuntu-20.04/analytics/gst/CMakeLists.txt b/SG2/ubuntu-20.04/analytics/gst/CMakeLists.txt new file mode 100644 index 000000000..b79d1a477 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/gst/CMakeLists.txt @@ -0,0 +1,4 @@ +set(image "sg2_analytics_gst_ubuntu2004") +include(image) +include(gst-tests) +include(dldt-gst-tests) diff --git a/SG2/ubuntu-20.04/analytics/gst/Dockerfile b/SG2/ubuntu-20.04/analytics/gst/Dockerfile new file mode 100644 index 000000000..49d973316 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/gst/Dockerfile @@ -0,0 +1,720 @@ + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:20.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 gpg-agent software-properties-common wget && \ + rm -rf /var/lib/apt/lists/* + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal main" | tee /etc/apt/sources.list.d/intel.gpu.focal.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${OPENCV_REPO} | tar xz +# TODO: file a bug against opencv since they do not accept full libdir +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ + .. && \ + 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 cmake gcc g++ git libboost-all-dev libgtk2.0-dev libgtk-3-dev libtool libusb-1.0-0-dev make xz-utils libnuma-dev ocl-icd-opencl-dev opencl-headers && \ + rm -rf /var/lib/apt/lists/* + +# build dldt +ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git +RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ + cd /opt/build/openvino && \ + git submodule update --init --recursive + +RUN cd /opt/build/openvino && \ + mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ + -DENABLE_CPPLINT=OFF \ + -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ + -DENABLE_VPU=OFF \ + -DENABLE_OPENCV=OFF \ + -DENABLE_MKL_DNN=ON \ + -DENABLE_CLDNN=ON \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. && \ + make -j $(nproc) && \ + make install && \ + make install DESTDIR=/opt/dist + + +ARG OPENVINO_INSTALL_DIR=/usr/local/openvino +ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ + +ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake +ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake +ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake + + + +ARG LIBJSONC_REPO=https://github.com/json-c/json-c/archive/json-c-0.16-20220414.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBJSONC_REPO} | tar xz && \ + cd json-c-json-c-0.16-20220414 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +ARG KAFKA_VER=1.9.2 +ARG LIBRDKAFKA_REPO=https://github.com/edenhill/librdkafka/archive/v${KAFKA_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBRDKAFKA_REPO} | tar xz && \ + cd librdkafka-1.9.2 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=enabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libdrm-dev libglib2.0-dev libudev-dev flex bison libva-dev && \ + rm -rf /var/lib/apt/lists/* + +# patch gst-vaapi with gst-video-analytics patch +ARG GST_PLUGIN_VAAPI_PATCH_VER=ec2748da5b577bbf510525f57eabde6c58efd589 +ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/dlstreamer/dlstreamer + +# build gst-plugin-vaapi +ARG GSTVAAPI_REPO=https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTVAAPI_REPO} | tar xJ + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + git clone ${GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS} && \ + cd dlstreamer && git checkout ${GST_PLUGIN_VAAPI_PATCH_VER} && \ + cd .. && \ + git apply dlstreamer/patches/gstreamer-vaapi/*.patch && \ + rm -fr dlstreamer + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=release \ + -Dexamples=disabled \ + -Dtests=disabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget make libssl-dev uuid-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libpahomqtt +ARG PAHO_VER=1.3.10 +ARG LIBPAHO_REPO=https://github.com/eclipse/paho.mqtt.c/archive/v${PAHO_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBPAHO_REPO} | tar -xz +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + make && \ + make install + +#Copy and link in runtime layer +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + cp build/output/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/paho_c_version /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_sub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_sub /opt/dist/usr/local/bin/ && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3c.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3a.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3as.so && \ + cp src/MQTTAsync.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClient.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClientPersistence.h /opt/dist/usr/local/include/ && \ + cp src/MQTTProperties.h /opt/dist/usr/local/include/ && \ + cp src/MQTTReasonCodes.h /opt/dist/usr/local/include/ && \ + cp src/MQTTSubscribeOpts.h /opt/dist/usr/local/include/; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-gva +# formerly https://github.com/opencv/gst-video-analytics +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer +ENV LIBRARY_PATH=/usr/local/lib +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ + cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ + git submodule update --init && \ + mkdir -p build && cd build && \ + cmake \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=ON \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ + && make -j $(nproc) \ + && make install \ + && make install DESTDIR=/opt/dist + +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ + +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /opt/dist//usr/local/lib/gstreamer-1.0/. +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + +RUN mkdir -p /opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/intel/dl_streamer/python + +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs +sed -i "s/.*python\.dependency.*/pythonver \= python\.language_version\(\)\npython_dep \= dependency\(\'python-\@0\@-embed\'\.format\(pythonver\)\, version\: \'\>\=3\'\, required\: false\)\nif not python_dep\.found\(\)\n\tpython_dep \= python\.dependency\(required \: true\)\nendif/g" meson.build && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 cd /opt/dist/usr/local/openvino/runtime && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig/openvino.pc \ + include src share/*.cmake cmake lib/intel64/*.a external/tbb/include external/tbb/cmake +RUN rm -rf /opt/dist/usr/local/openvino/inference-engine/external/tbb/doc + +FROM ubuntu:20.04 +LABEL Description="This is the base image for Gstreamer ubuntu 20.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libnuma1 ca-certificates gpg-agent software-properties-common wget libgtk-3-0 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libdrm2 libpciaccess0 libgl1-mesa-dev libva2 libva-drm2 libva-x11-2 libva-wayland2 libgles2 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + + +ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ +ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake +ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner +ENV GST_VAAPI_ALL_DRIVERS=1 + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal main" | tee /etc/apt/sources.list.d/intel.gpu.focal.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +# install DLDT +ARG CUSTOM_IE_DIR=/usr/local/openvino/ +ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 +RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/SG2/ubuntu-20.04/analytics/gst/Dockerfile.m4 b/SG2/ubuntu-20.04/analytics/gst/Dockerfile.m4 new file mode 100644 index 000000000..fa4d4ad69 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/gst/Dockerfile.m4 @@ -0,0 +1,46 @@ +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.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(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(media-driver-pkg.sg2.m4) +include(dldt-ie.m4) +include(libjsonc.m4) +include(librdkafka.m4) +include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-vaapi.m4) +include(gst-svt.m4) +include(opencv.m4) +include(libpahomqtt.m4) +include(gst-gva.m4) +include(gst-python.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl diff --git a/SG2/ubuntu-20.04/analytics/gst/README.md b/SG2/ubuntu-20.04/analytics/gst/README.md new file mode 100644 index 000000000..8e0ecc2e7 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/gst/README.md @@ -0,0 +1,56 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for Media Analytics. Included what are in media delivery GStreamer image, inferencing engine and video analytics plugins. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [xeon-ubuntu-2004-analytics-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/ubuntu-20.04/analytics/gst/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® Xeon® platform, Ubuntu 20.04 + +- #### Usage instructions: + [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|OpenVINO|Apache License v2.0| +|json-c|MIT License| +|librdkafka|BSD 2-clause "Simplified" License| +|gstreamer|GNU Lesser General Public License v2.1 or later| +|gst plugins base|GNU Lesser General Public License v2.1 or later| +|gst plugins good|GNU Lesser General Public License v2.1 or later| +|gst plugins bad|GNU Lesser General Public License v2.1 or later| +|gst plugins ugly|GNU Lesser General Public License v2.1 or later| +|gst libav|GNU Library General Public License Version 2.1 or later| +|gst svt|GNU Lesser General Public License v2.1 or later| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|paho.mqtt.c|Eclipse Public License - v 2.0| +|gst video analytics|MIT License| +|gst python|GNU Library General Public License Version 2.1| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/SG2/ubuntu-20.04/analytics/gst/build.sh b/SG2/ubuntu-20.04/analytics/gst/build.sh new file mode 100755 index 000000000..799debaa0 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/gst/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2004-analytics-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/SG2/ubuntu-20.04/analytics/gst/shell.sh b/SG2/ubuntu-20.04/analytics/gst/shell.sh new file mode 100755 index 000000000..72fd55498 --- /dev/null +++ b/SG2/ubuntu-20.04/analytics/gst/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2004-analytics-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/media/CMakeLists.txt b/SG2/ubuntu-20.04/media/CMakeLists.txt similarity index 100% rename from Xeon/centos-7/media/CMakeLists.txt rename to SG2/ubuntu-20.04/media/CMakeLists.txt diff --git a/SG2/ubuntu-20.04/media/dev/CMakeLists.txt b/SG2/ubuntu-20.04/media/dev/CMakeLists.txt new file mode 100644 index 000000000..73ee0bdcf --- /dev/null +++ b/SG2/ubuntu-20.04/media/dev/CMakeLists.txt @@ -0,0 +1,3 @@ +set(image "sg2_media_devel_ubuntu2004") +include(image) +include(ffmpeg-tests) diff --git a/SG2/ubuntu-20.04/media/dev/Dockerfile b/SG2/ubuntu-20.04/media/dev/Dockerfile new file mode 100644 index 000000000..4933713c6 --- /dev/null +++ b/SG2/ubuntu-20.04/media/dev/Dockerfile @@ -0,0 +1,420 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:20.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + 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 meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake g++ make wget && \ + rm -rf /var/lib/apt/lists/* + +# build gmmlib +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd /opt/build/gmmlib-intel-gmmlib-22.1.7 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + automake ca-certificates gcc libdrm-dev libtool make pkg-config wget libx11-dev libxext-dev libxfixes-dev libwayland-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libva2 +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd /opt/build/libva-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +# build libva-utils +ARG LIBVA_UTILS_REPO=https://github.com/intel/libva-utils/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA_UTILS_REPO} | tar xz +RUN cd /opt/build/libva-utils-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 cmake g++ libpciaccess-dev make pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media driver +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/intel-media-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd /opt/build/media-driver-intel-media-22.5.2 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ + 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 gcc g++ make cmake pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl runtime for GPU +ARG ONEVPL_GPU_REPO=https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_GPU_REPO} | tar xz +RUN cd /opt/build/oneVPL-intel-gpu-intel-onevpl-22.5.2 && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + + +# Patch with oneVPL patches +RUN cd /opt/build && \ + if [ ! -d "media-delivery" ]; then git clone https://github.com/intel/media-delivery && cd media-delivery && git checkout v3; fi + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gcc g++ make git cmake patch && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl dispatcher +ARG ONEVPL_DISP_REPO=https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2022.2.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_DISP_REPO} | tar xz +RUN cd /opt/build/oneVPL-2022.2.0 && \ + cp /opt/build/media-delivery/patches/libvpl2/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout f6a36c7 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd /opt/build && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd /opt/build/FFmpeg && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true + + + +RUN cd /opt/build/FFmpeg && \ + cp /opt/build/media-delivery/patches/ffmpeg/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } + + +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1; + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d --enable-libvpl && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:20.04 +LABEL Description="This is the base image for Gstreamer ubuntu 20.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + 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 / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV LIBVA_DRIVERS_PATH=/usr/local/lib/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 + +# Define ONEVPL lib dir +ENV ONEVPL_SEARCH_PATH=/usr/local/lib + diff --git a/SG2/ubuntu-20.04/media/dev/Dockerfile.m4 b/SG2/ubuntu-20.04/media/dev/Dockerfile.m4 new file mode 100644 index 000000000..246487ce3 --- /dev/null +++ b/SG2/ubuntu-20.04/media/dev/Dockerfile.m4 @@ -0,0 +1,37 @@ + +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libaom.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(gmmlib.sg2.m4) +include(libva2.sg2.m4) +include(libva-utils.sg2.m4) +include(media-driver.sg2.m4) +include(onevpl-atsm.m4) +include(onevpl-dispatch.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(devel,build)dnl + diff --git a/SG2/ubuntu-20.04/media/dev/README.md b/SG2/ubuntu-20.04/media/dev/README.md new file mode 100644 index 000000000..102d5cbae --- /dev/null +++ b/SG2/ubuntu-20.04/media/dev/README.md @@ -0,0 +1,46 @@ +This docker image is part of Open Visual Cloud software stacks. This is development image aim towards enabling C++ application compilation, debugging (with the debugging, profiling tools) and optimization (with the optimization tools.) You can compile C++ applications with this image and then copy the applications to the corresponding deployment image. Included what are in FFmpeg or GStreamer media creation and delivery images . Also included Intel hardware accelaration software stack such as media SDK, media driver, gmmlib and libva. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [sg2-ubuntu-2004-media-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/SG1/ubuntu-20.04/media/dev/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® SG2 platform, Ubuntu 20.04 + +- #### Usage instructions: + [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|OpenSSL|Apache License 2.0| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|Intel Graphics Memory Management Library| MIT License| +|Intel libva| MIT License +|Intel media driver | MIT License| +|Intel media SDK|MIT License| +|FFmpeg|GNU Lesser General Public License v2.1 or later| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/media/gst/build.sh b/SG2/ubuntu-20.04/media/dev/build.sh similarity index 73% rename from Xeon/centos-7/media/gst/build.sh rename to SG2/ubuntu-20.04/media/dev/build.sh index d77689a01..6e4013bad 100755 --- a/Xeon/centos-7/media/gst/build.sh +++ b/SG2/ubuntu-20.04/media/dev/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-gst" +IMAGE="sg2-ubuntu2004-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/media/dev/shell.sh b/SG2/ubuntu-20.04/media/dev/shell.sh similarity index 73% rename from Xeon/centos-7/media/dev/shell.sh rename to SG2/ubuntu-20.04/media/dev/shell.sh index 0de805778..0c0ac8021 100755 --- a/Xeon/centos-7/media/dev/shell.sh +++ b/SG2/ubuntu-20.04/media/dev/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-dev" +IMAGE="sg2-ubuntu2004-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/media/gst/.dockerignore b/SG2/ubuntu-20.04/media/ffmpeg/.dockerignore similarity index 100% rename from Xeon/centos-7/media/gst/.dockerignore rename to SG2/ubuntu-20.04/media/ffmpeg/.dockerignore diff --git a/SG2/ubuntu-20.04/media/ffmpeg/CMakeLists.txt b/SG2/ubuntu-20.04/media/ffmpeg/CMakeLists.txt new file mode 100644 index 000000000..9d2d20553 --- /dev/null +++ b/SG2/ubuntu-20.04/media/ffmpeg/CMakeLists.txt @@ -0,0 +1,3 @@ +set(image "sg2_ffmpeg_ubuntu2004") +include(image) +include(ffmpeg-tests) diff --git a/SG2/ubuntu-20.04/media/ffmpeg/Dockerfile b/SG2/ubuntu-20.04/media/ffmpeg/Dockerfile new file mode 100644 index 000000000..95ddf30e3 --- /dev/null +++ b/SG2/ubuntu-20.04/media/ffmpeg/Dockerfile @@ -0,0 +1,436 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:20.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake g++ make wget && \ + rm -rf /var/lib/apt/lists/* + +# build gmmlib +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd /opt/build/gmmlib-intel-gmmlib-22.1.7 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + automake ca-certificates gcc libdrm-dev libtool make pkg-config wget libx11-dev libxext-dev libxfixes-dev libwayland-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libva2 +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd /opt/build/libva-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +# build libva-utils +ARG LIBVA_UTILS_REPO=https://github.com/intel/libva-utils/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA_UTILS_REPO} | tar xz +RUN cd /opt/build/libva-utils-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 cmake g++ libpciaccess-dev make pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media driver +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/intel-media-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd /opt/build/media-driver-intel-media-22.5.2 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ + 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 gcc g++ make cmake pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl runtime for GPU +ARG ONEVPL_GPU_REPO=https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_GPU_REPO} | tar xz +RUN cd /opt/build/oneVPL-intel-gpu-intel-onevpl-22.5.2 && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + + +# Patch with oneVPL patches +RUN cd /opt/build && \ + if [ ! -d "media-delivery" ]; then git clone https://github.com/intel/media-delivery && cd media-delivery && git checkout v3; fi + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gcc g++ make git cmake patch && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl dispatcher +ARG ONEVPL_DISP_REPO=https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2022.2.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_DISP_REPO} | tar xz +RUN cd /opt/build/oneVPL-2022.2.0 && \ + cp /opt/build/media-delivery/patches/libvpl2/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout f6a36c7 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd /opt/build && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd /opt/build/FFmpeg && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true + + + +RUN cd /opt/build/FFmpeg && \ + cp /opt/build/media-delivery/patches/ffmpeg/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } + + +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1; + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d --enable-libvpl && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:20.04 +LABEL Description="This is the base image for FFMPEG ubuntu 20.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +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 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV LIBVA_DRIVERS_PATH=/usr/local/lib/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 + +# Define ONEVPL lib dir +ENV ONEVPL_SEARCH_PATH=/usr/local/lib + diff --git a/SG2/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 b/SG2/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 new file mode 100644 index 000000000..7e6ae8cd9 --- /dev/null +++ b/SG2/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 @@ -0,0 +1,38 @@ + +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libx264.m4) +include(libx265.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(gmmlib.sg2.m4) +include(libva2.sg2.m4) +include(libva-utils.sg2.m4) +include(media-driver.sg2.m4) +include(onevpl-atsm.m4) +include(onevpl-dispatch.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for FFMPEG OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl + diff --git a/SG2/ubuntu-20.04/media/ffmpeg/README.md b/SG2/ubuntu-20.04/media/ffmpeg/README.md new file mode 100644 index 000000000..17e095eb7 --- /dev/null +++ b/SG2/ubuntu-20.04/media/ffmpeg/README.md @@ -0,0 +1,47 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Included FFmpeg and codecs such as opus, ogg, vorbis, x264, x265, vp8/9, av1 and SVT-HEVC. Also included Intel hardware accelaration software stack such as media SDK, media driver, gmmlib and libva. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [sg1-ubuntu-2004-media-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® SG1 platform, Ubuntu 20.04 + +- #### Usage instructions: + [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|Intel Graphics Memory Management Library| MIT License| +|Intel libva| MIT License +|Intel media driver | MIT License| +|Intel media SDK|MIT License| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|FFmpeg|GNU General Public License v2.0 or later| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/analytics/dev/build.sh b/SG2/ubuntu-20.04/media/ffmpeg/build.sh similarity index 71% rename from Xeon/centos-7/analytics/dev/build.sh rename to SG2/ubuntu-20.04/media/ffmpeg/build.sh index 081c40312..bcc829149 100755 --- a/Xeon/centos-7/analytics/dev/build.sh +++ b/SG2/ubuntu-20.04/media/ffmpeg/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-analytics-dev" +IMAGE="sg2-ubuntu2004-media-ffmpeg" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/analytics/gst/shell.sh b/SG2/ubuntu-20.04/media/ffmpeg/shell.sh similarity index 71% rename from Xeon/centos-7/analytics/gst/shell.sh rename to SG2/ubuntu-20.04/media/ffmpeg/shell.sh index a988baae4..73747ca90 100755 --- a/Xeon/centos-7/analytics/gst/shell.sh +++ b/SG2/ubuntu-20.04/media/ffmpeg/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-analytics-gst" +IMAGE="sg2-ubuntu2004-media-ffmpeg" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/SG2/ubuntu-22.04/CMakeLists.txt b/SG2/ubuntu-22.04/CMakeLists.txt new file mode 100644 index 000000000..7b997e48f --- /dev/null +++ b/SG2/ubuntu-22.04/CMakeLists.txt @@ -0,0 +1,3 @@ +set(OS_NAME "ubuntu") +set(OS_VERSION "22.04") +include(os) diff --git a/Xeon/centos-7/service/CMakeLists.txt b/SG2/ubuntu-22.04/analytics/CMakeLists.txt similarity index 100% rename from Xeon/centos-7/service/CMakeLists.txt rename to SG2/ubuntu-22.04/analytics/CMakeLists.txt diff --git a/SG2/ubuntu-22.04/analytics/dev/CMakeLists.txt b/SG2/ubuntu-22.04/analytics/dev/CMakeLists.txt new file mode 100644 index 000000000..d80bfccb1 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/dev/CMakeLists.txt @@ -0,0 +1,4 @@ +set(image "sg2_analytics_dev_ubuntu2204") +include(image) +include(gst-tests) +include(dldt-gst-tests) diff --git a/SG2/ubuntu-22.04/analytics/dev/Dockerfile b/SG2/ubuntu-22.04/analytics/dev/Dockerfile new file mode 100644 index 000000000..953d6d023 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/dev/Dockerfile @@ -0,0 +1,716 @@ + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + 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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 gpg-agent software-properties-common wget && \ + rm -rf /var/lib/apt/lists/* + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${OPENCV_REPO} | tar xz +# TODO: file a bug against opencv since they do not accept full libdir +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ + .. && \ + 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 cmake gcc g++ git libboost-all-dev libgtk2.0-dev libgtk-3-dev libtool libusb-1.0-0-dev make xz-utils libnuma-dev ocl-icd-opencl-dev opencl-headers && \ + rm -rf /var/lib/apt/lists/* + +# build dldt +ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git +RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ + cd /opt/build/openvino && \ + git submodule update --init --recursive + +RUN cd /opt/build/openvino && \ + mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ + -DENABLE_CPPLINT=OFF \ + -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ + -DENABLE_VPU=OFF \ + -DENABLE_OPENCV=OFF \ + -DENABLE_MKL_DNN=ON \ + -DENABLE_CLDNN=ON \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. && \ + make -j $(nproc) && \ + make install && \ + make install DESTDIR=/opt/dist + + +ARG OPENVINO_INSTALL_DIR=/usr/local/openvino +ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ + +ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake +ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake +ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake + + + +ARG LIBJSONC_REPO=https://github.com/json-c/json-c/archive/json-c-0.16-20220414.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBJSONC_REPO} | tar xz && \ + cd json-c-json-c-0.16-20220414 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +ARG KAFKA_VER=1.9.2 +ARG LIBRDKAFKA_REPO=https://github.com/edenhill/librdkafka/archive/v${KAFKA_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBRDKAFKA_REPO} | tar xz && \ + cd librdkafka-1.9.2 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=disabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=disabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libdrm-dev libglib2.0-dev libudev-dev flex bison libva-dev && \ + rm -rf /var/lib/apt/lists/* + +# patch gst-vaapi with gst-video-analytics patch +ARG GST_PLUGIN_VAAPI_PATCH_VER=ec2748da5b577bbf510525f57eabde6c58efd589 +ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/dlstreamer/dlstreamer + +# build gst-plugin-vaapi +ARG GSTVAAPI_REPO=https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTVAAPI_REPO} | tar xJ + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + git clone ${GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS} && \ + cd dlstreamer && git checkout ${GST_PLUGIN_VAAPI_PATCH_VER} && \ + cd .. && \ + git apply dlstreamer/patches/gstreamer-vaapi/*.patch && \ + rm -fr dlstreamer + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=release \ + -Dexamples=disabled \ + -Dtests=disabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget make libssl-dev uuid-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libpahomqtt +ARG PAHO_VER=1.3.10 +ARG LIBPAHO_REPO=https://github.com/eclipse/paho.mqtt.c/archive/v${PAHO_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBPAHO_REPO} | tar -xz +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + make && \ + make install + +#Copy and link in runtime layer +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + cp build/output/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/paho_c_version /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_sub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_sub /opt/dist/usr/local/bin/ && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3c.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3a.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3as.so && \ + cp src/MQTTAsync.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClient.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClientPersistence.h /opt/dist/usr/local/include/ && \ + cp src/MQTTProperties.h /opt/dist/usr/local/include/ && \ + cp src/MQTTReasonCodes.h /opt/dist/usr/local/include/ && \ + cp src/MQTTSubscribeOpts.h /opt/dist/usr/local/include/; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-gva +# formerly https://github.com/opencv/gst-video-analytics +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer +ENV LIBRARY_PATH=/usr/local/lib +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ + cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ + git submodule update --init && \ + mkdir -p build && cd build && \ + cmake \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=ON \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ + && make -j $(nproc) \ + && make install \ + && make install DESTDIR=/opt/dist + +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ + +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /opt/dist//usr/local/lib/gstreamer-1.0/. +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + +RUN mkdir -p /opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/intel/dl_streamer/python + +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs + + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout f6a36c7 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl + + +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1; + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +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/openvino/inference-engine/external/tbb/doc + +FROM ubuntu:22.04 +LABEL Description="This is the development image for ubuntu 22.04 on Flex Series GPU" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gpg-agent software-properties-common wget libgtk-3-0 libnuma1 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libdrm2 libpciaccess0 libgl1-mesa-dev libva2 libva-drm2 libva-x11-2 libva-wayland2 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + rm -rf /var/lib/apt/lists/* +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + + +ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ +ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake +ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner +ENV GST_VAAPI_ALL_DRIVERS=1 + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +# install DLDT +ARG CUSTOM_IE_DIR=/usr/local/openvino/ +ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 +RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/SG2/ubuntu-22.04/analytics/dev/Dockerfile.m4 b/SG2/ubuntu-22.04/analytics/dev/Dockerfile.m4 new file mode 100644 index 000000000..b813dcfe3 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/dev/Dockerfile.m4 @@ -0,0 +1,46 @@ +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libaom.m4) +include(meson.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(media-driver-pkg.sg2.m4) +include(dldt-ie.m4) +include(libjsonc.m4) +include(librdkafka.m4) +include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-vaapi.m4) +include(gst-svt.m4) +include(opencv.m4) +include(libpahomqtt.m4) +include(gst-gva.m4) +include(gst-python.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +define(`CLEANUP_CC',no)dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the development image for OS_NAME OS_VERSION on Flex Series GPU" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl diff --git a/SG2/ubuntu-22.04/analytics/dev/README.md b/SG2/ubuntu-22.04/analytics/dev/README.md new file mode 100644 index 000000000..8e0ecc2e7 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/dev/README.md @@ -0,0 +1,56 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for Media Analytics. Included what are in media delivery GStreamer image, inferencing engine and video analytics plugins. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [xeon-ubuntu-2004-analytics-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/ubuntu-20.04/analytics/gst/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® Xeon® platform, Ubuntu 20.04 + +- #### Usage instructions: + [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|OpenVINO|Apache License v2.0| +|json-c|MIT License| +|librdkafka|BSD 2-clause "Simplified" License| +|gstreamer|GNU Lesser General Public License v2.1 or later| +|gst plugins base|GNU Lesser General Public License v2.1 or later| +|gst plugins good|GNU Lesser General Public License v2.1 or later| +|gst plugins bad|GNU Lesser General Public License v2.1 or later| +|gst plugins ugly|GNU Lesser General Public License v2.1 or later| +|gst libav|GNU Library General Public License Version 2.1 or later| +|gst svt|GNU Lesser General Public License v2.1 or later| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|paho.mqtt.c|Eclipse Public License - v 2.0| +|gst video analytics|MIT License| +|gst python|GNU Library General Public License Version 2.1| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/SG2/ubuntu-22.04/analytics/dev/build.sh b/SG2/ubuntu-22.04/analytics/dev/build.sh new file mode 100755 index 000000000..38763fdeb --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/dev/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2204-analytics-dev" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/SG2/ubuntu-22.04/analytics/dev/shell.sh b/SG2/ubuntu-22.04/analytics/dev/shell.sh new file mode 100755 index 000000000..1b6865bcc --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/dev/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2204-analytics-dev" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/SG2/ubuntu-22.04/analytics/gst/CMakeLists.txt b/SG2/ubuntu-22.04/analytics/gst/CMakeLists.txt new file mode 100644 index 000000000..ff3388eb9 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/gst/CMakeLists.txt @@ -0,0 +1,4 @@ +set(image "sg2_analytics_gst_ubuntu2204") +include(image) +include(gst-tests) +include(dldt-gst-tests) diff --git a/SG2/ubuntu-22.04/analytics/gst/Dockerfile b/SG2/ubuntu-22.04/analytics/gst/Dockerfile new file mode 100644 index 000000000..53ed170d8 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/gst/Dockerfile @@ -0,0 +1,720 @@ + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 gpg-agent software-properties-common wget && \ + rm -rf /var/lib/apt/lists/* + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${OPENCV_REPO} | tar xz +# TODO: file a bug against opencv since they do not accept full libdir +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ + .. && \ + 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 cmake gcc g++ git libboost-all-dev libgtk2.0-dev libgtk-3-dev libtool libusb-1.0-0-dev make xz-utils libnuma-dev ocl-icd-opencl-dev opencl-headers && \ + rm -rf /var/lib/apt/lists/* + +# build dldt +ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git +RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ + cd /opt/build/openvino && \ + git submodule update --init --recursive + +RUN cd /opt/build/openvino && \ + mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ + -DENABLE_CPPLINT=OFF \ + -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ + -DENABLE_VPU=OFF \ + -DENABLE_OPENCV=OFF \ + -DENABLE_MKL_DNN=ON \ + -DENABLE_CLDNN=ON \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. && \ + make -j $(nproc) && \ + make install && \ + make install DESTDIR=/opt/dist + + +ARG OPENVINO_INSTALL_DIR=/usr/local/openvino +ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ + +ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake +ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake +ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake + + + +ARG LIBJSONC_REPO=https://github.com/json-c/json-c/archive/json-c-0.16-20220414.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBJSONC_REPO} | tar xz && \ + cd json-c-json-c-0.16-20220414 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +ARG KAFKA_VER=1.9.2 +ARG LIBRDKAFKA_REPO=https://github.com/edenhill/librdkafka/archive/v${KAFKA_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBRDKAFKA_REPO} | tar xz && \ + cd librdkafka-1.9.2 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=enabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libdrm-dev libglib2.0-dev libudev-dev flex bison libva-dev && \ + rm -rf /var/lib/apt/lists/* + +# patch gst-vaapi with gst-video-analytics patch +ARG GST_PLUGIN_VAAPI_PATCH_VER=ec2748da5b577bbf510525f57eabde6c58efd589 +ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/dlstreamer/dlstreamer + +# build gst-plugin-vaapi +ARG GSTVAAPI_REPO=https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTVAAPI_REPO} | tar xJ + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + git clone ${GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS} && \ + cd dlstreamer && git checkout ${GST_PLUGIN_VAAPI_PATCH_VER} && \ + cd .. && \ + git apply dlstreamer/patches/gstreamer-vaapi/*.patch && \ + rm -fr dlstreamer + +RUN cd /opt/build/gstreamer-vaapi-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=release \ + -Dexamples=disabled \ + -Dtests=disabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget make libssl-dev uuid-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libpahomqtt +ARG PAHO_VER=1.3.10 +ARG LIBPAHO_REPO=https://github.com/eclipse/paho.mqtt.c/archive/v${PAHO_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBPAHO_REPO} | tar -xz +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + make && \ + make install + +#Copy and link in runtime layer +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + cp build/output/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/paho_c_version /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_sub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_sub /opt/dist/usr/local/bin/ && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3c.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3a.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3as.so && \ + cp src/MQTTAsync.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClient.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClientPersistence.h /opt/dist/usr/local/include/ && \ + cp src/MQTTProperties.h /opt/dist/usr/local/include/ && \ + cp src/MQTTReasonCodes.h /opt/dist/usr/local/include/ && \ + cp src/MQTTSubscribeOpts.h /opt/dist/usr/local/include/; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-gva +# formerly https://github.com/opencv/gst-video-analytics +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer +ENV LIBRARY_PATH=/usr/local/lib +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ + cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ + git submodule update --init && \ + mkdir -p build && cd build && \ + cmake \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=ON \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ + && make -j $(nproc) \ + && make install \ + && make install DESTDIR=/opt/dist + +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ + +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /opt/dist//usr/local/lib/gstreamer-1.0/. +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + +RUN mkdir -p /opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/intel/dl_streamer/python + +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs + + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 cd /opt/dist/usr/local/openvino/runtime && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig/openvino.pc \ + include src share/*.cmake cmake lib/intel64/*.a external/tbb/include external/tbb/cmake +RUN rm -rf /opt/dist/usr/local/openvino/inference-engine/external/tbb/doc + +FROM ubuntu:22.04 +LABEL Description="This is the base image for Gstreamer ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libnuma1 ca-certificates gpg-agent software-properties-common wget libgtk-3-0 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libdrm2 libpciaccess0 libgl1-mesa-dev libva2 libva-drm2 libva-x11-2 libva-wayland2 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + + +ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ +ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake +ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner +ENV GST_VAAPI_ALL_DRIVERS=1 + +RUN wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* + +# install DLDT +ARG CUSTOM_IE_DIR=/usr/local/openvino/ +ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 +RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/SG2/ubuntu-22.04/analytics/gst/Dockerfile.m4 b/SG2/ubuntu-22.04/analytics/gst/Dockerfile.m4 new file mode 100644 index 000000000..fa4d4ad69 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/gst/Dockerfile.m4 @@ -0,0 +1,46 @@ +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.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(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(media-driver-pkg.sg2.m4) +include(dldt-ie.m4) +include(libjsonc.m4) +include(librdkafka.m4) +include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-vaapi.m4) +include(gst-svt.m4) +include(opencv.m4) +include(libpahomqtt.m4) +include(gst-gva.m4) +include(gst-python.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl diff --git a/SG2/ubuntu-22.04/analytics/gst/README.md b/SG2/ubuntu-22.04/analytics/gst/README.md new file mode 100644 index 000000000..8e0ecc2e7 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/gst/README.md @@ -0,0 +1,56 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for Media Analytics. Included what are in media delivery GStreamer image, inferencing engine and video analytics plugins. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [xeon-ubuntu-2004-analytics-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/ubuntu-20.04/analytics/gst/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® Xeon® platform, Ubuntu 20.04 + +- #### Usage instructions: + [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|OpenVINO|Apache License v2.0| +|json-c|MIT License| +|librdkafka|BSD 2-clause "Simplified" License| +|gstreamer|GNU Lesser General Public License v2.1 or later| +|gst plugins base|GNU Lesser General Public License v2.1 or later| +|gst plugins good|GNU Lesser General Public License v2.1 or later| +|gst plugins bad|GNU Lesser General Public License v2.1 or later| +|gst plugins ugly|GNU Lesser General Public License v2.1 or later| +|gst libav|GNU Library General Public License Version 2.1 or later| +|gst svt|GNU Lesser General Public License v2.1 or later| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|paho.mqtt.c|Eclipse Public License - v 2.0| +|gst video analytics|MIT License| +|gst python|GNU Library General Public License Version 2.1| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/SG2/ubuntu-22.04/analytics/gst/build.sh b/SG2/ubuntu-22.04/analytics/gst/build.sh new file mode 100755 index 000000000..616857d32 --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/gst/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2204-analytics-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/SG2/ubuntu-22.04/analytics/gst/shell.sh b/SG2/ubuntu-22.04/analytics/gst/shell.sh new file mode 100755 index 000000000..31462d29d --- /dev/null +++ b/SG2/ubuntu-22.04/analytics/gst/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2204-analytics-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/SG2/ubuntu-22.04/media/CMakeLists.txt b/SG2/ubuntu-22.04/media/CMakeLists.txt new file mode 100644 index 000000000..0f97d75f3 --- /dev/null +++ b/SG2/ubuntu-22.04/media/CMakeLists.txt @@ -0,0 +1 @@ +include(usage) diff --git a/SG2/ubuntu-22.04/media/dev/CMakeLists.txt b/SG2/ubuntu-22.04/media/dev/CMakeLists.txt new file mode 100644 index 000000000..d60a099fb --- /dev/null +++ b/SG2/ubuntu-22.04/media/dev/CMakeLists.txt @@ -0,0 +1,3 @@ +set(image "sg2_media_devel_ubuntu2204") +include(image) +include(ffmpeg-tests) diff --git a/SG2/ubuntu-22.04/media/dev/Dockerfile b/SG2/ubuntu-22.04/media/dev/Dockerfile new file mode 100644 index 000000000..a6cbd0b09 --- /dev/null +++ b/SG2/ubuntu-22.04/media/dev/Dockerfile @@ -0,0 +1,420 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + 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 meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake g++ make wget && \ + rm -rf /var/lib/apt/lists/* + +# build gmmlib +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd /opt/build/gmmlib-intel-gmmlib-22.1.7 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + automake ca-certificates gcc libdrm-dev libtool make pkg-config wget libx11-dev libxext-dev libxfixes-dev libwayland-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libva2 +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd /opt/build/libva-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +# build libva-utils +ARG LIBVA_UTILS_REPO=https://github.com/intel/libva-utils/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA_UTILS_REPO} | tar xz +RUN cd /opt/build/libva-utils-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 cmake g++ libpciaccess-dev make pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media driver +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/intel-media-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd /opt/build/media-driver-intel-media-22.5.2 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ + 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 gcc g++ make cmake pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl runtime for GPU +ARG ONEVPL_GPU_REPO=https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_GPU_REPO} | tar xz +RUN cd /opt/build/oneVPL-intel-gpu-intel-onevpl-22.5.2 && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + + +# Patch with oneVPL patches +RUN cd /opt/build && \ + if [ ! -d "media-delivery" ]; then git clone https://github.com/intel/media-delivery && cd media-delivery && git checkout v3; fi + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gcc g++ make git cmake patch && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl dispatcher +ARG ONEVPL_DISP_REPO=https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2022.2.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_DISP_REPO} | tar xz +RUN cd /opt/build/oneVPL-2022.2.0 && \ + cp /opt/build/media-delivery/patches/libvpl2/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout f6a36c7 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd /opt/build && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd /opt/build/FFmpeg && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true + + + +RUN cd /opt/build/FFmpeg && \ + cp /opt/build/media-delivery/patches/ffmpeg/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } + + +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1; + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d --enable-libvpl && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:22.04 +LABEL Description="This is the base image for Gstreamer ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + 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 / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV LIBVA_DRIVERS_PATH=/usr/local/lib/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 + +# Define ONEVPL lib dir +ENV ONEVPL_SEARCH_PATH=/usr/local/lib + diff --git a/SG2/ubuntu-22.04/media/dev/Dockerfile.m4 b/SG2/ubuntu-22.04/media/dev/Dockerfile.m4 new file mode 100644 index 000000000..246487ce3 --- /dev/null +++ b/SG2/ubuntu-22.04/media/dev/Dockerfile.m4 @@ -0,0 +1,37 @@ + +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libaom.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(gmmlib.sg2.m4) +include(libva2.sg2.m4) +include(libva-utils.sg2.m4) +include(media-driver.sg2.m4) +include(onevpl-atsm.m4) +include(onevpl-dispatch.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(devel,build)dnl + diff --git a/SG2/ubuntu-22.04/media/dev/README.md b/SG2/ubuntu-22.04/media/dev/README.md new file mode 100644 index 000000000..102d5cbae --- /dev/null +++ b/SG2/ubuntu-22.04/media/dev/README.md @@ -0,0 +1,46 @@ +This docker image is part of Open Visual Cloud software stacks. This is development image aim towards enabling C++ application compilation, debugging (with the debugging, profiling tools) and optimization (with the optimization tools.) You can compile C++ applications with this image and then copy the applications to the corresponding deployment image. Included what are in FFmpeg or GStreamer media creation and delivery images . Also included Intel hardware accelaration software stack such as media SDK, media driver, gmmlib and libva. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [sg2-ubuntu-2004-media-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/SG1/ubuntu-20.04/media/dev/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® SG2 platform, Ubuntu 20.04 + +- #### Usage instructions: + [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|OpenSSL|Apache License 2.0| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|Intel Graphics Memory Management Library| MIT License| +|Intel libva| MIT License +|Intel media driver | MIT License| +|Intel media SDK|MIT License| +|FFmpeg|GNU Lesser General Public License v2.1 or later| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/media/srs/build.sh b/SG2/ubuntu-22.04/media/dev/build.sh similarity index 73% rename from Xeon/centos-7/media/srs/build.sh rename to SG2/ubuntu-22.04/media/dev/build.sh index 5ddb20122..22b6b1aa0 100755 --- a/Xeon/centos-7/media/srs/build.sh +++ b/SG2/ubuntu-22.04/media/dev/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-srs" +IMAGE="sg2-ubuntu2204-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/media/nginx/shell.sh b/SG2/ubuntu-22.04/media/dev/shell.sh similarity index 73% rename from Xeon/centos-7/media/nginx/shell.sh rename to SG2/ubuntu-22.04/media/dev/shell.sh index 93ef9b979..a718d85d3 100755 --- a/Xeon/centos-7/media/nginx/shell.sh +++ b/SG2/ubuntu-22.04/media/dev/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-nginx" +IMAGE="sg2-ubuntu2204-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/media/nginx/.dockerignore b/SG2/ubuntu-22.04/media/ffmpeg/.dockerignore similarity index 100% rename from Xeon/centos-7/media/nginx/.dockerignore rename to SG2/ubuntu-22.04/media/ffmpeg/.dockerignore diff --git a/SG2/ubuntu-22.04/media/ffmpeg/CMakeLists.txt b/SG2/ubuntu-22.04/media/ffmpeg/CMakeLists.txt new file mode 100644 index 000000000..4a495eef2 --- /dev/null +++ b/SG2/ubuntu-22.04/media/ffmpeg/CMakeLists.txt @@ -0,0 +1,3 @@ +set(image "sg2_ffmpeg_ubuntu2204") +include(image) +include(ffmpeg-tests) diff --git a/SG2/ubuntu-22.04/media/ffmpeg/Dockerfile b/SG2/ubuntu-22.04/media/ffmpeg/Dockerfile new file mode 100644 index 000000000..bf22885b0 --- /dev/null +++ b/SG2/ubuntu-22.04/media/ffmpeg/Dockerfile @@ -0,0 +1,436 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake g++ make wget && \ + rm -rf /var/lib/apt/lists/* + +# build gmmlib +ARG GMMLIB_REPO=https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd /opt/build/gmmlib-intel-gmmlib-22.1.7 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + automake ca-certificates gcc libdrm-dev libtool make pkg-config wget libx11-dev libxext-dev libxfixes-dev libwayland-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libva2 +ARG LIBVA2_REPO=https://github.com/intel/libva/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd /opt/build/libva-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +# build libva-utils +ARG LIBVA_UTILS_REPO=https://github.com/intel/libva-utils/archive/2.15.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVA_UTILS_REPO} | tar xz +RUN cd /opt/build/libva-utils-2.15.0 && \ + ./autogen.sh --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 cmake g++ libpciaccess-dev make pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build media driver +ARG MEDIA_DRIVER_REPO=https://github.com/intel/media-driver/archive/intel-media-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd /opt/build/media-driver-intel-media-22.5.2 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DENABLE_PRODUCTION_KMD=ON .. && \ + 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 gcc g++ make cmake pkg-config wget && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl runtime for GPU +ARG ONEVPL_GPU_REPO=https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-22.5.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_GPU_REPO} | tar xz +RUN cd /opt/build/oneVPL-intel-gpu-intel-onevpl-22.5.2 && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + + +# Patch with oneVPL patches +RUN cd /opt/build && \ + if [ ! -d "media-delivery" ]; then git clone https://github.com/intel/media-delivery && cd media-delivery && git checkout v3; fi + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gcc g++ make git cmake patch && \ + rm -rf /var/lib/apt/lists/* + +# build onevpl dispatcher +ARG ONEVPL_DISP_REPO=https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2022.2.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${ONEVPL_DISP_REPO} | tar xz +RUN cd /opt/build/oneVPL-2022.2.0 && \ + cp /opt/build/media-delivery/patches/libvpl2/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=/usr/local/lib \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout f6a36c7 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd /opt/build && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd /opt/build/FFmpeg && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true + + + +RUN cd /opt/build/FFmpeg && \ + cp /opt/build/media-delivery/patches/ffmpeg/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } + + +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1; + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --enable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d --enable-libvpl && make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:22.04 +LABEL Description="This is the base image for FFMPEG ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +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 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV LIBVA_DRIVERS_PATH=/usr/local/lib/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 + +# Define ONEVPL lib dir +ENV ONEVPL_SEARCH_PATH=/usr/local/lib + diff --git a/SG2/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 b/SG2/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 new file mode 100644 index 000000000..7e6ae8cd9 --- /dev/null +++ b/SG2/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 @@ -0,0 +1,38 @@ + +include(begin.m4) +include(ubuntu.m4) +include(libogg.m4) +include(libvorbis.m4) +ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') +include(libopus.m4) +include(libvpx.m4) +include(libx264.m4) +include(libx265.m4) +include(dav1d.m4) +include(svt-hevc.m4) +include(svt-av1.m4) +include(svt-vp9.m4) +include(gmmlib.sg2.m4) +include(libva2.sg2.m4) +include(libva-utils.sg2.m4) +include(media-driver.sg2.m4) +include(onevpl-atsm.m4) +include(onevpl-dispatch.m4) +include(ffmpeg.m4) +include(end.m4)dnl + +PREAMBLE +FROM OS_NAME:OS_VERSION AS build + +BUILD_ALL()dnl +CLEANUP()dnl + +FROM OS_NAME:OS_VERSION +LABEL Description="This is the base image for FFMPEG OS_NAME OS_VERSION" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl + diff --git a/SG2/ubuntu-22.04/media/ffmpeg/README.md b/SG2/ubuntu-22.04/media/ffmpeg/README.md new file mode 100644 index 000000000..17e095eb7 --- /dev/null +++ b/SG2/ubuntu-22.04/media/ffmpeg/README.md @@ -0,0 +1,47 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Included FFmpeg and codecs such as opus, ogg, vorbis, x264, x265, vp8/9, av1 and SVT-HEVC. Also included Intel hardware accelaration software stack such as media SDK, media driver, gmmlib and libva. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [sg1-ubuntu-2004-media-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/SG1/ubuntu-20.04/media/ffmpeg/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® SG1 platform, Ubuntu 20.04 + +- #### Usage instructions: + [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|Intel Graphics Memory Management Library| MIT License| +|Intel libva| MIT License +|Intel media driver | MIT License| +|Intel media SDK|MIT License| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|FFmpeg|GNU General Public License v2.0 or later| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/SG2/ubuntu-22.04/media/ffmpeg/build.sh b/SG2/ubuntu-22.04/media/ffmpeg/build.sh new file mode 100755 index 000000000..90a845e8b --- /dev/null +++ b/SG2/ubuntu-22.04/media/ffmpeg/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2204-media-ffmpeg" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/SG2/ubuntu-22.04/media/ffmpeg/shell.sh b/SG2/ubuntu-22.04/media/ffmpeg/shell.sh new file mode 100755 index 000000000..8046db199 --- /dev/null +++ b/SG2/ubuntu-22.04/media/ffmpeg/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="sg2-ubuntu2204-media-ffmpeg" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/CMakeLists.txt b/Xeon/centos-7/CMakeLists.txt deleted file mode 100644 index 22fb9af27..000000000 --- a/Xeon/centos-7/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(OS_NAME "centos") -set(OS_VERSION "7") -include(os) diff --git a/Xeon/centos-7/media/nginx/CMakeLists.txt b/Xeon/centos-7/media/nginx/CMakeLists.txt deleted file mode 100644 index de7387fd6..000000000 --- a/Xeon/centos-7/media/nginx/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -set(image "xeon_nginx_rtmp_centos7") -set(dep_image "xeon_ffmpeg_centos7") -include(image) -include(nginx-tests) diff --git a/Xeon/centos-7/media/srs/CMakeLists.txt b/Xeon/centos-7/media/srs/CMakeLists.txt deleted file mode 100644 index 02825f1dd..000000000 --- a/Xeon/centos-7/media/srs/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -set(image "xeon_srs_centos7") -set(dep_image "xeon_ffmpeg_centos7") -include(image) -include(srs-tests) diff --git a/Xeon/centos-7/media/srs/shell.sh b/Xeon/centos-7/media/srs/shell.sh deleted file mode 100755 index 61aad1d8c..000000000 --- a/Xeon/centos-7/media/srs/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-media-srs" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/media/svt/build.sh b/Xeon/centos-7/media/svt/build.sh deleted file mode 100755 index 834238b2f..000000000 --- a/Xeon/centos-7/media/svt/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-media-svt" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/media/svt/shell.sh b/Xeon/centos-7/media/svt/shell.sh deleted file mode 100755 index eae2a58e1..000000000 --- a/Xeon/centos-7/media/svt/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-media-svt" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/service/owt-dev/CMakeLists.txt b/Xeon/centos-7/service/owt-dev/CMakeLists.txt deleted file mode 100644 index 27bb66c5d..000000000 --- a/Xeon/centos-7/service/owt-dev/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(image "xeon-centos7-service-owt-dev") -include(image) -include(owt-tests) diff --git a/Xeon/centos-7/service/owt-dev/Dockerfile.m4 b/Xeon/centos-7/service/owt-dev/Dockerfile.m4 deleted file mode 100644 index 310ed5135..000000000 --- a/Xeon/centos-7/service/owt-dev/Dockerfile.m4 +++ /dev/null @@ -1,45 +0,0 @@ - -include(begin.m4) -include(openssl.m4) -include(svt-hevc.m4) -ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') -include(libvpx.m4) -include(libx264.m4) -include(opencv.m4) -include(libva2.m4) -include(dldt-ie.m4) -DECLARE(`FFMPEG_OPENSSL_NOBIND',true) -include(ffmpeg.m4) -include(gst-core.m4) -include(owt-gst-base.m4) -include(owt-gst-good.m4) -include(owt-gst-bad.m4) -include(owt-gst-ugly.m4) -include(gst-libav.m4) -include(owt-gst-gva.m4) -include(gst-python.m4) -include(boost.m4) -include(owt.m4) -include(end.m4)dnl - -PREAMBLE -FROM OS_NAME:OS_VERSION AS build -include(centos-repo.m4) -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - -BUILD_ALL()dnl -define(`CLEANUP_CC',no)dnl -CLEANUP()dnl - -FROM OS_NAME:OS_VERSION -LABEL Description="This is the development image for the OWT service OS_NAME OS_VERSION" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) - -INSTALL_ALL(devel,build) - diff --git a/Xeon/centos-7/service/owt-dev/README.md b/Xeon/centos-7/service/owt-dev/README.md deleted file mode 100644 index 086b252e0..000000000 --- a/Xeon/centos-7/service/owt-dev/README.md +++ /dev/null @@ -1,49 +0,0 @@ -This docker image is part of Open Visual Cloud software stacks. Optimized for video conferencing service based on the WebRTC technology and Open WebRTC Toolkit (OWT). The docker image can be used in the FROM field of a downstream Dockerfile. - -## Supported tags and respective Dockerfile links - - [xeon-centos-7-service-owt-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/service/owt-dev/Dockerfile) - -## Quick reference -- #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 - - - - -- #### Getting started with Dockerfiles: - [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) - -- #### File issues: - [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) - - -## License -This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. - - -| Components | License | -| ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | -|OpenSSL|Apache License 2.0| -|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| -|libvpx|BSD 3-clause "New" or "Revised" License| -|x264|GNU General Public License v2.0 or later| -|OpenCV|BSD 3-clause "New" or "Revised" License| -|Intel libva| MIT License -|OpenVINO|Apache License v2.0| -|FFmpeg|GNU General Public License v2.0 or later| -|gstreamer|GNU Lesser General Public License v2.1 or later| -|gst plugins base|GNU Lesser General Public License v2.1 or later| -|gst plugins good|GNU Lesser General Public License v2.1 or later| -|gst plugins bad|GNU Lesser General Public License v2.1 or later| -|gst plugins ugly|GNU Lesser General Public License v2.1 or later| -|gst libav|GNU Library General Public License Version 2.1 or later| -|gst video analytics|MIT License| -|gst python|GNU Library General Public License Version 2.1| -|owt-server|Apache License v2.0| -|owt-sdk|Apache License v2.0| -|owt-deps-webrtc|BSD 3-clause License| - - -More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/service/owt-dev/build.sh b/Xeon/centos-7/service/owt-dev/build.sh deleted file mode 100755 index 1d38422fb..000000000 --- a/Xeon/centos-7/service/owt-dev/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-service-owt-dev" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/service/owt-dev/shell.sh b/Xeon/centos-7/service/owt-dev/shell.sh deleted file mode 100755 index 7684fad36..000000000 --- a/Xeon/centos-7/service/owt-dev/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-service-owt-dev" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/service/owt/CMakeLists.txt b/Xeon/centos-7/service/owt/CMakeLists.txt deleted file mode 100644 index 87efecd96..000000000 --- a/Xeon/centos-7/service/owt/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(image "xeon-centos7-service-owt") -include(image) -include(owt-tests) diff --git a/Xeon/centos-7/service/owt/Dockerfile.m4 b/Xeon/centos-7/service/owt/Dockerfile.m4 deleted file mode 100644 index a364af4e8..000000000 --- a/Xeon/centos-7/service/owt/Dockerfile.m4 +++ /dev/null @@ -1,44 +0,0 @@ - - -include(begin.m4) -include(openssl.m4) -include(svt-hevc.m4) -ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') -include(libvpx.m4) -include(libx264.m4) -include(opencv.m4) -include(libva2.m4) -include(dldt-ie.m4) -DECLARE(`FFMPEG_OPENSSL_NOBIND',true) -include(ffmpeg.m4) -include(gst-core.m4) -include(owt-gst-base.m4) -include(owt-gst-good.m4) -include(owt-gst-bad.m4) -include(owt-gst-ugly.m4) -include(gst-libav.m4) -include(owt-gst-gva.m4) -include(gst-python.m4) -include(boost.m4) -include(owt.m4) -include(end.m4)dnl - -PREAMBLE -FROM OS_NAME:OS_VERSION AS build -include(centos-repo.m4) -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - -BUILD_ALL()dnl -CLEANUP()dnl - -FROM OS_NAME:OS_VERSION -LABEL Description="This is the base image for the OWT service OS_NAME OS_VERSION" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) -INSTALL_ALL(runtime,build) - diff --git a/Xeon/centos-7/service/owt/README.md b/Xeon/centos-7/service/owt/README.md deleted file mode 100644 index ac128747a..000000000 --- a/Xeon/centos-7/service/owt/README.md +++ /dev/null @@ -1,50 +0,0 @@ -This docker image is part of Open Visual Cloud software stacks. Optimized for video conferencing service based on the WebRTC technology and Open WebRTC Toolkit (OWT). Optimized for video conferencing service based on the WebRTC technology and Open WebRTC Toolkit (OWT). Included conferencing modes: 1:N, N:N with video and audio processing nodes. The docker image can be used in the FROM field of a downstream Dockerfile. - -## Supported tags and respective Dockerfile links - - [xeon-centos-7-service-owt](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/service/owt/Dockerfile) - -## Quick reference -- #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 - -- #### Usage instructions: - [OWT](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/owt.md) - - -- #### Getting started with Dockerfiles: - [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) - -- #### File issues: - [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) - - -## License -This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. - - -| Components | License | -| ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | -|OpenSSL|Apache License 2.0| -|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| -|libvpx|BSD 3-clause "New" or "Revised" License| -|x264|GNU General Public License v2.0 or later| -|OpenCV|BSD 3-clause "New" or "Revised" License| -|Intel libva| MIT License -|OpenVINO|Apache License v2.0| -|FFmpeg|GNU General Public License v2.0 or later| -|gstreamer|GNU Lesser General Public License v2.1 or later| -|gst plugins base|GNU Lesser General Public License v2.1 or later| -|gst plugins good|GNU Lesser General Public License v2.1 or later| -|gst plugins bad|GNU Lesser General Public License v2.1 or later| -|gst plugins ugly|GNU Lesser General Public License v2.1 or later| -|gst libav|GNU Library General Public License Version 2.1 or later| -|gst video analytics|MIT License| -|gst python|GNU Library General Public License Version 2.1| -|owt-server|Apache License v2.0| -|owt-sdk|Apache License v2.0| -|owt-deps-webrtc|BSD 3-clause License| - - -More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/service/owt/build.sh b/Xeon/centos-7/service/owt/build.sh deleted file mode 100755 index 7cf7736c2..000000000 --- a/Xeon/centos-7/service/owt/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-service-owt" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/service/owt/shell.sh b/Xeon/centos-7/service/owt/shell.sh deleted file mode 100755 index ac38428be..000000000 --- a/Xeon/centos-7/service/owt/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-service-owt" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/service/owt360/CMakeLists.txt b/Xeon/centos-7/service/owt360/CMakeLists.txt deleted file mode 100644 index 7e5f537e1..000000000 --- a/Xeon/centos-7/service/owt360/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(image "xeon-centos7-service-owt360") -include(image) -include(owt-tests) diff --git a/Xeon/centos-7/service/owt360/Dockerfile b/Xeon/centos-7/service/owt360/Dockerfile deleted file mode 100644 index 67ca7ad0a..000000000 --- a/Xeon/centos-7/service/owt360/Dockerfile +++ /dev/null @@ -1,517 +0,0 @@ - - - -# BSD 3-Clause License -# -# Copyright (c) 2021, Intel Corporation -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This file is automatically generated from .m4 template. -# To update, modify the template and regenerate. -FROM centos:7 AS build - - - - - - - - - - -RUN yum install -y -q epel-release centos-release-scl && rm -rf /var/yum/cache/* - -RUN yum install -y -q dnf -RUN dnf install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm && \ - dnf install -y https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm - - -RUN mkdir -p /opt/build && mkdir -p /opt/dist - -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig - -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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 tar gcc-c++ make - -# build yasm -# ARG YASM_REPO=https://www.tortall.net/projects/yasm/releases/yasm-YASM_VER.tar.gz -# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. -ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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/lib64 && \ - make -j $(nproc) && \ - make install - -RUN yum install -y wget tar gcc-c++ make git cmake3 - -# build svt-hevc -ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC -RUN cd /opt/build && \ - git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} -RUN cd /opt/build/SVT-HEVC/Build/linux && \ - cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ - make -j $(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y wget gcc-c++ autoconf libtool make automake - -# build libfdkaac -ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz -RUN cd /opt/build && \ - wget -O - ${LIBFDKAAC_REPO} | tar xz && \ - cd fdk-aac-2.0.2 && \ - ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ - make -j$(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y ca-certificates wget tar gcc-c++ make bzip2 - -# build nasm -#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo -ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 -RUN cd /opt/build && \ - wget -O - ${NASM_REPO} | tar xj && \ - cd nasm-2.15.05 && \ - ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ - make -j$(nproc) && \ - make install - -RUN yum install -y git cmake make autoconf diffutils - -# build libvpx -ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git -RUN cd /opt/build && \ - git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ - cd libvpx && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ - make -j$(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y git cmake make autoconf diffutils - -# 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/lib64 \ - --enable-shared && \ - make -j$(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y cmake3 gcc gcc-c++ make wget python36-numpy ccache eigen3-devel devtoolset-9 - -# build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv -RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT -# TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ - (. /opt/rh/devtoolset-9/enable && cmake3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - make -j $(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install ) - -RUN yum install -y cmake3 gcc gcc-g++ git boost-devel gtk2-devel gtk3-devel libtool libusb-devel make python python2-yamlordereddictloader xz numactl-devel ocl-icd-devel opencl-headers - -# build dldt -ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git -RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ - cd /opt/build/openvino && \ - git submodule update --init --recursive - -RUN cd /opt/build/openvino && \ - mkdir build && cd build && \ - (. /opt/rh/devtoolset-9/enable && cmake3 \ - -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ - -DENABLE_CPPLINT=OFF \ - -DDENABLE_INTEL_GNA=OFF \ - -DENABLE_VPU=OFF \ - -DENABLE_OPENCV=OFF \ - -DENABLE_MKL_DNN=ON \ - -DENABLE_CLDNN=ON \ - -DENABLE_SAMPLES=OFF \ - -DENABLE_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - -DTREAT_WARNING_AS_ERROR=OFF \ - -DNGRAPH_WARNINGS_AS_ERRORS=OFF \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ - .. && \ - make -j $(nproc) && \ - make install && \ - make install DESTDIR=/opt/dist ) - - -ARG OPENVINO_INSTALL_DIR=/usr/local/openvino -ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ - -ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake -ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake -ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake - -RUN yum install -y wget patch git libass-devel - -# build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz -RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz - -#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl - - - - -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-nonfree --enable-libass --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libfdk-aac --enable-libvpx --enable-gpl --enable-libx264 && make -j$(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - (. /opt/rh/devtoolset-9/enable && cmake3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib64 ) - - - -# build 360scvp -ARG SCVP_REPO=https://github.com/OpenVisualCloud/Immersive-Video-Sample/archive/v1.0.0.tar.gz -ENV PYTHONIOENCODING=UTF-8 -RUN cd /opt/build && \ - wget -O - ${SCVP_REPO} | tar xz && \ - cd Immersive-Video-Sample-1.0.0/src/360SCVP && \ - mkdir build && \ - cd build && \ - cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 ../ && \ - make -j$(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - - -RUN yum install -y wget bzip2 - -# Build OpenH264 -ARG OPENH264_SRC_REPO=https://github.com/cisco/openh264/archive/v1.7.0.tar.gz -ARG OPENH264_BIN_REPO=https://github.com/cisco/openh264/releases/download/v1.7.0/libopenh264-1.7.0-linux64.4.so.bz2 -RUN cd /opt/build && \ - wget -O - ${OPENH264_SRC_REPO} | tar xz openh264-1.7.0/codec/api && \ - cd openh264-1.7.0 && \ - (mkdir -p /usr/local/include/openh264 && cp -r codec /usr/local/include/openh264) && \ - (mkdir -p /opt/dist/usr/local/include/openh264 && cp -r codec /opt/dist/usr/local/include/openh264) - -RUN cd /usr/local/lib64 && \ - wget -O - ${OPENH264_BIN_REPO} | bunzip2 > libopenh264.so.4 && \ - ln -s -v libopenh264.so.4 libopenh264.so && \ - cd /opt/dist/usr/local/lib64 && \ - cp -r /usr/local/lib64/libopenh264.so.4 . && \ - ln -s -v libopenh264.so.4 libopenh264.so - -RUN yum install -y git cmake make autoconf gcc - -# build libre -ARG LIBRE_REPO=https://github.com/creytiv/re.git -RUN cd /opt/build && \ - git clone ${LIBRE_REPO} -b v0.5.0 --depth 1 && \ - cd re && \ - make SYSROOT_ALT=/usr RELEASE=1 && \ - make install SYSROOT_ALT=/usr RELEASE=1 PREFIX=/usr && \ - make SYSROOT_ALT=/opt/dist/usr RELEASE=1 && \ - make install SYSROOT_ALT=/opt/dist/usr RELEASE=1 PREFIX=/opt/dist/usr - -RUN yum install -y wget cmake make gcc libglib2.0-devel patch - -# build libnice -ARG LIBNICE_REPO=http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz -RUN cd /opt/build && \ - wget -O - ${LIBNICE_REPO} | tar xz - - -ARG LIBNICE_PATCH_REPO=https://github.com/open-webrtc-toolkit/owt-server/archive/v4.3.1.tar.gz - -RUN cd /opt/build/libnice-0.1.4 && \ - wget -O - ${LIBNICE_PATCH_REPO} | tar xz && \ - patch -p1 < owt-server-4.3.1/scripts/patches/libnice014-agentlock.patch && \ - patch -p1 < owt-server-4.3.1/scripts/patches/libnice014-agentlock-plus.patch && \ - patch -p1 < owt-server-4.3.1/scripts/patches/libnice014-removecandidate.patch && \ - patch -p1 < owt-server-4.3.1/scripts/patches/libnice014-keepalive.patch && \ - patch -p1 < owt-server-4.3.1/scripts/patches/libnice014-startcheck.patch - - - -RUN cd /opt/build/libnice-0.1.4 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ - make -j$(nproc) -s V=0 && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y wget cmake automake make gcc which - -# build usrsctp -ARG USRSCTP_REPO=https://github.com/sctplab/usrsctp/archive/0.9.5.0.tar.gz -RUN cd /opt/build && \ - wget -O - ${USRSCTP_REPO} | tar xz && \ - cd usrsctp-* && \ - ./bootstrap && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ - make -j$(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y wget - -# build jsonhpp -ARG JSONHPP_REPO=https://github.com/nlohmann/json/releases/download/v3.6.1/json.hpp -RUN wget -O /usr/include/json.hpp ${JSONHPP_REPO} - -RUN yum install -y wget xz-utils - -# build node -ARG NODE_REPO=https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz -RUN cd /opt/build && \ - wget -O - ${NODE_REPO} | tar xJ && \ - cp node-v10.24.1-linux-x64/* /usr/local -rf && \ - rm -rf node-v10.24.1-linux-x64 - -RUN yum install -y wget gcc make pkg-config - -# build libsrtp2 -ARG LIBSRTP2_REPO=https://github.com/cisco/libsrtp/archive/v2.1.0.tar.gz -RUN cd /opt/build && \ - wget -O - ${LIBSRTP2_REPO} | tar xz && \ - cd libsrtp-2.1.0 && \ - CFLAGS="-fPIC -Wl,-rpath=/usr/local/ssl/lib" ./configure --enable-openssl --prefix=/usr/local --libdir=/usr/local/lib64 --with-openssl-dir=/usr/local/ssl && \ - make -s V=0 -j $(nproc) && \ - make install DESTDIR=/opt/dist && \ - make install - -RUN yum install -y git gcc npm python glib2-devel boost-devel log4cxx-devel pkg-config devtoolset-9 - -# Install npm modules -RUN npm install -g --loglevel error node-gyp@6.1.0 grunt-cli underscore jsdoc - -# Get owt-server Source -ARG OWT_REPO=https://github.com/open-webrtc-toolkit/owt-server -RUN cd /opt/build && \ - git clone -b 360-video ${OWT_REPO} && \ - cd owt-server && \ - git reset --hard 101203f28f7901cd50c1341b5ad8c87247f500d6 - - - -# Prep OpenH264 -RUN mkdir -p /opt/build/owt-server/third_party/openh264 && \ - cd /opt/build/owt-server/third_party/openh264 && \ - ln -s -v /usr/local/include/openh264/codec . && \ - ln -s -v /usr/local/lib64/libopenh264.so . && \ - echo "const char* stub() {return \"this is a stub lib\";}" > pseudo-openh264.cpp && \ - gcc pseudo-openh264.cpp -fPIC -shared -o pseudo-openh264.so - -# Get licode -ARG OWT_LICODE_REPO=https://github.com/lynckia/licode.git -RUN cd /opt/build/owt-server/third_party && \ - git clone ${OWT_LICODE_REPO} && \ - cd licode && \ - git config user.name x && git config user.email x@y && \ - git reset --hard 8b4692c88f1fc24dedad66b4f40b1f3d804b50ca && \ - git am /opt/build/owt-server/scripts/patches/licode/*.patch - -# Get webrtc -ARG OWT_WEBRTC_REPO=https://github.com/open-webrtc-toolkit/owt-deps-webrtc.git -RUN mkdir -p /opt/build/owt-server/third_party/webrtc && \ - cd /opt/build/owt-server/third_party/webrtc && \ - git clone -b 59-server ${OWT_WEBRTC_REPO} src && \ - cd src && git reset --hard c2aa290cfe4f63d5bfbb6540122a5e6bf2783187 &&\ - ./tools-woogeen/install.sh && patch -p1 < /opt/build/owt-server/scripts/patches/0001-Implement-RtcpFOVObserver.patch &&\ - ./tools-woogeen/build.sh - - - -# Get SDK -ARG OWT_SDK_REPO=https://github.com/open-webrtc-toolkit/owt-client-javascript.git -RUN cd /opt/build && \ - git clone -b master ${OWT_SDK_REPO} && \ - cd owt-client-javascript/scripts && \ - git reset --hard d727af2927731ff16214d73f57964a992258636d && \ - npm install && grunt - -# Get quic -ARG OWT_QUIC_REPO=https://github.com/open-webrtc-toolkit/owt-deps-quic/releases/download/v0.1/dist.tgz -RUN mkdir -p /opt/build/owt-server/third_party/quic-lib && \ - cd /opt/build/owt-server/third_party/quic-lib && \ - wget -O - ${OWT_QUIC_REPO} | tar xz - -# Build and pack owt -RUN cd /opt/build/owt-server && \ - sed -i "/cflags_cc/s/\[/[\"-Wl,rpath=\/usr\/local\/ssl\/lib\",/" source/agent/webrtc/webrtcLib/binding.gyp && \ - sed -i "s/-lssl/" source/agent/sip/sipIn/sip_gateway/sipua/src/account.c - -# Install nan module -RUN cd /opt/build/owt-server && \ - echo {} > package.json && \ - npm install nan - -# Build and package -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64:/usr/local/ssl/lib -RUN cd /opt/build/owt-server && \ - (. /opt/rh/devtoolset-9/enable &&./scripts/build.js -t mcu-all -r -c) &&\ - ./scripts/pack.js -t all --install-module --no-pseudo --sample-path /opt/build/owt-client-javascript/dist/samples/conference && \ - mkdir -p /opt/dist/home && \ - mv dist /opt/dist/home/owt - - RUN cd /opt/dist/home && \ - echo "#!/bin/bash -e" >>launch.sh && \ - echo "mongod --config /etc/mongod.conf &" >>launch.sh && \ - echo "rabbitmq-server &" >>launch.sh && \ - echo "while ! mongo --quiet --eval \"db.adminCommand(\\\"listDatabases\\\")\"" >>launch.sh && \ - echo "do" >>launch.sh && \ - echo " echo mongod not launch" >>launch.sh && \ - echo " sleep 1" >>launch.sh && \ - echo "done" >>launch.sh && \ - echo "echo mongodb connected successfully" >>launch.sh && \ - echo "cd /home/owt" >>launch.sh && \ - echo "./management_api/init.sh" >>launch.sh && \ - echo "./bin/start-all.sh" >>launch.sh && \ - chmod +x launch.sh - -# cleanup -RUN rm -rf /opt/dist/usr/local/include && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig && \ - 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 -RUN cd /opt/dist/usr/local/openvino/runtime && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig/openvino.pc \ - include src share/*.cmake cmake lib/intel64/*.a external/tbb/include external/tbb/cmake -RUN rm -rf /opt/dist/usr/local/openvino/inference-engine/external/tbb/doc -RUN rm -rf /opt/dist/home/owt/analytics_agent/plugins - -FROM centos:7 -LABEL Description="This is the base image for the OWT 360 service centos 7" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* - -RUN yum install -y -q dnf -RUN dnf install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm && \ - dnf install -y https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm - -RUN yum install -y gtk3 numactl ocl-icd libass wget xz-utils rabbitmq-server boost-system boost-thread log4cxx glib2 freetype - -COPY --from=build /opt/dist / -RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig - - -ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ -ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake -ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ -ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ - -# install DLDT -ARG CUSTOM_IE_DIR=/usr/local/openvino/ -ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 -RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig - -# install node -ARG NODE_REPO=https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz -RUN cd /usr/local && \ - wget -O - ${NODE_REPO} | tar xJ && \ - cp -r node-v10.24.1-linux-x64/* . && \ - rm -rf node-v10.24.1-linux-x64 - -# install OWT -RUN echo "[mongodb-org-3.6]" >> /etc/yum.repos.d/mongodb-org-3.6.repo && \ - echo "name=MongoDB Repository" >> /etc/yum.repos.d/mongodb-org-3.6.repo && \ - echo "baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.6/x86_64/" >> /etc/yum.repos.d/mongodb-org-3.6.repo && \ - echo "gpgcheck=1" >> /etc/yum.repos.d/mongodb-org-3.6.repo && \ - echo "enabled=1" >> /etc/yum.repos.d/mongodb-org-3.6.repo && \ - echo "gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc" >> /etc/yum.repos.d/mongodb-org-3.6.repo && \ - yum install -y -q mongodb-org && rm -rf /var/cache/yum/* - - diff --git a/Xeon/centos-7/service/owt360/Dockerfile.m4 b/Xeon/centos-7/service/owt360/Dockerfile.m4 deleted file mode 100644 index f1bdbfa34..000000000 --- a/Xeon/centos-7/service/owt360/Dockerfile.m4 +++ /dev/null @@ -1,36 +0,0 @@ - - -include(begin.m4) -include(openssl.m4) -include(svt-hevc.m4) -ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') -include(libvpx.m4) -include(libx264.m4) -include(opencv.m4) -include(dldt-ie.m4) -DECLARE(`FFMPEG_OPENSSL_NOBIND',true) -include(ffmpeg.m4) -include(scvp.m4) -include(owt360.m4) -include(end.m4)dnl - -PREAMBLE -FROM OS_NAME:OS_VERSION AS build -include(centos-repo.m4) -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - -BUILD_ALL()dnl -CLEANUP()dnl - -FROM OS_NAME:OS_VERSION -LABEL Description="This is the base image for the OWT 360 service OS_NAME OS_VERSION" -LABEL Vendor="Intel Corporation" -WORKDIR /home - -# Install -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) - -INSTALL_ALL(runtime,build) - diff --git a/Xeon/centos-7/service/owt360/README.md b/Xeon/centos-7/service/owt360/README.md deleted file mode 100644 index ee26e1302..000000000 --- a/Xeon/centos-7/service/owt360/README.md +++ /dev/null @@ -1,42 +0,0 @@ -This docker image is part of Open Visual Cloud software stacks. Optimized for video conferencing service based on the WebRTC technology and Open WebRTC Toolkit (OWT). Docker image optimized for ultra-high resolution immersive video low latency streaming, based on the WebRTC technology and the Open WebRTC Toolkit. Included SVT-HEVC tile-based 4K and 8K transcoding and field of view (FoV) adaptive streaming. The docker image can be used in the FROM field of a downstream Dockerfile. - -## Supported tags and respective Dockerfile links - - [xeon-centos-7-service-owt360](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/service/owt360/Dockerfile) - -## Quick reference -- #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 - -- #### Usage instructions: - [OWT360](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/owt360.md) - - -- #### Getting started with Dockerfiles: - [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) - -- #### File issues: - [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) - - -## License -This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. - - -| Components | License | -| ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | -|OpenSSL|Apache License 2.0| -|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| -|libvpx|BSD 3-clause "New" or "Revised" License| -|x264|GNU General Public License v2.0 or later| -|OpenCV|BSD 3-clause "New" or "Revised" License| -|OpenVINO|Apache License v2.0| -|FFmpeg|GNU General Public License v2.0 or later| -|360SCVP|BSD 3-clause "New" or "Revised" License| -|owt-server|Apache License v2.0| -|owt-sdk|Apache License v2.0| -|owt-deps-webrtc|BSD 3-clause License| - - -More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/centos-7/service/owt360/build.sh b/Xeon/centos-7/service/owt360/build.sh deleted file mode 100755 index 6181e604a..000000000 --- a/Xeon/centos-7/service/owt360/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-service-owt360" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/service/owt360/shell.sh b/Xeon/centos-7/service/owt360/shell.sh deleted file mode 100755 index 011f465d8..000000000 --- a/Xeon/centos-7/service/owt360/shell.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -IMAGE="xeon-centos7-service-owt360" -DIR=$(dirname $(readlink -f "$0")) - -. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-20.04/analytics/dev/Dockerfile b/Xeon/ubuntu-20.04/analytics/dev/Dockerfile index 5dc95a0d0..5974b93e4 100644 --- a/Xeon/ubuntu-20.04/analytics/dev/Dockerfile +++ b/Xeon/ubuntu-20.04/analytics/dev/Dockerfile @@ -1,7 +1,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -71,24 +71,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 \ - 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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 && \ @@ -127,7 +109,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -257,10 +240,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -289,14 +272,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -306,6 +286,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -325,20 +308,26 @@ RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ RUN cd /opt/build/openvino && \ mkdir build && cd build && \ cmake \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ -DENABLE_CPPLINT=OFF \ -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ -DENABLE_VPU=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ -DBUILD_TESTS=OFF \ -DTREAT_WARNING_AS_ERROR=OFF \ - -DNGRAPH_WARNINGS_AS_ERRORS=OFF \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ .. && \ make -j $(nproc) && \ make install && \ @@ -349,6 +338,7 @@ ARG OPENVINO_INSTALL_DIR=/usr/local/openvino ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake @@ -358,26 +348,120 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-core -ARG GSTCORE_REPO=https://github.com/GStreamer/gstreamer/archive/1.20.3.tar.gz +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTCORE_REPO} | tar xz + wget -O - ${GSTCORE_REPO} | tar xJ RUN cd /opt/build/gstreamer-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ -Dexamples=disabled \ -Dtests=disabled \ -Ddoc=disabled \ - -Dintrospection=enabled \ - -Dgtk_doc=disabled \ - -Dpython=enabled \ - -Dgst-python:libpython-dir=/usr/local/lib \ - -Dcustom_subprojects="gst-libav,gst-plugins-base,gst-plugins-good,gst-plugins-bad,gst-plugins-ugly,gst-python" \ - -Dlibsoup:sysprof=disabled \ - -Dgpl=enabled && \ + -Dintrospection=enabled && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=disabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=disabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ca-certificates tar g++ wget && \ @@ -443,52 +527,102 @@ RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ cp src/MQTTReasonCodes.h /opt/dist/usr/local/include/ && \ cp src/MQTTSubscribeOpts.h /opt/dist/usr/local/include/; +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-gva +# formerly https://github.com/opencv/gst-video-analytics +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer +ENV LIBRARY_PATH=/usr/local/lib +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ + cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ + git submodule update --init && \ + mkdir -p build && cd build && \ + cmake \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=OFF \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ + && make -j $(nproc) \ + && make install \ + && make install DESTDIR=/opt/dist + +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ + +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /opt/dist//usr/local/lib/gstreamer-1.0/. +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + +RUN mkdir -p /opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/intel/dl_streamer/python + +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs +sed -i "s/.*python\.dependency.*/pythonver \= python\.language_version\(\)\npython_dep \= dependency\(\'python-\@0\@-embed\'\.format\(pythonver\)\, version\: \'\>\=3\'\, required\: false\)\nif not python_dep\.found\(\)\n\tpython_dep \= python\.dependency\(required \: true\)\nendif/g" meson.build && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-openssl --extra-ldflags=-Wl,-rpath=/usr/local/ssl/lib --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup 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/share/man -RUN rm -rf /opt/dist/usr/local/ssl/share/doc RUN rm -rf /opt/dist/usr/local/openvino/inference-engine/external/tbb/doc FROM ubuntu:20.04 @@ -500,7 +634,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 \ - libgtk-3-0 libnuma1 ocl-icd-libopencl1 libglib2.0-0 libegl1 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + libgtk-3-0 libnuma1 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ rm -rf /var/lib/apt/lists/* ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig @@ -519,3 +653,8 @@ ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner ARG CUSTOM_IE_DIR=/usr/local/openvino/ ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/Xeon/ubuntu-20.04/analytics/dev/Dockerfile.m4 b/Xeon/ubuntu-20.04/analytics/dev/Dockerfile.m4 index 3f738b4bc..d720bce7d 100644 --- a/Xeon/ubuntu-20.04/analytics/dev/Dockerfile.m4 +++ b/Xeon/ubuntu-20.04/analytics/dev/Dockerfile.m4 @@ -2,7 +2,6 @@ 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) @@ -16,10 +15,16 @@ include(svt-av1.m4) include(svt-vp9.m4) include(dldt-ie.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +#include(gst-libav.m4) include(gst-svt.m4) include(opencv.m4) include(libpahomqtt.m4) -#include(gst-gva.m4) +include(gst-gva.m4) +include(gst-python.m4) include(ffmpeg.m4) include(end.m4)dnl diff --git a/Xeon/ubuntu-20.04/analytics/ffmpeg/Dockerfile b/Xeon/ubuntu-20.04/analytics/ffmpeg/Dockerfile index a9a7d2266..73c56872c 100644 --- a/Xeon/ubuntu-20.04/analytics/ffmpeg/Dockerfile +++ b/Xeon/ubuntu-20.04/analytics/ffmpeg/Dockerfile @@ -1,7 +1,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -109,7 +109,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -220,10 +221,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -252,14 +253,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -269,6 +267,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -288,20 +289,26 @@ RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ RUN cd /opt/build/openvino && \ mkdir build && cd build && \ cmake \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ -DENABLE_CPPLINT=OFF \ -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ -DENABLE_VPU=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ -DBUILD_TESTS=OFF \ -DTREAT_WARNING_AS_ERROR=OFF \ - -DNGRAPH_WARNINGS_AS_ERRORS=OFF \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ .. && \ make -j $(nproc) && \ make install && \ @@ -312,6 +319,7 @@ ARG OPENVINO_INSTALL_DIR=/usr/local/openvino ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake @@ -344,40 +352,30 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup RUN rm -rf /opt/dist/usr/local/include && \ diff --git a/Xeon/ubuntu-20.04/analytics/gst/Dockerfile b/Xeon/ubuntu-20.04/analytics/gst/Dockerfile index e0314d0d9..bc05d1812 100644 --- a/Xeon/ubuntu-20.04/analytics/gst/Dockerfile +++ b/Xeon/ubuntu-20.04/analytics/gst/Dockerfile @@ -1,7 +1,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -109,7 +109,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -247,10 +248,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -279,14 +280,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -296,6 +294,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -315,20 +316,26 @@ RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ RUN cd /opt/build/openvino && \ mkdir build && cd build && \ cmake \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ -DENABLE_CPPLINT=OFF \ -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ -DENABLE_VPU=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ -DBUILD_TESTS=OFF \ -DTREAT_WARNING_AS_ERROR=OFF \ - -DNGRAPH_WARNINGS_AS_ERRORS=OFF \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ .. && \ make -j $(nproc) && \ make install && \ @@ -339,6 +346,7 @@ ARG OPENVINO_INSTALL_DIR=/usr/local/openvino ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake @@ -371,26 +379,120 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-core -ARG GSTCORE_REPO=https://github.com/GStreamer/gstreamer/archive/1.20.3.tar.gz +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTCORE_REPO} | tar xz + wget -O - ${GSTCORE_REPO} | tar xJ RUN cd /opt/build/gstreamer-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ -Dexamples=disabled \ -Dtests=disabled \ -Ddoc=disabled \ - -Dintrospection=enabled \ - -Dgtk_doc=disabled \ - -Dpython=enabled \ - -Dgst-python:libpython-dir=/usr/local/lib \ - -Dcustom_subprojects="gst-libav,gst-plugins-base,gst-plugins-good,gst-plugins-bad,gst-plugins-ugly,gst-python" \ - -Dlibsoup:sysprof=disabled \ - -Dgpl=enabled && \ + -Dintrospection=enabled && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=enabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ca-certificates tar g++ wget && \ @@ -458,38 +560,34 @@ RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev && \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ rm -rf /var/lib/apt/lists/* # build gst-plugin-gva # formerly https://github.com/opencv/gst-video-analytics -ARG GVA_REPO=https://github.com/openvinotoolkit/dlstreamer_gst.git -# TODO: This is a workaround for a bug in dlstreamer_gst +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer ENV LIBRARY_PATH=/usr/local/lib -RUN git clone -b v1.6 --depth 1 $GVA_REPO /opt/build/gst-video-analytics && \ +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ git submodule update --init && \ mkdir -p build && cd build && \ cmake \ - -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ - -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_BUILD_TYPE=Release \ - -DDISABLE_SAMPLES=ON \ - -DENABLE_PAHO_INSTALLATION=ON \ - -DENABLE_RDKAFKA_INSTALLATION=ON \ - -DENABLE_VAAPI=OFF \ - -DENABLE_VAS_TRACKER=ON \ - -DENABLE_AUDIO_INFERENCE_ELEMENTS=OFF \ - -Dwith_drm=no \ - -Dwith_x11=no \ - -Dwith_glx=no \ - -Dwith_wayland=no \ - -Dwith_egl=no \ - .. \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=OFF \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ && make -j $(nproc) \ && make install \ && make install DESTDIR=/opt/dist + ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. @@ -503,6 +601,25 @@ ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs +sed -i "s/.*python\.dependency.*/pythonver \= python\.language_version\(\)\npython_dep \= dependency\(\'python-\@0\@-embed\'\.format\(pythonver\)\, version\: \'\>\=3\'\, required\: false\)\nif not python_dep\.found\(\)\n\tpython_dep \= python\.dependency\(required \: true\)\nendif/g" meson.build && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + # cleanup RUN rm -rf /opt/dist/usr/local/include && \ rm -rf /opt/dist/usr/local/lib/pkgconfig && \ @@ -523,7 +640,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 libgtk-3-0 ocl-icd-libopencl1 libglib2.0-0 libegl1 python3-gi python3-gi-cairo python3-dev libgl1-mesa-glx && \ + libnuma1 libgtk-3-0 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev && \ rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / @@ -545,3 +662,4 @@ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/Xeon/ubuntu-20.04/analytics/gst/Dockerfile.m4 b/Xeon/ubuntu-20.04/analytics/gst/Dockerfile.m4 index 171daf6d8..89e852e05 100644 --- a/Xeon/ubuntu-20.04/analytics/gst/Dockerfile.m4 +++ b/Xeon/ubuntu-20.04/analytics/gst/Dockerfile.m4 @@ -17,10 +17,16 @@ include(dldt-ie.m4) include(libjsonc.m4) include(librdkafka.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-libav.m4) include(gst-svt.m4) include(opencv.m4) include(libpahomqtt.m4) include(gst-gva.m4) +include(gst-python.m4) include(end.m4)dnl PREAMBLE diff --git a/Xeon/ubuntu-20.04/media/dev/Dockerfile b/Xeon/ubuntu-20.04/media/dev/Dockerfile index d1bb1ee41..3979d739f 100644 --- a/Xeon/ubuntu-20.04/media/dev/Dockerfile +++ b/Xeon/ubuntu-20.04/media/dev/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -72,24 +72,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 \ - 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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 && \ @@ -128,7 +110,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -235,10 +218,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -267,45 +250,118 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-core -ARG GSTCORE_REPO=https://github.com/GStreamer/gstreamer/archive/1.20.3.tar.gz +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTCORE_REPO} | tar xz + wget -O - ${GSTCORE_REPO} | tar xJ RUN cd /opt/build/gstreamer-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ -Dexamples=disabled \ -Dtests=disabled \ -Ddoc=disabled \ - -Dintrospection=enabled \ - -Dgtk_doc=disabled \ - -Dpython=enabled \ - -Dgst-python:libpython-dir=/usr/local/lib \ - -Dcustom_subprojects="gst-libav,gst-plugins-base,gst-plugins-good,gst-plugins-bad,gst-plugins-ugly,gst-python" \ - -Dlibsoup:sysprof=disabled \ - -Dgpl=enabled && \ + -Dintrospection=enabled && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ca-certificates tar g++ wget && \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ rm -rf /var/lib/apt/lists/* -RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ - meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ - -Dprefix=/usr/local --buildtype=plain && \ - cd build && ninja install && \ - DESTDIR=/opt/dist ninja install -RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ - -Dprefix=/usr/local --buildtype=plain && \ - cd build && ninja install && \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ DESTDIR=/opt/dist ninja install -RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=disabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ - -Dprefix=/usr/local --buildtype=plain && \ - cd build && ninja install && \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=disabled \ + && cd build && \ + ninja install && \ DESTDIR=/opt/dist ninja install RUN apt-get update && \ @@ -314,30 +370,69 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-openssl --extra-ldflags=-Wl,-rpath=/usr/local/ssl/lib --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-libsvtav1 --enable-libaom --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-libav +ARG GSTLIBAV_REPO=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTLIBAV_REPO} | tar xJ +RUN cd /opt/build/gst-libav-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + # cleanup 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/share/man -RUN rm -rf /opt/dist/usr/local/ssl/share/doc FROM ubuntu:20.04 LABEL Description="This is the base image for Gstreamer ubuntu 20.04" @@ -348,7 +443,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 \ - libglib2.0-0 libegl1 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ rm -rf /var/lib/apt/lists/* ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig diff --git a/Xeon/ubuntu-20.04/media/dev/Dockerfile.m4 b/Xeon/ubuntu-20.04/media/dev/Dockerfile.m4 index e141efed2..679e44eb1 100644 --- a/Xeon/ubuntu-20.04/media/dev/Dockerfile.m4 +++ b/Xeon/ubuntu-20.04/media/dev/Dockerfile.m4 @@ -3,7 +3,6 @@ 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) @@ -14,6 +13,11 @@ include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-libav.m4) include(gst-svt.m4) include(ffmpeg.m4) include(end.m4)dnl diff --git a/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile b/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile index 70c876e37..d554dac9e 100644 --- a/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile +++ b/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -110,7 +110,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -205,11 +206,26 @@ RUN apt-get update && \ ca-certificates wget tar g++ make cmake git && \ rm -rf /var/lib/apt/lists/* +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -238,14 +254,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -255,6 +268,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -266,40 +282,30 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup RUN rm -rf /opt/dist/usr/local/include && \ diff --git a/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 b/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 index 2640a94de..c2c0e064f 100644 --- a/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 +++ b/Xeon/ubuntu-20.04/media/ffmpeg/Dockerfile.m4 @@ -9,7 +9,7 @@ include(libvpx.m4) include(libx264.m4) include(libx265.m4) include(dav1d.m4) -#include(svt-hevc.m4) +include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) include(opencv.m4) diff --git a/Xeon/ubuntu-20.04/media/gst/Dockerfile b/Xeon/ubuntu-20.04/media/gst/Dockerfile index 93d68e8c3..e6b303b1e 100644 --- a/Xeon/ubuntu-20.04/media/gst/Dockerfile +++ b/Xeon/ubuntu-20.04/media/gst/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -110,7 +110,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -248,10 +249,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ @@ -280,22 +281,161 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-core -ARG GSTCORE_REPO=https://github.com/GStreamer/gstreamer/archive/1.20.3.tar.gz +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTCORE_REPO} | tar xz + wget -O - ${GSTCORE_REPO} | tar xJ RUN cd /opt/build/gstreamer-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ -Dexamples=disabled \ -Dtests=disabled \ -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ -Dintrospection=enabled \ - -Dgtk_doc=disabled \ - -Dpython=enabled \ - -Dgst-python:libpython-dir=/usr/local/lib \ - -Dcustom_subprojects="gst-libav,gst-plugins-base,gst-plugins-good,gst-plugins-bad,gst-plugins-ugly,gst-python" \ - -Dlibsoup:sysprof=disabled \ - -Dgpl=enabled && \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=enabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl + + + + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && 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 tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-libav +ARG GSTLIBAV_REPO=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTLIBAV_REPO} | tar xJ +RUN cd /opt/build/gst-libav-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install @@ -337,7 +477,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 libglib2.0-0 libegl1 && \ + libnuma1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / diff --git a/Xeon/ubuntu-20.04/media/gst/Dockerfile.m4 b/Xeon/ubuntu-20.04/media/gst/Dockerfile.m4 index 2468e90b6..9bfeeb2be 100644 --- a/Xeon/ubuntu-20.04/media/gst/Dockerfile.m4 +++ b/Xeon/ubuntu-20.04/media/gst/Dockerfile.m4 @@ -15,6 +15,11 @@ include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-libav.m4) include(gst-svt.m4) include(end.m4)dnl diff --git a/Xeon/ubuntu-20.04/media/nginx/Dockerfile b/Xeon/ubuntu-20.04/media/nginx/Dockerfile index 490e948f5..16bbfe87a 100644 --- a/Xeon/ubuntu-20.04/media/nginx/Dockerfile +++ b/Xeon/ubuntu-20.04/media/nginx/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/Xeon/ubuntu-20.04/media/srs/Dockerfile b/Xeon/ubuntu-20.04/media/srs/Dockerfile index 7dbea4af0..9f44f3619 100644 --- a/Xeon/ubuntu-20.04/media/srs/Dockerfile +++ b/Xeon/ubuntu-20.04/media/srs/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -41,25 +41,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 \ - git ca-certificates g++ make unzip patch pkg-config && \ + git ca-certificates g++ make unzip patch pkg-config libssl-dev && \ rm -rf /var/lib/apt/lists/* # build srs @@ -93,9 +75,6 @@ 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 openvisualcloud/xeon-ubuntu2004-media-ffmpeg:latest LABEL Description="This is the base image for Media SRS ubuntu 20.04" @@ -106,7 +85,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 \ - bash && \ + bash openssl && \ rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / diff --git a/Xeon/ubuntu-20.04/media/srs/Dockerfile.m4 b/Xeon/ubuntu-20.04/media/srs/Dockerfile.m4 index 1d8ae5bb1..fb68de750 100644 --- a/Xeon/ubuntu-20.04/media/srs/Dockerfile.m4 +++ b/Xeon/ubuntu-20.04/media/srs/Dockerfile.m4 @@ -1,7 +1,6 @@ include(begin.m4) include(ubuntu.m4) -include(openssl.m4) include(srs.m4) include(end.m4)dnl diff --git a/Xeon/ubuntu-20.04/media/svt/Dockerfile b/Xeon/ubuntu-20.04/media/svt/Dockerfile index 1917eb75a..95cdf3657 100644 --- a/Xeon/ubuntu-20.04/media/svt/Dockerfile +++ b/Xeon/ubuntu-20.04/media/svt/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -46,7 +46,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ diff --git a/Xeon/ubuntu-20.04/service/owt-dev/Dockerfile b/Xeon/ubuntu-20.04/service/owt-dev/Dockerfile index 6f187fe7c..2965d81f7 100644 --- a/Xeon/ubuntu-20.04/service/owt-dev/Dockerfile +++ b/Xeon/ubuntu-20.04/service/owt-dev/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -53,24 +53,6 @@ RUN cd /opt/build && \ make -j$(nproc) && \ 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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 tar g++ make && \ @@ -128,7 +110,8 @@ RUN apt-get update && \ # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ @@ -175,14 +158,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ @@ -192,6 +172,9 @@ RUN cd /opt/build/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ @@ -211,20 +194,26 @@ RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ RUN cd /opt/build/openvino && \ mkdir build && cd build && \ cmake \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ -DENABLE_CPPLINT=OFF \ -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ -DENABLE_VPU=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ -DBUILD_TESTS=OFF \ -DTREAT_WARNING_AS_ERROR=OFF \ - -DNGRAPH_WARNINGS_AS_ERRORS=OFF \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ .. && \ make -j $(nproc) && \ make install && \ @@ -235,6 +224,7 @@ ARG OPENVINO_INSTALL_DIR=/usr/local/openvino ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake @@ -244,40 +234,30 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ ./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-nonfree --enable-libass --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libfdk-aac --enable-libvpx --enable-gpl --enable-libx264 && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libfdk-aac --enable-libvpx --enable-gpl --enable-libx264 --enable-libsvthevc && make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib +#REBUILD_OPENCV_VIDEOIO()dnl RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -297,22 +277,16 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-core -ARG GSTCORE_REPO=https://github.com/GStreamer/gstreamer/archive/1.20.3.tar.gz +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTCORE_REPO} | tar xz + wget -O - ${GSTCORE_REPO} | tar xJ RUN cd /opt/build/gstreamer-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ -Dexamples=disabled \ -Dtests=disabled \ -Ddoc=disabled \ - -Dintrospection=enabled \ - -Dgtk_doc=disabled \ - -Dpython=enabled \ - -Dgst-python:libpython-dir=/usr/local/lib \ - -Dcustom_subprojects="gst-libav,gst-plugins-base,gst-plugins-good,gst-plugins-bad,gst-plugins-ugly,gst-python" \ - -Dlibsoup:sysprof=disabled \ - -Dgpl=enabled && \ + -Dintrospection=enabled && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install @@ -323,9 +297,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-plugin-base -ARG GSTBASE_REPO=https://github.com/GStreamer/gst-plugins-base/archive/1.20.3.tar.gz +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTBASE_REPO} | tar xz + wget -O - ${GSTBASE_REPO} | tar xJ RUN cd /opt/build/gst-plugins-base-1.20.3 && \ meson build \ --prefix=/usr/local \ @@ -351,9 +325,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-plugin-good -ARG GSTGOOD_REPO=https://github.com/GStreamer/gst-plugins-good/archive/1.20.3.tar.gz +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTGOOD_REPO} | tar xz + wget -O - ${GSTGOOD_REPO} | tar xJ RUN cd /opt/build/gst-plugins-good-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ @@ -372,13 +346,13 @@ RUN cd /opt/build/gst-plugins-good-1.20.3 && \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libcurl4-gnutls-dev librtmp-dev && \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev && \ rm -rf /var/lib/apt/lists/* # build gst-plugin-bad -ARG GSTBAD_REPO=https://github.com/GStreamer/gst-plugins-bad/archive/1.20.3.tar.gz +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTBAD_REPO} | tar xz && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ cd gst-plugins-bad-1.20.3 && \ meson build \ --prefix=/usr/local \ @@ -389,6 +363,7 @@ RUN cd /opt/build && \ -Dexamples=disabled \ -Dtests=disabled \ -Dintrospection=enabled \ + -Dgpl=enabled \ -Drtmp=enabled \ -Dx265=disabled \ -Drsvg=disabled \ @@ -403,13 +378,14 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # build gst-plugin-ugly -ARG GSTUGLY_REPO=https://github.com/GStreamer/gst-plugins-ugly/archive/1.20.3.tar.gz +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz RUN cd /opt/build && \ - wget -O - ${GSTUGLY_REPO} | tar xz + wget -O - ${GSTUGLY_REPO} | tar xJ RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ --prefix=/usr/local --buildtype=plain \ -Ddoc=disabled \ + -Dgpl=enabled \ -Dx264=enabled \ && cd build && \ ninja install && \ @@ -417,54 +393,34 @@ RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ca-certificates tar g++ wget && \ - rm -rf /var/lib/apt/lists/* - -# build gst-plugin-libav -ARG GSTLIBAV_REPO=https://github.com/GStreamer/gst-libav/archive/1.20.3.tar.gz -RUN cd /opt/build && \ - wget -O - ${GSTLIBAV_REPO} | tar xz -RUN cd /opt/build/gst-libav-1.20.3 && \ - meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ - --prefix=/usr/local --buildtype=plain && \ - cd build && \ - ninja install && \ - DESTDIR=/opt/dist ninja install - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev && \ + git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ rm -rf /var/lib/apt/lists/* # build gst-plugin-gva # formerly https://github.com/opencv/gst-video-analytics -ARG GVA_REPO=https://github.com/openvinotoolkit/dlstreamer_gst.git -# TODO: This is a workaround for a bug in dlstreamer_gst +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer ENV LIBRARY_PATH=/usr/local/lib -RUN git clone -b v1.6 --depth 1 $GVA_REPO /opt/build/gst-video-analytics && \ +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ git submodule update --init && \ mkdir -p build && cd build && \ cmake \ - -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ - -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_BUILD_TYPE=Release \ - -DDISABLE_SAMPLES=ON \ - -DENABLE_PAHO_INSTALLATION=OFF \ - -DENABLE_RDKAFKA_INSTALLATION=OFF \ - -DENABLE_VAAPI=OFF \ - -DENABLE_VAS_TRACKER=ON \ - -DENABLE_AUDIO_INFERENCE_ELEMENTS=OFF \ - -Dwith_drm=no \ - -Dwith_x11=no \ - -Dwith_glx=no \ - -Dwith_wayland=no \ - -Dwith_egl=no \ - .. \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=OFF \ + -DENABLE_RDKAFKA_INSTALLATION=OFF \ + -DENABLE_VAAPI=OFF \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ && make -j $(nproc) \ && make install \ && make install DESTDIR=/opt/dist + ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. @@ -615,7 +571,7 @@ RUN cd /opt/build && \ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - git gcc npm python libglib2.0-dev libboost-thread-dev libboost-system-dev liblog4cxx-dev libsrtp2-dev pkg-config patch && \ + libssl-dev git gcc npm python libglib2.0-dev libboost-thread-dev libboost-system-dev liblog4cxx-dev libsrtp2-dev pkg-config patch && \ rm -rf /var/lib/apt/lists/* # Install npm modules @@ -691,8 +647,6 @@ RUN mkdir -p /opt/build/owt-server/third_party/quic-lib && \ # Build and pack owt RUN cd /opt/build/owt-server && \ - sed -i "/cflags_cc/s/\[/[\"-Wl,rpath=\/usr\/local\/ssl\/lib\",/" source/agent/webrtc/rtcConn/binding.gyp source/agent/webrtc/rtcFrame/binding.gyp && \ - sed -i "s/-lssl/> /etc/ld.so.conf.d/all-libs.conf && ldconfig + + +ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ +ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake +ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner + +# install DLDT +ARG CUSTOM_IE_DIR=/usr/local/openvino/ +ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 +RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/Xeon/centos-7/analytics/dev/Dockerfile.m4 b/Xeon/ubuntu-22.04/analytics/dev/Dockerfile.m4 similarity index 77% rename from Xeon/centos-7/analytics/dev/Dockerfile.m4 rename to Xeon/ubuntu-22.04/analytics/dev/Dockerfile.m4 index 1e4eea9e8..d720bce7d 100644 --- a/Xeon/centos-7/analytics/dev/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/analytics/dev/Dockerfile.m4 @@ -1,34 +1,36 @@ include(begin.m4) -include(centos-repo.m4) -include(cmake.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(meson.m4) include(dav1d.m4) +include(libjsonc.m4) +include(librdkafka.m4) include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) include(dldt-ie.m4) -include(libjsonc.m4) -include(librdkafka.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +#include(gst-libav.m4) include(gst-svt.m4) include(opencv.m4) include(libpahomqtt.m4) include(gst-gva.m4) +include(gst-python.m4) include(ffmpeg.m4) include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - BUILD_ALL()dnl define(`CLEANUP_CC',no)dnl CLEANUP()dnl @@ -38,8 +40,6 @@ LABEL Description="This is the base image for Development purposes on OS_NAME OS LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) - # Install +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(runtime,build)dnl diff --git a/Xeon/centos-7/analytics/dev/README.md b/Xeon/ubuntu-22.04/analytics/dev/README.md similarity index 93% rename from Xeon/centos-7/analytics/dev/README.md rename to Xeon/ubuntu-22.04/analytics/dev/README.md index 510511079..9608bc67f 100644 --- a/Xeon/centos-7/analytics/dev/README.md +++ b/Xeon/ubuntu-22.04/analytics/dev/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. This is development image aim towards enabling C++ application compilation, debugging (with the debugging, profiling tools) and optimization (with the optimization tools.) You can compile C++ applications with this image and then copy the applications to the corresponding deployment image. Included what are in FFmpeg & GStreamer media analytics images. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-analytics-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/analytics/dev/Dockerfile) + - [xeon-ubuntu-2204-analytics-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/analytics/dev/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| |OpenSSL|Apache License 2.0| @@ -32,12 +32,12 @@ This docker installs third party components licensed under various open source l |libvpx|BSD 3-clause "New" or "Revised" License| |Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| |dav1d|BSD 2-clause "Simplified" License| +|json-c|MIT License| +|librdkafka|BSD 2-clause "Simplified" License| |Intel SVT-HEVC|BSD-2-Clause Plus Patent License| |Intel SVT-AV1|BSD-2-Clause Plus Patent License| |Intel SVT-VP9|BSD-2-Clause Plus Patent License| |OpenVINO|Apache License v2.0| -|json-c|MIT License| -|librdkafka|BSD 2-clause "Simplified" License| |gstreamer|GNU Lesser General Public License v2.1 or later| |gst plugins base|GNU Lesser General Public License v2.1 or later| |gst plugins good|GNU Lesser General Public License v2.1 or later| diff --git a/Xeon/centos-7/analytics/ffmpeg/build.sh b/Xeon/ubuntu-22.04/analytics/dev/build.sh similarity index 70% rename from Xeon/centos-7/analytics/ffmpeg/build.sh rename to Xeon/ubuntu-22.04/analytics/dev/build.sh index 8aac3a490..adc678a2f 100755 --- a/Xeon/centos-7/analytics/ffmpeg/build.sh +++ b/Xeon/ubuntu-22.04/analytics/dev/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-analytics-ffmpeg" +IMAGE="xeon-ubuntu2204-analytics-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/analytics/ffmpeg/shell.sh b/Xeon/ubuntu-22.04/analytics/dev/shell.sh similarity index 70% rename from Xeon/centos-7/analytics/ffmpeg/shell.sh rename to Xeon/ubuntu-22.04/analytics/dev/shell.sh index 7ee9949a8..0d9e811ae 100755 --- a/Xeon/centos-7/analytics/ffmpeg/shell.sh +++ b/Xeon/ubuntu-22.04/analytics/dev/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-analytics-ffmpeg" +IMAGE="xeon-ubuntu2204-analytics-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/analytics/ffmpeg/CMakeLists.txt b/Xeon/ubuntu-22.04/analytics/ffmpeg/CMakeLists.txt similarity index 58% rename from Xeon/centos-7/analytics/ffmpeg/CMakeLists.txt rename to Xeon/ubuntu-22.04/analytics/ffmpeg/CMakeLists.txt index 595ec1412..e822c5ae4 100644 --- a/Xeon/centos-7/analytics/ffmpeg/CMakeLists.txt +++ b/Xeon/ubuntu-22.04/analytics/ffmpeg/CMakeLists.txt @@ -1,4 +1,4 @@ -set(image "xeon_analytics_ffmpeg_centos7") +set(image "xeon_analytics_ffmpeg_ubuntu2204") include(image) include(ffmpeg-tests) include(dldt-ffmpeg-tests) diff --git a/Xeon/centos-7/analytics/ffmpeg/Dockerfile b/Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile similarity index 59% rename from Xeon/centos-7/analytics/ffmpeg/Dockerfile rename to Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile index f0188db86..df4d29858 100644 --- a/Xeon/centos-7/analytics/ffmpeg/Dockerfile +++ b/Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile @@ -1,7 +1,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,28 +31,17 @@ # This file is automatically generated from .m4 template. # To update, modify the template and regenerate. -FROM centos:7 AS build - -RUN yum install -y -q epel-release centos-release-scl && rm -rf /var/yum/cache/* - +FROM ubuntu:22.04 AS build RUN mkdir -p /opt/build && mkdir -p /opt/dist -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig - -RUN yum install -y wget gcc-c++ make libcurl-devel zlib-devel +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig -# build cmake -ARG CMAKE_REPO=https://cmake.org/files -RUN cd /opt/build && \ - wget -O - ${CMAKE_REPO}/v3.23/cmake-3.23.3.tar.gz | tar xz && \ - cd cmake-3.23.3 && \ - ./bootstrap --prefix=/usr/local --system-curl && \ - make -j$(nproc) && \ - make install - -RUN yum install -y wget make autoconf diffutils automake gcc-c++ +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* # build libogg ARG OGG_VER=1.3.5 @@ -61,12 +50,15 @@ ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg RUN cd /opt/build && \ wget -O - ${LIBOGG_REPO} | tar xz && \ cd libogg-1.3.5 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget make autoconf diffutils automake +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake && \ + rm -rf /var/lib/apt/lists/* # build libvorbis ARG VORBIS_VER=1.3.7 @@ -74,12 +66,15 @@ ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VE RUN cd /opt/build && \ wget -O - ${LIBVORBIS_REPO} | tar xz && \ cd libvorbis-1.3.7 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget gcc-c++ autoconf libtool make automake +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* # build libfdkaac ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz @@ -87,63 +82,79 @@ RUN cd /opt/build && \ wget -O - ${LIBFDKAAC_REPO} | tar xz && \ cd fdk-aac-2.0.2 && \ ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget autoconf libtool make +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* # build libopus ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz RUN cd /opt/build && \ wget -O - ${LIBOPUS_REPO} | tar xz && \ cd opus-1.3.1 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y ca-certificates wget tar gcc-c++ make bzip2 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make bzip2 && \ + rm -rf /var/lib/apt/lists/* # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ cd nasm-2.15.05 && \ ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ make -j$(nproc) && \ make install -RUN yum install -y git make autoconf diffutils +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 libvpx ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git RUN cd /opt/build && \ git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ cd libvpx && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y git make autoconf diffutils +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/lib64 \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib \ --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget tar gcc-c++ make +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-YASM_VER.tar.gz @@ -155,98 +166,119 @@ RUN cd /opt/build && \ 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/lib64 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ make -j $(nproc) && \ make install -RUN yum install -y make numactl-devel libpciaccess-devel +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/lib64 ../../source && \ + 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 yum install -y meson wget tar gcc-c++ +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* # build dav1d ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz RUN cd /opt/build && \ wget -O - ${DAV1D_REPO} | tar xz RUN cd /opt/build/dav1d-0.9.2 && \ - meson build --prefix=/usr/local --libdir /usr/local/lib64 --buildtype=plain && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install -RUN yum install -y wget tar gcc-c++ make git +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* # build svt-hevc ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC RUN cd /opt/build && \ git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} RUN cd /opt/build/SVT-HEVC/Build/linux && \ - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget tar gcc-c++ make git +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget tar gcc-c++ make git devtoolset-9 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* # build svt vp9 ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 RUN cd /opt/build && \ git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ cd SVT-VP9/Build/linux && \ - (. /opt/rh/devtoolset-9/enable && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ - make -j $(nproc) ) && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y gcc gcc-c++ make wget python36-numpy ccache eigen3-devel devtoolset-9 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ - (. /opt/rh/devtoolset-9/enable && cmake \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ + -DCMAKE_INSTALL_LIBDIR=lib \ -DOPENCV_GENERATE_PKGCONFIG=ON \ -DBUILD_DOCS=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ - make install ) + make install -RUN yum install -y gcc gcc-g++ git boost-devel gtk2-devel gtk3-devel libtool libusb-devel make python python2-yamlordereddictloader xz numactl-devel ocl-icd-devel opencl-headers +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ git libboost-all-dev libgtk2.0-dev libgtk-3-dev libtool libusb-1.0-0-dev make xz-utils libnuma-dev ocl-icd-opencl-dev opencl-headers && \ + rm -rf /var/lib/apt/lists/* # build dldt ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git @@ -256,31 +288,38 @@ RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ RUN cd /opt/build/openvino && \ mkdir build && cd build && \ - (. /opt/rh/devtoolset-9/enable && cmake \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ -DENABLE_CPPLINT=OFF \ -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ -DENABLE_VPU=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ -DBUILD_TESTS=OFF \ -DTREAT_WARNING_AS_ERROR=OFF \ - -DNGRAPH_WARNINGS_AS_ERRORS=OFF \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ .. && \ make -j $(nproc) && \ make install && \ - make install DESTDIR=/opt/dist ) + make install DESTDIR=/opt/dist ARG OPENVINO_INSTALL_DIR=/usr/local/openvino ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake @@ -290,7 +329,7 @@ ARG LIBJSONC_REPO=https://github.com/json-c/json-c/archive/json-c-0.16-20220414. RUN cd /opt/build && \ wget -O - ${LIBJSONC_REPO} | tar xz && \ cd json-c-json-c-0.16-20220414 && mkdir build && cd build && \ - cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install @@ -302,73 +341,67 @@ ARG LIBRDKAFKA_REPO=https://github.com/edenhill/librdkafka/archive/v${KAFKA_VER} RUN cd /opt/build && \ wget -O - ${LIBRDKAFKA_REPO} | tar xz && \ cd librdkafka-1.9.2 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget patch git libv4l-devel libass-devel freetype-devel +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-static --disable-doc --disable-htmlpages \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - (. /opt/rh/devtoolset-9/enable && cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib64 ) +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup RUN rm -rf /opt/dist/usr/local/include && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ 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 cd /opt/dist/usr/local/openvino/runtime && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig/openvino.pc \ + rm -rf /opt/dist/usr/local/lib/pkgconfig/openvino.pc \ include src share/*.cmake cmake lib/intel64/*.a external/tbb/include external/tbb/cmake RUN rm -rf /opt/dist/usr/local/openvino/inference-engine/external/tbb/doc -FROM centos:7 -LABEL Description="This is the base image for FFMPEG centos 7" +FROM ubuntu:22.04 +LABEL Description="This is the base image for FFMPEG ubuntu 22.04" LABEL Vendor="Intel Corporation" WORKDIR /home -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* - - # Install -RUN yum install -y numactl-libs libpciaccess gtk3 numactl ocl-icd libv4l libass +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libnuma1 libgtk-3-0 ocl-icd-libopencl1 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / -RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ diff --git a/Xeon/centos-7/analytics/ffmpeg/Dockerfile.m4 b/Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile.m4 similarity index 83% rename from Xeon/centos-7/analytics/ffmpeg/Dockerfile.m4 rename to Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile.m4 index 95e02840e..6abf0b03a 100644 --- a/Xeon/centos-7/analytics/ffmpeg/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile.m4 @@ -1,6 +1,5 @@ include(begin.m4) -include(centos-repo.m4) -include(cmake.m4) +include(ubuntu.m4) include(libogg.m4) include(libvorbis.m4) ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') @@ -12,18 +11,16 @@ include(dav1d.m4) include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) +include(opencv.m4) include(dldt-ie.m4) include(libjsonc.m4) include(librdkafka.m4) -include(opencv.m4) include(ffmpeg.m4) include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release centos-release-scl) - BUILD_ALL()dnl CLEANUP()dnl @@ -32,7 +29,6 @@ LABEL Description="This is the base image for FFMPEG OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) - # Install +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(runtime,build)dnl diff --git a/Xeon/centos-7/analytics/ffmpeg/README.md b/Xeon/ubuntu-22.04/analytics/ffmpeg/README.md similarity index 90% rename from Xeon/centos-7/analytics/ffmpeg/README.md rename to Xeon/ubuntu-22.04/analytics/ffmpeg/README.md index 3a655ff45..932a5dc3e 100644 --- a/Xeon/centos-7/analytics/ffmpeg/README.md +++ b/Xeon/ubuntu-22.04/analytics/ffmpeg/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for Media Analytics. Included what are in media delivery FFmpeg image, inferencing engine and video analytics plugins. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-analytics-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/analytics/ffmpeg/Dockerfile) + - [xeon-ubuntu-2204-analytics-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/analytics/ffmpeg/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| |Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| @@ -35,10 +35,10 @@ This docker installs third party components licensed under various open source l |Intel SVT-HEVC|BSD-2-Clause Plus Patent License| |Intel SVT-AV1|BSD-2-Clause Plus Patent License| |Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|OpenCV|BSD 3-clause "New" or "Revised" License| |OpenVINO|Apache License v2.0| |json-c|MIT License| |librdkafka|BSD 2-clause "Simplified" License| -|OpenCV|BSD 3-clause "New" or "Revised" License| |FFmpeg|GNU General Public License v2.0 or later| diff --git a/Xeon/ubuntu-22.04/analytics/ffmpeg/build.sh b/Xeon/ubuntu-22.04/analytics/ffmpeg/build.sh new file mode 100755 index 000000000..1ff162441 --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/ffmpeg/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-analytics-ffmpeg" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/ubuntu-22.04/analytics/ffmpeg/shell.sh b/Xeon/ubuntu-22.04/analytics/ffmpeg/shell.sh new file mode 100755 index 000000000..fbaa3146b --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/ffmpeg/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-analytics-ffmpeg" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-22.04/analytics/gst/CMakeLists.txt b/Xeon/ubuntu-22.04/analytics/gst/CMakeLists.txt new file mode 100644 index 000000000..1626d94bd --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/gst/CMakeLists.txt @@ -0,0 +1,4 @@ +set(image "xeon_analytics_gst_ubuntu2204") +include(image) +include(gst-tests) +include(dldt-gst-tests) diff --git a/Xeon/ubuntu-22.04/analytics/gst/Dockerfile b/Xeon/ubuntu-22.04/analytics/gst/Dockerfile new file mode 100644 index 000000000..e4d24b3ca --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/gst/Dockerfile @@ -0,0 +1,665 @@ + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${OPENCV_REPO} | tar xz +# TODO: file a bug against opencv since they do not accept full libdir +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ + .. && \ + 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 cmake gcc g++ git libboost-all-dev libgtk2.0-dev libgtk-3-dev libtool libusb-1.0-0-dev make xz-utils libnuma-dev ocl-icd-opencl-dev opencl-headers && \ + rm -rf /var/lib/apt/lists/* + +# build dldt +ARG DLDT_REPO=https://github.com/openvinotoolkit/openvino.git +RUN git clone -b 2022.2.0 --depth 1 ${DLDT_REPO} /opt/build/openvino && \ + cd /opt/build/openvino && \ + git submodule update --init --recursive + +RUN cd /opt/build/openvino && \ + mkdir build && cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local/openvino \ + -DENABLE_CPPLINT=OFF \ + -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ + -DENABLE_VPU=OFF \ + -DENABLE_OPENCV=OFF \ + -DENABLE_MKL_DNN=ON \ + -DENABLE_CLDNN=ON \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ + -DBUILD_TESTS=OFF \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. && \ + make -j $(nproc) && \ + make install && \ + make install DESTDIR=/opt/dist + + +ARG OPENVINO_INSTALL_DIR=/usr/local/openvino +ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ + +ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake +ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake +ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake + + + +ARG LIBJSONC_REPO=https://github.com/json-c/json-c/archive/json-c-0.16-20220414.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBJSONC_REPO} | tar xz && \ + cd json-c-json-c-0.16-20220414 && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + + + +ARG KAFKA_VER=1.9.2 +ARG LIBRDKAFKA_REPO=https://github.com/edenhill/librdkafka/archive/v${KAFKA_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBRDKAFKA_REPO} | tar xz && \ + cd librdkafka-1.9.2 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=enabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget make libssl-dev uuid-dev && \ + rm -rf /var/lib/apt/lists/* + +# build libpahomqtt +ARG PAHO_VER=1.3.10 +ARG LIBPAHO_REPO=https://github.com/eclipse/paho.mqtt.c/archive/v${PAHO_VER}.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBPAHO_REPO} | tar -xz +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + make && \ + make install + +#Copy and link in runtime layer +RUN cd /opt/build/paho.mqtt.c-1.3.10 && \ + cp build/output/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib && \ + cp build/output/paho_c_version /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_c_sub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_pub /opt/dist/usr/local/bin/ && \ + cp build/output/samples/paho_cs_sub /opt/dist/usr/local/bin/ && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 && \ + chmod 644 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1.3 /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3c.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3c.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3cs.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3cs.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3a.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3a.so && \ + ln /opt/dist//usr/local/lib/libpaho-mqtt3as.so.1 /opt/dist//usr/local/lib/libpaho-mqtt3as.so && \ + cp src/MQTTAsync.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClient.h /opt/dist/usr/local/include/ && \ + cp src/MQTTClientPersistence.h /opt/dist/usr/local/include/ && \ + cp src/MQTTProperties.h /opt/dist/usr/local/include/ && \ + cp src/MQTTReasonCodes.h /opt/dist/usr/local/include/ && \ + cp src/MQTTSubscribeOpts.h /opt/dist/usr/local/include/; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + cmake git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates libva-dev curl gnupg2 software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-gva +# formerly https://github.com/opencv/gst-video-analytics +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer +ENV LIBRARY_PATH=/usr/local/lib +RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \ + cd /opt/build/gst-video-analytics && \ + git checkout ec2748da5b577bbf510525f57eabde6c58efd589 && \ + git submodule update --init && \ + mkdir -p build && cd build && \ + cmake \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=ON \ + -DENABLE_RDKAFKA_INSTALLATION=ON \ + -DENABLE_VAAPI=OFF \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \ + -DTREAT_WARNING_AS_ERROR=OFF \ + .. \ + && make -j $(nproc) \ + && make install \ + && make install DESTDIR=/opt/dist + +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/gstreamer-1.0/:/usr/local/lib/ + +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /usr/local/lib/gstreamer-1.0/. +RUN cp -r /opt/build/gst-video-analytics/build/intel64/Release/lib/* /opt/dist//usr/local/lib/gstreamer-1.0/. +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + +RUN mkdir -p /opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/intel/dl_streamer/python + +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +RUN mkdir -p /opt/dist/opt/intel/dl_streamer/python && \ + cp -r /opt/build/gst-video-analytics/python/* /opt/dist/opt/intel/dl_streamer/python + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget gtk-doc-tools uuid-dev python-gi-dev python3-dev libtool-bin libpython3-dev libpython3-stdlib libpython3-all-dev && \ + rm -rf /var/lib/apt/lists/* +ARG GSTPYTHON_REPO=https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTPYTHON_REPO} | tar xJ +RUN cd /opt/build/gst-python-1.20.3 && \ +#WORKAROUND: https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/30/diffs + + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dpython=/usr/bin/python3 -Dlibpython-dir=/usr/lib/x86_64-linux-gnu/ \ + -Dpygi-overrides-dir=/usr/lib/python3/dist-packages/gi/overrides && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 cd /opt/dist/usr/local/openvino/runtime && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig/openvino.pc \ + include src share/*.cmake cmake lib/intel64/*.a external/tbb/include external/tbb/cmake +RUN rm -rf /opt/dist/usr/local/openvino/inference-engine/external/tbb/doc + +FROM ubuntu:22.04 +LABEL Description="This is the base image for Gstreamer ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libnuma1 libgtk-3-0 ocl-icd-libopencl1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 python3-gi python3-gi-cairo python3-dev python3-numpy libglib2.0-dev && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + + +ENV InferenceEngine_DIR=/usr/local/openvino/runtime/cmake/ +ENV TBB_DIR=/usr/local/openvino/runtime/3rdparty/tbb/cmake +ENV ngraph_DIR=/usr/local/openvino/runtime/cmake/ +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/openvino/runtime/lib/:/usr/local/openvino/runtime/3rdparty/tbb/lib/ +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner + +# install DLDT +ARG CUSTOM_IE_DIR=/usr/local/openvino/ +ARG CUSTOM_IE_LIBDIR=${CUSTOM_IE_DIR}/runtime/lib/intel64 +RUN printf "${CUSTOM_IE_LIBDIR}\n${CUSTOM_IE_DIR}/3rdparty/tbb/lib\n" >/etc/ld.so.conf.d/openvino.conf && ldconfig +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gstreamer-1.0/ +ENV GI_TYPELIB_PATH=${GI_TYPELIB_PATH}:/usr/local/lib/girepository-1.0/ +ENV PYTHONPATH=${PYTHONPATH}:/opt/intel/dl_streamer/python +ENV GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:/usr/local/lib/gstreamer-1.0/ + diff --git a/Xeon/centos-7/analytics/gst/Dockerfile.m4 b/Xeon/ubuntu-22.04/analytics/gst/Dockerfile.m4 similarity index 76% rename from Xeon/centos-7/analytics/gst/Dockerfile.m4 rename to Xeon/ubuntu-22.04/analytics/gst/Dockerfile.m4 index 152db3de9..89e852e05 100644 --- a/Xeon/centos-7/analytics/gst/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/analytics/gst/Dockerfile.m4 @@ -1,6 +1,5 @@ include(begin.m4) -include(centos-repo.m4) -include(cmake.m4) +include(ubuntu.m4) include(libogg.m4) include(libvorbis.m4) ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') @@ -9,6 +8,7 @@ include(libvpx.m4) include(libaom.m4) include(libx264.m4) include(libx265.m4) +include(meson.m4) include(dav1d.m4) include(svt-hevc.m4) include(svt-av1.m4) @@ -17,18 +17,21 @@ include(dldt-ie.m4) include(libjsonc.m4) include(librdkafka.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-libav.m4) include(gst-svt.m4) include(opencv.m4) include(libpahomqtt.m4) include(gst-gva.m4) +include(gst-python.m4) include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - BUILD_ALL()dnl CLEANUP()dnl @@ -37,8 +40,6 @@ LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) - # Install +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(runtime,build)dnl diff --git a/Xeon/ubuntu-22.04/analytics/gst/README.md b/Xeon/ubuntu-22.04/analytics/gst/README.md new file mode 100644 index 000000000..86e62aded --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/gst/README.md @@ -0,0 +1,56 @@ +This docker image is part of Open Visual Cloud software stacks. Optimized for Media Analytics. Included what are in media delivery GStreamer image, inferencing engine and video analytics plugins. The docker image can be used in the FROM field of a downstream Dockerfile. + +## Supported tags and respective Dockerfile links + - [xeon-ubuntu-2204-analytics-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/analytics/gst/Dockerfile) + +## Quick reference +- #### Supported platform and OS + Intel® Xeon® platform, Ubuntu 22.04 + +- #### Usage instructions: + [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) + + +- #### Getting started with Dockerfiles: + [OpenVisualCloud Dockerfiles Wiki](https://github.com/OpenVisualCloud/Dockerfiles/wiki) + +- #### File issues: + [OpenVisualCloud Dockerfiles Issues](https://github.com/OpenVisualCloud/Dockerfiles/issues) + + +## License +This docker installs third party components licensed under various open source licenses. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses. + + +| Components | License | +| ----- | ----- | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | +|libogg|BSD 3-clause "New" or "Revised" License| +|libvorbis|BSD 3-clause "New" or "Revised" License| +|Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| +|libvpx|BSD 3-clause "New" or "Revised" License| +|Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| +|x264|GNU General Public License v2.0 or later| +|x265|GNU General Public License v2.0 or later| +|dav1d|BSD 2-clause "Simplified" License| +|Intel SVT-HEVC|BSD-2-Clause Plus Patent License| +|Intel SVT-AV1|BSD-2-Clause Plus Patent License| +|Intel SVT-VP9|BSD-2-Clause Plus Patent License| +|OpenVINO|Apache License v2.0| +|json-c|MIT License| +|librdkafka|BSD 2-clause "Simplified" License| +|gstreamer|GNU Lesser General Public License v2.1 or later| +|gst plugins base|GNU Lesser General Public License v2.1 or later| +|gst plugins good|GNU Lesser General Public License v2.1 or later| +|gst plugins bad|GNU Lesser General Public License v2.1 or later| +|gst plugins ugly|GNU Lesser General Public License v2.1 or later| +|gst libav|GNU Library General Public License Version 2.1 or later| +|gst svt|GNU Lesser General Public License v2.1 or later| +|OpenCV|BSD 3-clause "New" or "Revised" License| +|paho.mqtt.c|Eclipse Public License - v 2.0| +|gst video analytics|MIT License| +|gst python|GNU Library General Public License Version 2.1| + + +More license information can be found in [components source package](https://github.com/OpenVisualCloud/Dockerfiles-Resources). +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses and potential fees for all software contained within. We will have no indemnity or warranty coverage from suppliers. diff --git a/Xeon/ubuntu-22.04/analytics/gst/build.sh b/Xeon/ubuntu-22.04/analytics/gst/build.sh new file mode 100755 index 000000000..6afffe6ab --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/gst/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-analytics-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/ubuntu-22.04/analytics/gst/shell.sh b/Xeon/ubuntu-22.04/analytics/gst/shell.sh new file mode 100755 index 000000000..7c2bedf3b --- /dev/null +++ b/Xeon/ubuntu-22.04/analytics/gst/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-analytics-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-22.04/media/CMakeLists.txt b/Xeon/ubuntu-22.04/media/CMakeLists.txt new file mode 100644 index 000000000..0f97d75f3 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/CMakeLists.txt @@ -0,0 +1 @@ +include(usage) diff --git a/Xeon/centos-7/media/dev/CMakeLists.txt b/Xeon/ubuntu-22.04/media/dev/CMakeLists.txt similarity index 57% rename from Xeon/centos-7/media/dev/CMakeLists.txt rename to Xeon/ubuntu-22.04/media/dev/CMakeLists.txt index a0d229196..3367ddb59 100644 --- a/Xeon/centos-7/media/dev/CMakeLists.txt +++ b/Xeon/ubuntu-22.04/media/dev/CMakeLists.txt @@ -1,4 +1,4 @@ -set(image "xeon_media_devel_centos7") +set(image "xeon_media_devel_ubuntu2204") include(image) include(ffmpeg-tests) include(gst-tests) diff --git a/Xeon/ubuntu-22.04/media/dev/Dockerfile b/Xeon/ubuntu-22.04/media/dev/Dockerfile new file mode 100644 index 000000000..c19a35815 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/dev/Dockerfile @@ -0,0 +1,455 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + 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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=disabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=disabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl + + + + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-libav +ARG GSTLIBAV_REPO=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTLIBAV_REPO} | tar xJ +RUN cd /opt/build/gst-libav-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +# cleanup +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 + +FROM ubuntu:22.04 +LABEL Description="This is the base image for Gstreamer ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + rm -rf /var/lib/apt/lists/* +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner + diff --git a/Xeon/centos-7/media/dev/Dockerfile.m4 b/Xeon/ubuntu-22.04/media/dev/Dockerfile.m4 similarity index 61% rename from Xeon/centos-7/media/dev/Dockerfile.m4 rename to Xeon/ubuntu-22.04/media/dev/Dockerfile.m4 index b49ab1162..679e44eb1 100644 --- a/Xeon/centos-7/media/dev/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/media/dev/Dockerfile.m4 @@ -1,19 +1,23 @@ include(begin.m4) -include(centos-repo.m4) -include(cmake.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(meson.m4) include(dav1d.m4) include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-libav.m4) include(gst-svt.m4) include(ffmpeg.m4) include(end.m4)dnl @@ -21,20 +25,16 @@ include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - BUILD_ALL()dnl define(`CLEANUP_CC',no)dnl CLEANUP()dnl FROM OS_NAME:OS_VERSION -LABEL Description="This is the image for FFMPEG and Gstreamer application for media development on OS_NAME OS_VERSION" +LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) - # Install +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(devel,build)dnl + diff --git a/Xeon/centos-7/media/dev/README.md b/Xeon/ubuntu-22.04/media/dev/README.md similarity index 92% rename from Xeon/centos-7/media/dev/README.md rename to Xeon/ubuntu-22.04/media/dev/README.md index 59aa23911..48dc3deb1 100644 --- a/Xeon/centos-7/media/dev/README.md +++ b/Xeon/ubuntu-22.04/media/dev/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. This is development image aim towards enabling C++ application compilation, debugging (with the debugging, profiling tools) and optimization (with the optimization tools.) You can compile C++ applications with this image and then copy the applications to the corresponding deployment image. Included what are in FFmpeg or GStreamer media creation and delivery images . The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-media-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/media/dev/Dockerfile) + - [xeon-ubuntu-2204-media-dev](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/media/dev/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| |OpenSSL|Apache License 2.0| diff --git a/Xeon/centos-7/media/ffmpeg/build.sh b/Xeon/ubuntu-22.04/media/dev/build.sh similarity index 72% rename from Xeon/centos-7/media/ffmpeg/build.sh rename to Xeon/ubuntu-22.04/media/dev/build.sh index 3277607f5..bc02840ba 100755 --- a/Xeon/centos-7/media/ffmpeg/build.sh +++ b/Xeon/ubuntu-22.04/media/dev/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-ffmpeg" +IMAGE="xeon-ubuntu2204-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/media/ffmpeg/shell.sh b/Xeon/ubuntu-22.04/media/dev/shell.sh similarity index 72% rename from Xeon/centos-7/media/ffmpeg/shell.sh rename to Xeon/ubuntu-22.04/media/dev/shell.sh index 50a28a845..80c6b1363 100755 --- a/Xeon/centos-7/media/ffmpeg/shell.sh +++ b/Xeon/ubuntu-22.04/media/dev/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-ffmpeg" +IMAGE="xeon-ubuntu2204-media-dev" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/centos-7/media/svt/.dockerignore b/Xeon/ubuntu-22.04/media/ffmpeg/.dockerignore similarity index 100% rename from Xeon/centos-7/media/svt/.dockerignore rename to Xeon/ubuntu-22.04/media/ffmpeg/.dockerignore diff --git a/Xeon/ubuntu-22.04/media/ffmpeg/CMakeLists.txt b/Xeon/ubuntu-22.04/media/ffmpeg/CMakeLists.txt new file mode 100644 index 000000000..7e1981ebc --- /dev/null +++ b/Xeon/ubuntu-22.04/media/ffmpeg/CMakeLists.txt @@ -0,0 +1,3 @@ +set(image "xeon_ffmpeg_ubuntu2204") +include(image) +include(ffmpeg-tests) diff --git a/Xeon/centos-7/media/ffmpeg/Dockerfile b/Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile similarity index 54% rename from Xeon/centos-7/media/ffmpeg/Dockerfile rename to Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile index 46123bc9d..06bf033c3 100644 --- a/Xeon/centos-7/media/ffmpeg/Dockerfile +++ b/Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,17 +32,17 @@ # This file is automatically generated from .m4 template. # To update, modify the template and regenerate. -FROM centos:7 AS build - -RUN yum install -y -q epel-release centos-release-scl && rm -rf /var/yum/cache/* - +FROM ubuntu:22.04 AS build RUN mkdir -p /opt/build && mkdir -p /opt/dist -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig -RUN yum install -y wget make autoconf diffutils automake gcc-c++ +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* # build libogg ARG OGG_VER=1.3.5 @@ -51,12 +51,15 @@ ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg RUN cd /opt/build && \ wget -O - ${LIBOGG_REPO} | tar xz && \ cd libogg-1.3.5 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget make autoconf diffutils automake +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake && \ + rm -rf /var/lib/apt/lists/* # build libvorbis ARG VORBIS_VER=1.3.7 @@ -64,12 +67,15 @@ ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VE RUN cd /opt/build && \ wget -O - ${LIBVORBIS_REPO} | tar xz && \ cd libvorbis-1.3.7 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget gcc-c++ autoconf libtool make automake +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* # build libfdkaac ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz @@ -77,63 +83,79 @@ RUN cd /opt/build && \ wget -O - ${LIBFDKAAC_REPO} | tar xz && \ cd fdk-aac-2.0.2 && \ ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget autoconf libtool make +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* # build libopus ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz RUN cd /opt/build && \ wget -O - ${LIBOPUS_REPO} | tar xz && \ cd opus-1.3.1 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y ca-certificates wget tar gcc-c++ make bzip2 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make bzip2 && \ + rm -rf /var/lib/apt/lists/* # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ cd nasm-2.15.05 && \ ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ make -j$(nproc) && \ make install -RUN yum install -y git cmake make autoconf diffutils +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 libvpx ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git RUN cd /opt/build && \ git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ cd libvpx && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y git cmake make autoconf diffutils +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/lib64 \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib \ --enable-shared && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget tar gcc-c++ make +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-YASM_VER.tar.gz @@ -145,155 +167,166 @@ RUN cd /opt/build && \ 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/lib64 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ make -j $(nproc) && \ make install -RUN yum install -y cmake make numactl-devel libpciaccess-devel +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/lib64 ../../source && \ + 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 yum install -y meson wget tar gcc-c++ +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates meson tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* # build dav1d ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz RUN cd /opt/build && \ wget -O - ${DAV1D_REPO} | tar xz RUN cd /opt/build/dav1d-0.9.2 && \ - meson build --prefix=/usr/local --libdir /usr/local/lib64 --buildtype=plain && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ cd build && \ ninja install && \ DESTDIR=/opt/dist ninja install -RUN yum install -y wget tar gcc-c++ make git cmake3 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* # build svt-hevc ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC RUN cd /opt/build && \ git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} RUN cd /opt/build/SVT-HEVC/Build/linux && \ - cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget tar gcc-c++ make git cmake3 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* # build svt av1 -ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.0/SVT-AV1-v1.2.0.tar.gz +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz RUN cd /opt/build && \ wget -O - ${SVT_AV1_REPO} | tar zx && \ - mv SVT-AV1-v1.2.0 SVT-AV1 && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ cd SVT-AV1/Build/linux && \ - cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ make -j $(nproc) && \ sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y wget tar gcc-c++ make git cmake3 devtoolset-9 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* # build svt vp9 ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 RUN cd /opt/build && \ git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ cd SVT-VP9/Build/linux && \ - (. /opt/rh/devtoolset-9/enable && cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ - make -j $(nproc) ) && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ make install -RUN yum install -y cmake3 gcc gcc-c++ make wget python36-numpy ccache eigen3-devel devtoolset-9 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates cmake gcc g++ make wget python3-numpy ccache libeigen3-dev && \ + rm -rf /var/lib/apt/lists/* # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz RUN cd /opt/build && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout 4.6.0 -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd /opt/build/opencv && mkdir build && cd build && \ - (. /opt/rh/devtoolset-9/enable && cmake3 \ +RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \ + cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ + -DCMAKE_INSTALL_LIBDIR=lib \ -DOPENCV_GENERATE_PKGCONFIG=ON \ -DBUILD_DOCS=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=/opt/dist && \ - make install ) + make install -RUN yum install -y wget patch git libv4l-devel libass-devel freetype-devel +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/n4.4.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd /opt/build && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -RUN cd /opt/build/FFmpeg-n4.4 && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-shared --disable-static --disable-doc --disable-htmlpages \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libdav1d && make -j$(nproc) && \ + --extra-cflags=-w --enable-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --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 -RUN cd /opt/build/opencv/build && \ - rm -rf ./* && \ - (. /opt/rh/devtoolset-9/enable && cmake3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_LIBDIR=lib64 \ - -DOPENCV_GENERATE_PKGCONFIG=ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_TESTS=OFF \ - .. && \ - cd modules/videoio && \ - make -j $(nproc) && \ - cp -f ../../lib/libopencv_videoio.so.4.6.0 /opt/dist/usr/local/lib64 ) +#REBUILD_OPENCV_VIDEOIO()dnl # cleanup RUN rm -rf /opt/dist/usr/local/include && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ 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 -FROM centos:7 -LABEL Description="This is the base image for FFMPEG centos 7" +FROM ubuntu:22.04 +LABEL Description="This is the base image for FFMPEG ubuntu 22.04" LABEL Vendor="Intel Corporation" WORKDIR /home -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* - - # Install -RUN yum install -y numactl-libs libpciaccess libv4l libass +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libnuma1 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / -RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig - +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig diff --git a/Xeon/centos-7/media/ffmpeg/Dockerfile.m4 b/Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 similarity index 80% rename from Xeon/centos-7/media/ffmpeg/Dockerfile.m4 rename to Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 index a137d0275..c2c0e064f 100644 --- a/Xeon/centos-7/media/ffmpeg/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile.m4 @@ -1,6 +1,6 @@ include(begin.m4) -include(centos-repo.m4) +include(ubuntu.m4) include(libogg.m4) include(libvorbis.m4) ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') @@ -19,8 +19,6 @@ include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release centos-release-scl) - BUILD_ALL()dnl CLEANUP()dnl @@ -29,8 +27,7 @@ LABEL Description="This is the base image for FFMPEG OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) - # Install -INSTALL_ALL(runtime,build) +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl diff --git a/Xeon/centos-7/media/ffmpeg/README.md b/Xeon/ubuntu-22.04/media/ffmpeg/README.md similarity index 90% rename from Xeon/centos-7/media/ffmpeg/README.md rename to Xeon/ubuntu-22.04/media/ffmpeg/README.md index 08a6ec178..39dcba1dd 100644 --- a/Xeon/centos-7/media/ffmpeg/README.md +++ b/Xeon/ubuntu-22.04/media/ffmpeg/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Included FFmpeg and codecs such as opus, ogg, vorbis, x264, x265, vp8/9, av1 and SVT-HEVC. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-media-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/media/ffmpeg/Dockerfile) + - [xeon-ubuntu-2204-media-ffmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/media/ffmpeg/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [FFmpeg](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/ffmpeg.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| |Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| diff --git a/Xeon/ubuntu-22.04/media/ffmpeg/build.sh b/Xeon/ubuntu-22.04/media/ffmpeg/build.sh new file mode 100755 index 000000000..320436774 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/ffmpeg/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-ffmpeg" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/ubuntu-22.04/media/ffmpeg/shell.sh b/Xeon/ubuntu-22.04/media/ffmpeg/shell.sh new file mode 100755 index 000000000..fa4261141 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/ffmpeg/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-ffmpeg" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-22.04/media/gst/.dockerignore b/Xeon/ubuntu-22.04/media/gst/.dockerignore new file mode 100644 index 000000000..1cb8a04d9 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/gst/.dockerignore @@ -0,0 +1,4 @@ +CMakeLists.txt +*.sh +*.m4 +test/* diff --git a/Xeon/centos-7/media/gst/CMakeLists.txt b/Xeon/ubuntu-22.04/media/gst/CMakeLists.txt similarity index 50% rename from Xeon/centos-7/media/gst/CMakeLists.txt rename to Xeon/ubuntu-22.04/media/gst/CMakeLists.txt index 4c40e2741..5b98113e0 100644 --- a/Xeon/centos-7/media/gst/CMakeLists.txt +++ b/Xeon/ubuntu-22.04/media/gst/CMakeLists.txt @@ -1,3 +1,3 @@ -set(image "xeon_gst_centos7") +set(image "xeon_gst_ubuntu2204") include(image) include(gst-tests) diff --git a/Xeon/ubuntu-22.04/media/gst/Dockerfile b/Xeon/ubuntu-22.04/media/gst/Dockerfile new file mode 100644 index 000000000..35eb65cbd --- /dev/null +++ b/Xeon/ubuntu-22.04/media/gst/Dockerfile @@ -0,0 +1,488 @@ + + +# BSD 3-Clause License +# +# Copyright (c) 2023, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This file is automatically generated from .m4 template. +# To update, modify the template and regenerate. +FROM ubuntu:22.04 AS build + + +RUN mkdir -p /opt/build && mkdir -p /opt/dist + +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget make autoconf automake g++ && \ + rm -rf /var/lib/apt/lists/* + +# build libogg +ARG OGG_VER=1.3.5 +ARG LIBOGG_REPO=https://github.com/xiph/ogg/releases/download/v${OGG_VER}/libogg-1.3.5.tar.gz + +RUN cd /opt/build && \ + wget -O - ${LIBOGG_REPO} | tar xz && \ + cd libogg-1.3.5 && \ + ./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 make autoconf automake && \ + rm -rf /var/lib/apt/lists/* + +# build libvorbis +ARG VORBIS_VER=1.3.7 +ARG LIBVORBIS_REPO=https://github.com/xiph/vorbis/releases/download/v${VORBIS_VER}/libvorbis-1.3.7.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBVORBIS_REPO} | tar xz && \ + cd libvorbis-1.3.7 && \ + ./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 g++ autoconf libtool autotools-dev automake make && \ + rm -rf /var/lib/apt/lists/* + +# build libfdkaac +ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBFDKAAC_REPO} | tar xz && \ + cd fdk-aac-2.0.2 && \ + ./autogen.sh && \ + ./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 autoconf libtool make && \ + rm -rf /var/lib/apt/lists/* + +# build libopus +ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +RUN cd /opt/build && \ + wget -O - ${LIBOPUS_REPO} | tar xz && \ + cd opus-1.3.1 && \ + ./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 bzip2 && \ + rm -rf /var/lib/apt/lists/* + +# build nasm +#ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + +ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 +RUN cd /opt/build && \ + wget -O - ${NASM_REPO} | tar xj && \ + cd nasm-2.15.05 && \ + ./autogen.sh && \ + ./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 \ + git cmake make autoconf && \ + rm -rf /var/lib/apt/lists/* + +# build libvpx +ARG LIBVPX_REPO=https://chromium.googlesource.com/webm/libvpx.git +RUN cd /opt/build && \ + git clone ${LIBVPX_REPO} -b v1.12.0 --depth 1 && \ + cd libvpx && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=nasm && \ + make -j$(nproc) && \ + make install DESTDIR=/opt/dist && \ + make install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* + +# build libaom +ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom +RUN cd /opt/build && \ + git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ + cd aom/build && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ + make -j$(nproc) && \ + 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-YASM_VER.tar.gz +# At the time of 21.6 Release, yasm official site above had certificate problem, hence pulling from Dockerfiles-Resources. +ARG YASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/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 && \ + rm -rf /var/lib/apt/lists/* + +# build meson +ARG MESON_REPO=https://github.com/mesonbuild/meson +RUN git clone ${MESON_REPO}; \ + cd meson; \ + git checkout 0.63.0; \ + python3 setup.py install; + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config && \ + rm -rf /var/lib/apt/lists/* + +# build dav1d +ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz +RUN cd /opt/build && \ + wget -O - ${DAV1D_REPO} | tar xz +RUN cd /opt/build/dav1d-0.9.2 && \ + meson build --prefix=/usr/local --libdir /usr/local/lib --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt-hevc +ARG SVT_HEVC_REPO=https://github.com/OpenVisualCloud/SVT-HEVC +RUN cd /opt/build && \ + git clone -b v1.5.1 --depth 1 ${SVT_HEVC_REPO} +RUN cd /opt/build/SVT-HEVC/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt av1 +ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz +RUN cd /opt/build && \ + wget -O - ${SVT_AV1_REPO} | tar zx && \ + mv SVT-AV1-v1.3.0 SVT-AV1 && \ + cd SVT-AV1/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + make -j $(nproc) && \ + sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \ + 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 cmake git && \ + rm -rf /var/lib/apt/lists/* + +# build svt vp9 +ARG SVT_VP9_REPO=https://github.com/OpenVisualCloud/SVT-VP9 +RUN cd /opt/build && \ + git clone ${SVT_VP9_REPO} -b v0.3.0 --depth 1 && \ + cd SVT-VP9/Build/linux && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=/usr/local/lib -DCMAKE_ASM_NASM_COMPILER=yasm ../.. && \ + 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 tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev python3-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-core +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTCORE_REPO} | tar xJ +RUN cd /opt/build/gstreamer-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ gobjc wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev libx11-dev libxv-dev libxt-dev libasound2-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev libgl1-mesa-dev libx11-xcb-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-base +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBASE_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-base-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dalsa=enabled \ + -Dpango=enabled \ + -Dtheora=enabled \ + -Dlibvisual=enabled \ + -Dgl=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison libx11-dev libxv-dev libxt-dev libgdk-pixbuf2.0-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libsoup2.4-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-good +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTGOOD_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-good-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Ddoc=disabled \ + -Dgdk-pixbuf=enabled \ + -Djpeg=enabled \ + -Dpng=enabled \ + -Disomp4=enabled \ + -Dsoup=enabled \ + -Dvpx=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison gobject-introspection libgirepository1.0-dev openssl libcurl4-gnutls-dev librtmp-dev mjpegtools libde265-dev && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-bad +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ + cd gst-plugins-bad-1.20.3 && \ + meson build \ + --prefix=/usr/local \ + --libdir=/usr/local/lib \ + --libexecdir=/usr/local/lib \ + --buildtype=plain \ + -Ddoc=disabled \ + -Dexamples=disabled \ + -Dtests=disabled \ + -Dintrospection=enabled \ + -Dgpl=enabled \ + -Drtmp=enabled \ + -Dx265=enabled \ + -Drsvg=disabled \ + -Dfdkaac=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget pkg-config libglib2.0-dev flex bison && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-ugly +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTUGLY_REPO} | tar xJ +RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain \ + -Ddoc=disabled \ + -Dgpl=enabled \ + -Dx264=enabled \ + && cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential ca-certificates wget patch git libv4l-dev libass-dev && \ + rm -rf /var/lib/apt/lists/* + +# build ffmpeg +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg +RUN cd /opt/build && \ + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout n4.4.3 + +#ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +RUN cd /opt/build/FFmpeg && \ + patch -p1 < /opt/build/SVT-HEVC/ffmpeg_plugin/n4.4-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch || true +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl + + + + +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd /opt/build/FFmpeg && \ + ./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-nonfree --enable-libass --enable-libfreetype --disable-xlib --disable-sdl2 --disable-hwaccels --disable-vaapi --enable-libv4l2 --enable-indev=v4l2 --enable-libfdk-aac --enable-libopus --enable-libvpx --enable-libvorbis --enable-gpl --enable-libx264 --enable-gpl --enable-libx265 --enable-libsvtav1 --enable-libsvthevc --enable-libaom --enable-libdav1d && 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 tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +# build gst-plugin-libav +ARG GSTLIBAV_REPO=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.20.3.tar.xz +RUN cd /opt/build && \ + wget -O - ${GSTLIBAV_REPO} | tar xJ +RUN cd /opt/build/gst-libav-1.20.3 && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + --prefix=/usr/local --buildtype=plain && \ + cd build && \ + ninja install && \ + DESTDIR=/opt/dist ninja install + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates tar g++ wget && \ + rm -rf /var/lib/apt/lists/* + +RUN cd /opt/build/SVT-HEVC/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-AV1/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install +RUN cd /opt/build/SVT-VP9/gstreamer-plugin && \ + meson build --libdir=/usr/local/lib --libexecdir=/usr/local/lib \ + -Dprefix=/usr/local --buildtype=plain && \ + cd build && ninja install && \ + DESTDIR=/opt/dist ninja install + +# cleanup +RUN rm -rf /opt/dist/usr/local/include && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ + 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 + +FROM ubuntu:22.04 +LABEL Description="This is the base image for Gstreamer ubuntu 22.04" +LABEL Vendor="Intel Corporation" +WORKDIR /home + +# Install +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libnuma1 libglib2.0-0 libegl1 libx11-6 libxv1 libxt6 libasound2 libpangocairo-1.0-0 libcairo-gobject2 libtheora0 libvisual-0.4-0 libgl1-mesa-dri libgl1-mesa-glx libegl1-mesa libgdk-pixbuf2.0-0 libjpeg-turbo8 libpng16-16 zlib1g libsoup2.4-1 openssl libcurl3-gnutls librtmp1 mjpegtools libde265-0 libxcb-shape0 libxcb-xfixes0 libv4l-0 libass9 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig + +ENV GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 +ENV GST_PLUGIN_SCANNER=/usr/local/lib/gstreamer-1.0/gst-plugin-scanner + diff --git a/Xeon/centos-7/media/gst/Dockerfile.m4 b/Xeon/ubuntu-22.04/media/gst/Dockerfile.m4 similarity index 75% rename from Xeon/centos-7/media/gst/Dockerfile.m4 rename to Xeon/ubuntu-22.04/media/gst/Dockerfile.m4 index 06b5a9335..9bfeeb2be 100644 --- a/Xeon/centos-7/media/gst/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/media/gst/Dockerfile.m4 @@ -1,7 +1,6 @@ include(begin.m4) -include(centos-repo.m4) -include(cmake.m4) +include(ubuntu.m4) include(libogg.m4) include(libvorbis.m4) ifelse(defn(`BUILD_FDKAAC'),`ON',`include(libfdk-aac.m4)') @@ -10,20 +9,23 @@ include(libvpx.m4) include(libaom.m4) include(libx264.m4) include(libx265.m4) +include(meson.m4) include(dav1d.m4) include(svt-hevc.m4) include(svt-av1.m4) include(svt-vp9.m4) include(gst-core.m4) +include(gst-plugins-base.m4) +include(gst-plugins-good.m4) +include(gst-plugins-bad.m4) +include(gst-plugins-ugly.m4) +include(gst-libav.m4) include(gst-svt.m4) include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release centos-release-scl) -INSTALL_CENTOS_RPMFUSION_REPO(7) - BUILD_ALL()dnl CLEANUP()dnl @@ -32,8 +34,7 @@ LABEL Description="This is the base image for Gstreamer OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) -INSTALL_CENTOS_RPMFUSION_REPO(7) - # Install +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(runtime,build)dnl + diff --git a/Xeon/centos-7/media/gst/README.md b/Xeon/ubuntu-22.04/media/gst/README.md similarity index 92% rename from Xeon/centos-7/media/gst/README.md rename to Xeon/ubuntu-22.04/media/gst/README.md index 93822c658..ac306e501 100644 --- a/Xeon/centos-7/media/gst/README.md +++ b/Xeon/ubuntu-22.04/media/gst/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Included gstreamer and audio and video plugins that can be connected to process audio and video content, such as creating, converting, transcoding. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-media-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/media/gst/Dockerfile) + - [xeon-ubuntu-2204-media-gst](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/media/gst/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [GStreamer](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/gst.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| |Opus Interactive Audio Codec|BSD 3-clause "New" or "Revised" License| diff --git a/Xeon/centos-7/media/nginx/build.sh b/Xeon/ubuntu-22.04/media/gst/build.sh similarity index 72% rename from Xeon/centos-7/media/nginx/build.sh rename to Xeon/ubuntu-22.04/media/gst/build.sh index e26c546ea..d4c433c1a 100755 --- a/Xeon/centos-7/media/nginx/build.sh +++ b/Xeon/ubuntu-22.04/media/gst/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMAGE="xeon-centos7-media-nginx" +IMAGE="xeon-ubuntu2204-media-gst" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh" diff --git a/Xeon/ubuntu-22.04/media/gst/shell.sh b/Xeon/ubuntu-22.04/media/gst/shell.sh new file mode 100755 index 000000000..8383521aa --- /dev/null +++ b/Xeon/ubuntu-22.04/media/gst/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-gst" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-22.04/media/nginx/.dockerignore b/Xeon/ubuntu-22.04/media/nginx/.dockerignore new file mode 100644 index 000000000..1cb8a04d9 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/nginx/.dockerignore @@ -0,0 +1,4 @@ +CMakeLists.txt +*.sh +*.m4 +test/* diff --git a/Xeon/ubuntu-22.04/media/nginx/CMakeLists.txt b/Xeon/ubuntu-22.04/media/nginx/CMakeLists.txt new file mode 100644 index 000000000..4d3b77288 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/nginx/CMakeLists.txt @@ -0,0 +1,4 @@ +set(image "xeon_nginx_rtmp_ubuntu2204") +set(dep_image "xeon_ffmpeg_ubuntu2204") +include(image) +include(nginx-tests) diff --git a/Xeon/centos-7/media/nginx/Dockerfile b/Xeon/ubuntu-22.04/media/nginx/Dockerfile similarity index 82% rename from Xeon/centos-7/media/nginx/Dockerfile rename to Xeon/ubuntu-22.04/media/nginx/Dockerfile index 66f917d7e..6ad87e661 100644 --- a/Xeon/centos-7/media/nginx/Dockerfile +++ b/Xeon/ubuntu-22.04/media/nginx/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,16 +32,17 @@ # This file is automatically generated from .m4 template. # To update, modify the template and regenerate. -FROM centos:7 AS build - -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* +FROM ubuntu:22.04 AS build RUN mkdir -p /opt/build && mkdir -p /opt/dist -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig -RUN yum install -y wget patch +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget patch && \ + rm -rf /var/lib/apt/lists/* ARG NGINX_FLV_PATCHES_REPO=https://github.com/VCDP/CDN/archive/v0.4.tar.gz ARG NGINX_FLV_PATCHES_PATH=/opt/build/CDN-0.4 @@ -64,7 +65,10 @@ ARG NGINX_UPLOAD_REPO=https://github.com/fdintino/nginx-upload-module/archive/2. RUN cd /opt/build && \ wget -O - ${NGINX_UPLOAD_REPO} | tar xz -RUN yum install -y gcc libxslt-devel make pcre-devel wget zlib-devel openssl-devel +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates gcc libpcre3-dev libxslt1-dev make wget zlib1g-dev libssl-dev && \ + rm -rf /var/lib/apt/lists/* # build nginx ARG NGINX_REPO=https://nginx.org/download/nginx-1.22.0.tar.gz @@ -72,7 +76,7 @@ RUN cd /opt/build && \ wget -O - ${NGINX_REPO} | tar xz && \ cd nginx-1.22.0 && \ ./configure --prefix=/var/www \ - --sbin-path=/usr/local/sbin/nginx --modules-path=/usr/local/lib64/nginx/modules \ + --sbin-path=/usr/local/sbin/nginx --modules-path=/usr/local/lib/nginx/modules \ --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/www/log/error.log \ --pid-path=/var/www/nginx.pid --lock-path=/var/www/nginx.lock \ --http-log-path=/var/www/log/access.log \ @@ -81,8 +85,8 @@ RUN cd /opt/build && \ --http-fastcgi-temp-path=/var/www/tmp/fastcgi \ --http-uwsgi-temp-path=/var/www/tmp/uwsgi \ --http-scgi-temp-path=/var/www/tmp/scgi \ - --user=nobody \ - --group=nobody \ + --user=www-data \ + --group=www-data \ --with-select_module --with-poll_module --with-threads --with-file-aio \ --with-http_ssl_module --with-http_v2_module --with-http_realip_module \ --with-http_addition_module --with-http_xslt_module --with-http_sub_module \ @@ -113,23 +117,25 @@ RUN mkdir -p /opt/dist/var/www/tmp/client_body && \ # cleanup RUN rm -rf /opt/dist/usr/local/include && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ 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 -FROM openvisualcloud/xeon-centos7-media-ffmpeg:-n -LABEL Description="This is the base image for NGINX+RTMP centos 7" +FROM openvisualcloud/xeon-ubuntu2204-media-ffmpeg:-n +LABEL Description="This is the base image for NGINX+RTMP ubuntu 22.04" LABEL Vendor="Intel Corporation" WORKDIR /home # Install -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* - -RUN yum install -y libxml2 libxslt pcre zlib openssl11 +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libpcre3 libxml2 libxslt1.1 zlib1g libssl3 && \ + rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / -RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig diff --git a/Xeon/centos-7/media/nginx/Dockerfile.m4 b/Xeon/ubuntu-22.04/media/nginx/Dockerfile.m4 similarity index 82% rename from Xeon/centos-7/media/nginx/Dockerfile.m4 rename to Xeon/ubuntu-22.04/media/nginx/Dockerfile.m4 index 03f1f6986..8769842e9 100644 --- a/Xeon/centos-7/media/nginx/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/media/nginx/Dockerfile.m4 @@ -1,6 +1,6 @@ include(begin.m4) -include(centos-repo.m4) +include(ubuntu.m4) include(nginx-flv.m4) include(nginx-upload.m4) include(nginx.m4) @@ -9,7 +9,6 @@ include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release) BUILD_ALL()dnl CLEANUP()dnl @@ -19,6 +18,6 @@ LABEL Vendor="Intel Corporation" WORKDIR /home # Install -INSTALL_CENTOS_REPO(epel-release) +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(runtime,build) diff --git a/Xeon/centos-7/media/nginx/README.md b/Xeon/ubuntu-22.04/media/nginx/README.md similarity index 90% rename from Xeon/centos-7/media/nginx/README.md rename to Xeon/ubuntu-22.04/media/nginx/README.md index 189352e9e..6eac43855 100644 --- a/Xeon/centos-7/media/nginx/README.md +++ b/Xeon/ubuntu-22.04/media/nginx/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Optimized for NGINX web server that can be used for serving web content, load balancing, HTTP caching, or a reverse proxy. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-media-nginx](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/media/nginx/Dockerfile) + - [xeon-ubuntu-2204-media-nginx](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/media/nginx/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [NGINX](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/nginx.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |nginx http flv|BSD 2-clause "Simplified" License| |nginx upload module|BSD 3-clause "Simplified" License| |nginx|BSD 2-clause "Simplified" License| diff --git a/Xeon/ubuntu-22.04/media/nginx/build.sh b/Xeon/ubuntu-22.04/media/nginx/build.sh new file mode 100755 index 000000000..d5ee88f70 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/nginx/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-nginx" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/centos-7/media/nginx/nginx.conf b/Xeon/ubuntu-22.04/media/nginx/nginx.conf similarity index 100% rename from Xeon/centos-7/media/nginx/nginx.conf rename to Xeon/ubuntu-22.04/media/nginx/nginx.conf diff --git a/Xeon/centos-7/media/nginx/nginx.conf.m4 b/Xeon/ubuntu-22.04/media/nginx/nginx.conf.m4 similarity index 100% rename from Xeon/centos-7/media/nginx/nginx.conf.m4 rename to Xeon/ubuntu-22.04/media/nginx/nginx.conf.m4 diff --git a/Xeon/ubuntu-22.04/media/nginx/shell.sh b/Xeon/ubuntu-22.04/media/nginx/shell.sh new file mode 100755 index 000000000..ee737ed14 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/nginx/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-nginx" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-22.04/media/srs/CMakeLists.txt b/Xeon/ubuntu-22.04/media/srs/CMakeLists.txt new file mode 100644 index 000000000..3ae4da2ff --- /dev/null +++ b/Xeon/ubuntu-22.04/media/srs/CMakeLists.txt @@ -0,0 +1,4 @@ +set(image "xeon_srs_ubuntu2204") +set(dep_image "xeon_ffmpeg_ubuntu2204") +include(image) +include(srs-tests) diff --git a/Xeon/centos-7/media/srs/Dockerfile b/Xeon/ubuntu-22.04/media/srs/Dockerfile similarity index 68% rename from Xeon/centos-7/media/srs/Dockerfile rename to Xeon/ubuntu-22.04/media/srs/Dockerfile index 57ecde7c8..699efa9e6 100644 --- a/Xeon/centos-7/media/srs/Dockerfile +++ b/Xeon/ubuntu-22.04/media/srs/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,29 +32,17 @@ # This file is automatically generated from .m4 template. # To update, modify the template and regenerate. -FROM centos:7 AS build +FROM ubuntu:22.04 AS build RUN mkdir -p /opt/build && mkdir -p /opt/dist -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig -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_1q.tar.gz -RUN cd /opt/build && \ - wget -O - ${OPENSSL_REPO} | tar xz && \ - cd openssl-OpenSSL_1_1_1q && \ - ./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 git gcc-c++ make unzip patch pkg-config +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git ca-certificates g++ make unzip patch pkg-config libssl-dev && \ + rm -rf /var/lib/apt/lists/* # build srs ARG SRS_REPO=https://github.com/ossrs/srs.git @@ -83,24 +71,25 @@ RUN ls /opt/dist # cleanup RUN rm -rf /opt/dist/usr/local/include && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ 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 openvisualcloud/xeon-centos7-media-ffmpeg:latest -LABEL Description="This is the base image for Media SRS centos 7" +FROM openvisualcloud/xeon-ubuntu2204-media-ffmpeg:latest +LABEL Description="This is the base image for Media SRS ubuntu 22.04" LABEL Vendor="Intel Corporation" WORKDIR /home # Install -RUN yum install -y bash +RUN apt-get update && apt-get upgrade -y systemd +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + bash openssl && \ + rm -rf /var/lib/apt/lists/* COPY --from=build /opt/dist / -RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig diff --git a/Xeon/centos-7/media/srs/Dockerfile.m4 b/Xeon/ubuntu-22.04/media/srs/Dockerfile.m4 similarity index 78% rename from Xeon/centos-7/media/srs/Dockerfile.m4 rename to Xeon/ubuntu-22.04/media/srs/Dockerfile.m4 index 6608dba0f..e3ea600eb 100644 --- a/Xeon/centos-7/media/srs/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/media/srs/Dockerfile.m4 @@ -1,7 +1,6 @@ include(begin.m4) include(ubuntu.m4) -include(openssl.m4) include(srs.m4) include(end.m4)dnl @@ -11,11 +10,12 @@ FROM OS_NAME:OS_VERSION AS build BUILD_ALL()dnl CLEANUP()dnl -FROM openvisualcloud/xeon-centos7-media-ffmpeg:latest +FROM openvisualcloud/xeon-ubuntu2204-media-ffmpeg:latest LABEL Description="This is the base image for Media SRS OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home # Install +UPGRADE_UBUNTU_COMPONENTS() INSTALL_ALL(runtime,build) diff --git a/Xeon/centos-7/media/srs/README.md b/Xeon/ubuntu-22.04/media/srs/README.md similarity index 90% rename from Xeon/centos-7/media/srs/README.md rename to Xeon/ubuntu-22.04/media/srs/README.md index 2a0e87290..aa4bf8914 100644 --- a/Xeon/centos-7/media/srs/README.md +++ b/Xeon/ubuntu-22.04/media/srs/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Image with SRS high efficiency, stable and simple RTMP/HLS/FLV streaming cluster. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-media-srs](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/media/srs/Dockerfile) + - [xeon-ubuntu-2204-media-srs](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/media/srs/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 @@ -23,7 +23,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |OpenSSL|Apache License 2.0| |Simple Realtime Server|MIT License| |libogg|BSD 3-clause "New" or "Revised" License| diff --git a/Xeon/ubuntu-22.04/media/srs/build.sh b/Xeon/ubuntu-22.04/media/srs/build.sh new file mode 100755 index 000000000..ec5b8f61a --- /dev/null +++ b/Xeon/ubuntu-22.04/media/srs/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-srs" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/ubuntu-22.04/media/srs/shell.sh b/Xeon/ubuntu-22.04/media/srs/shell.sh new file mode 100755 index 000000000..0d79016b8 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/srs/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-srs" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/Xeon/ubuntu-22.04/media/svt/.dockerignore b/Xeon/ubuntu-22.04/media/svt/.dockerignore new file mode 100644 index 000000000..1cb8a04d9 --- /dev/null +++ b/Xeon/ubuntu-22.04/media/svt/.dockerignore @@ -0,0 +1,4 @@ +CMakeLists.txt +*.sh +*.m4 +test/* diff --git a/Xeon/centos-7/media/svt/CMakeLists.txt b/Xeon/ubuntu-22.04/media/svt/CMakeLists.txt similarity index 50% rename from Xeon/centos-7/media/svt/CMakeLists.txt rename to Xeon/ubuntu-22.04/media/svt/CMakeLists.txt index 8c39bceec..83627768d 100644 --- a/Xeon/centos-7/media/svt/CMakeLists.txt +++ b/Xeon/ubuntu-22.04/media/svt/CMakeLists.txt @@ -1,3 +1,3 @@ -set(image "xeon_svt_centos7") +set(image "xeon_svt_ubuntu2204") include(image) include(svt-tests) diff --git a/Xeon/centos-7/media/svt/Dockerfile b/Xeon/ubuntu-22.04/media/svt/Dockerfile similarity index 71% rename from Xeon/centos-7/media/svt/Dockerfile rename to Xeon/ubuntu-22.04/media/svt/Dockerfile index b718dfe26..7132222b4 100644 --- a/Xeon/centos-7/media/svt/Dockerfile +++ b/Xeon/ubuntu-22.04/media/svt/Dockerfile @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,62 +32,63 @@ # This file is automatically generated from .m4 template. # To update, modify the template and regenerate. -FROM centos:7 AS build - -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* - +FROM ubuntu:22.04 AS build RUN mkdir -p /opt/build && mkdir -p /opt/dist -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig -RUN yum install -y ca-certificates wget tar gcc-c++ make bzip2 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates wget tar g++ make bzip2 && \ + rm -rf /var/lib/apt/lists/* # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-2.15.05.tar.bz2 RUN cd /opt/build && \ wget -O - ${NASM_REPO} | tar xj && \ cd nasm-2.15.05 && \ ./autogen.sh && \ - ./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \ + ./configure --prefix=/usr/local --libdir=/usr/local/lib && \ make -j$(nproc) && \ make install -RUN yum install -y git cmake3 make +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git cmake make && \ + rm -rf /var/lib/apt/lists/* # build libaom ARG LIBAOM_REPO=https://aomedia.googlesource.com/aom RUN cd /opt/build && \ git clone ${LIBAOM_REPO} -b v3.4.0 --depth 1 && \ cd aom/build && \ - cmake3 -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib64 .. && \ + cmake -DBUILD_SHARED_LIBS=ON -DENABLE_NASM=ON -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib .. && \ make -j$(nproc) && \ make install DESTDIR=/opt/dist && \ make install # cleanup RUN rm -rf /opt/dist/usr/local/include && \ - rm -rf /opt/dist/usr/local/lib64/pkgconfig && \ + rm -rf /opt/dist/usr/local/lib/pkgconfig && \ 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 -FROM openvisualcloud/xeon-centos7-media-ffmpeg:latest -LABEL Description="This is the showcase image for SVT centos 7" +FROM openvisualcloud/xeon-ubuntu2204-media-ffmpeg:latest +LABEL Description="This is the showcase image for SVT ubuntu 22.04" LABEL Vendor="Intel Corporation" WORKDIR /home -RUN yum install -y -q epel-release && rm -rf /var/yum/cache/* - - # Install -RUN yum install -y bash +RUN apt-get update && apt-get upgrade -y systemd -COPY --from=build /opt/dist / -RUN echo "/usr/local/lib64" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig +COPY --from=build /opt/dist / +RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig diff --git a/Xeon/centos-7/media/svt/Dockerfile.m4 b/Xeon/ubuntu-22.04/media/svt/Dockerfile.m4 similarity index 60% rename from Xeon/centos-7/media/svt/Dockerfile.m4 rename to Xeon/ubuntu-22.04/media/svt/Dockerfile.m4 index fa80f2c9a..b127711e7 100644 --- a/Xeon/centos-7/media/svt/Dockerfile.m4 +++ b/Xeon/ubuntu-22.04/media/svt/Dockerfile.m4 @@ -1,24 +1,21 @@ include(begin.m4) -include(centos-repo.m4) +include(ubuntu.m4) include(libaom.m4) include(end.m4)dnl PREAMBLE FROM OS_NAME:OS_VERSION AS build -INSTALL_CENTOS_REPO(epel-release) - BUILD_ALL()dnl CLEANUP()dnl -FROM openvisualcloud/xeon-centos7-media-ffmpeg:latest +FROM openvisualcloud/xeon-ubuntu2204-media-ffmpeg:latest LABEL Description="This is the showcase image for SVT OS_NAME OS_VERSION" LABEL Vendor="Intel Corporation" WORKDIR /home -INSTALL_CENTOS_REPO(epel-release) - # Install -INSTALL_ALL(runtime,build) +UPGRADE_UBUNTU_COMPONENTS() +INSTALL_ALL(runtime,build)dnl diff --git a/Xeon/centos-7/media/svt/README.md b/Xeon/ubuntu-22.04/media/svt/README.md similarity index 90% rename from Xeon/centos-7/media/svt/README.md rename to Xeon/ubuntu-22.04/media/svt/README.md index 1564ef29c..a7f8234e2 100644 --- a/Xeon/centos-7/media/svt/README.md +++ b/Xeon/ubuntu-22.04/media/svt/README.md @@ -1,11 +1,11 @@ This docker image is part of Open Visual Cloud software stacks. Optimized for the media creation and delivery use case. Image with SVT (Scalable Video Technology) Encoder and decoders. Ready to use SVT apps to try AV1, HEVC, VP9 transcoders. The docker image can be used in the FROM field of a downstream Dockerfile. ## Supported tags and respective Dockerfile links - - [xeon-centos-7-media-svt](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.3/Xeon/centos-7/media/svt/Dockerfile) + - [xeon-ubuntu-2204-media-svt](https://github.com/OpenVisualCloud/Dockerfiles/blob/v22.6/Xeon/ubuntu-22.04/media/svt/Dockerfile) ## Quick reference - #### Supported platform and OS - Intel® Xeon® platform, CentOS-7 + Intel® Xeon® platform, Ubuntu 22.04 - #### Usage instructions: [SVT](https://github.com/OpenVisualCloud/Dockerfiles/blob/master/doc/svt.md) @@ -24,7 +24,7 @@ This docker installs third party components licensed under various open source l | Components | License | | ----- | ----- | -|CentOS| [Various](https://hub.docker.com/_/centos) | +|Ubuntu| [Various](https://hub.docker.com/_/ubuntu) | |Aomedia AV1 Codec Library|BSD 2-clause "Simplified" License| |libogg|BSD 3-clause "New" or "Revised" License| |libvorbis|BSD 3-clause "New" or "Revised" License| diff --git a/Xeon/ubuntu-22.04/media/svt/build.sh b/Xeon/ubuntu-22.04/media/svt/build.sh new file mode 100755 index 000000000..35afae61e --- /dev/null +++ b/Xeon/ubuntu-22.04/media/svt/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-svt" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/build.sh" diff --git a/Xeon/ubuntu-22.04/media/svt/shell.sh b/Xeon/ubuntu-22.04/media/svt/shell.sh new file mode 100755 index 000000000..92dda699b --- /dev/null +++ b/Xeon/ubuntu-22.04/media/svt/shell.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +IMAGE="xeon-ubuntu2204-media-svt" +DIR=$(dirname $(readlink -f "$0")) + +. "${DIR}/../../../../script/shell.sh" diff --git a/doc/test.md b/doc/test.md index f5a380ff0..1d539831e 100644 --- a/doc/test.md +++ b/doc/test.md @@ -5,7 +5,7 @@ - -: To be added in subsequent commits. -| Platform: Xeon (CPU) | Ubuntu 20.04 LTS | CentOS-7 | +| Platform: Xeon (CPU) | Ubuntu 20.04 LTS | Ubuntu 22.04 LTS | |-----|:---:|:---:| | media-ffmpeg | V | V | | media-gst | V | V | @@ -16,18 +16,25 @@ | analytics-ffmpeg | V | V | | analytics-gst | V | V | | analytics-dev | V | V | -| service-owt | - | V | -| service-owt360 | - | V | -| service-owt-dev | - | V | +| service-owt | V | - | +| service-owt-dev | V | - | +| service-owt360 | - | - | -| Platform: QAT | Ubuntu 20.04 LTS | CentOS-7 | -|-----|:---:|:---:| -| media-nginx | V | V | -| media-nginx_sw | V | V | -| media-dev | V | V | +| Platform: QAT | Ubuntu 20.04 LTS | +|-----|:---:| +| media-nginx | V | +| media-nginx_sw | V | +| media-dev | V | -| Platform: SG1 | Ubuntu 20.04 LTS | CentOS-7 | +| Platform: SG1 | Ubuntu 20.04 LTS | Ubuntu 22.04 LTS | CentOS-7 | +|-----|:---:|:---:|:---:| +| media-ffmpeg | V | V | V | +| media-dev | V | V | V | + +| Platform: SG2 | Ubuntu 20.04 LTS | Ubuntu 22.04 LTS | |-----|:---:|:---:| +| media-gst | V | V | +| media-dev | V | V | | media-ffmpeg | V | V | | media-dev | V | V | diff --git a/script/build.sh b/script/build.sh index 2c5df9b49..e3a2d50a9 100644 --- a/script/build.sh +++ b/script/build.sh @@ -19,7 +19,7 @@ fi for m4file in "${DIR}"/*.m4; do if [[ -f $m4file ]]; then - m4 -I "${DIR}/../../../../template/system" -I "${DIR}/../../../../template/components" -DOS_NAME=${OS_NAME} -DOS_VERSION=${OS_VERSION} -DBUILD_VERSION=${BUILD_VERSION} -DBUILD_FDKAAC=${BUILD_FDKAAC} "${m4file}" > "${m4file%\.m4}" + m4 -I "${DIR}/../../../../template/system" -I "${DIR}/../../../../template/components" -DIMAGE=${IMAGE} -DOS_NAME=${OS_NAME} -DOS_VERSION=${OS_VERSION} -DBUILD_VERSION=${BUILD_VERSION} -DBUILD_FDKAAC=${BUILD_FDKAAC} "${m4file}" > "${m4file%\.m4}" fi done || true diff --git a/script/shell.sh b/script/shell.sh index 2f1fb2570..95bccdc13 100644 --- a/script/shell.sh +++ b/script/shell.sh @@ -19,4 +19,4 @@ if [[ $IMAGE == *analytics* ]] || [[ $IMAGE == *nginx* ]]; then HOST_NETWORK="--network=host $HOST_NETWORK" fi -docker run $DEVICE_DIR --rm $HOST_NETWORK -v "${TEST}:/mnt:rw" $(env | cut -f1 -d= | grep -E '_(proxy|REPO|VER)$' | sed 's/^/-e /') $(grep '^ARG .*=' "${DIR}/Dockerfile" | sed 's/^ARG \([^=]*\)=.*/-e \1/') $DOCKER_IT "${DOCKER_PREFIX}/${IMAGE}" "${@:-/bin/bash}" +docker run $DEVICE_DIR --rm $HOST_NETWORK -v "${TEST}:/mnt:ro" $(env | cut -f1 -d= | grep -E '_(proxy|REPO|VER)$' | sed 's/^/-e /') $(grep '^ARG .*=' "${DIR}/Dockerfile" | sed 's/^ARG \([^=]*\)=.*/-e \1/') $DOCKER_IT "${DOCKER_PREFIX}/${IMAGE}" "${@:-/bin/bash}" diff --git a/template/components/boost.m4 b/template/components/boost.m4 index b290a2752..600e91481 100644 --- a/template/components/boost.m4 +++ b/template/components/boost.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/cmake.m4 b/template/components/cmake.m4 index 542e96b90..269734644 100644 --- a/template/components/cmake.m4 +++ b/template/components/cmake.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/dav1d.m4 b/template/components/dav1d.m4 index 43d508bef..9a084f2b0 100644 --- a/template/components/dav1d.m4 +++ b/template/components/dav1d.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/dldt-ie.m4 b/template/components/dldt-ie.m4 index b24eda804..0d324acf7 100644 --- a/template/components/dldt-ie.m4 +++ b/template/components/dldt-ie.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -54,20 +54,26 @@ RUN git clone -b DLDT_VER --depth 1 ${DLDT_REPO} BUILD_HOME/openvino && \ RUN cd BUILD_HOME/openvino && \ mkdir build && cd build && \ ifelse(OS_NAME:OS_VERSION,centos:7,`(. /opt/rh/devtoolset-9/enable && ')ifdef(`BUILD_CMAKE',cmake,ifelse(OS_NAME,centos,cmake3,cmake)) \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX/openvino \ -DENABLE_CPPLINT=OFF \ -DDENABLE_INTEL_GNA=OFF \ + -DENABLE_INTEL_MYRIAD_COMMON=OFF \ + -DENABLE_INTEL_MYRIAD=OFF \ + -DENABLE_ONEDNN_FOR_GPU=ON \ -DENABLE_VPU=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ + -DENABLE_GAPI_TESTS=OFF \ + -DENABLE_BEH_TESTS=OFF \ + -DENABLE_FUNCTIONAL_TESTS=OFF \ + -DENABLE_OV_CORE_UNIT_TESTS=OFF \ + -DENABLE_OV_CORE_BACKEND_UNIT_TESTS=OFF \ -DBUILD_TESTS=OFF \ -DTREAT_WARNING_AS_ERROR=ifelse(DLDT_WARNING_AS_ERRORS,false,OFF,ON) \ - -DNGRAPH_WARNINGS_AS_ERRORS=ifelse(DLDT_WARNING_AS_ERRORS,false,OFF,ON) \ - -DNGRAPH_UNIT_TEST_ENABLE=OFF \ - -DNGRAPH_TEST_UTIL_ENABLE=OFF \ .. && \ make -j $(nproc) && \ make install && \ @@ -78,6 +84,7 @@ ARG OPENVINO_INSTALL_DIR=/usr/local/openvino ARG IE_INSTALL_DIR=${OPENVINO_INSTALL_DIR}/runtime/ ENV InferenceEngine_DIR=${IE_INSTALL_DIR}/cmake +ENV OpenVINO_DIR=${IE_INSTALL_DIR}/cmake ENV TBB_DIR=${IE_INSTALL_DIR}/3rdparty/tbb/cmake ENV ngraph_DIR=${IE_INSTALL_DIR}/cmake ') diff --git a/template/components/ffmpeg.m4 b/template/components/ffmpeg.m4 index 3c38cdfd7..231278370 100644 --- a/template/components/ffmpeg.m4 +++ b/template/components/ffmpeg.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -30,7 +30,8 @@ dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl include(begin.m4) -DECLARE(`FFMPEG_VER',n4.4) +DECLARE(`FFMPEG_VER',n4.4.3) +DECLARE(`FFMPEG_SHA',f6a36c7) DECLARE(`FFMPEG_ENABLE_LIBASS',true) DECLARE(`FFMPEG_ENABLE_LIBFREETYPE',true) DECLARE(`FFMPEG_ENABLE_X11',false) @@ -40,7 +41,7 @@ DECLARE(`FFMPEG_ENABLE_HWACCELS',ifdef(`ENABLE_INTEL_GFX_REPO',true,ifdef(`BUILD DECLARE(`FFMPEG_ENABLE_LIBMFX',ifdef(`BUILD_MSDK',FFMPEG_ENABLE_HWACCELS,false)) DECLARE(`FFMPEG_ENABLE_VAAPI',ifdef(`BUILD_LIBVA2',FFMPEG_ENABLE_HWACCELS,false)) DECLARE(`FFMPEG_FLV_PATCH',false) -DECLARE(`FFMPEG_1TN_PATCH',false) +DECLARE(`FFMPEG_1TN_PATCH',true) DECLARE(`FFMPEG_WARNING_AS_ERRORS',false) include(nasm.m4) @@ -63,33 +64,40 @@ define(`FFMPEG_INSTALL_DEPS',`ifelse(FFMPEG_ENABLE_V4L2,true,libv4l) ifelse(FFMP define(`BUILD_FFMPEG',` # build ffmpeg -ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +#ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/FFMPEG_VER.tar.gz +ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg RUN cd BUILD_HOME && \ - wget -O - ${FFMPEG_REPO} | tar xz + git clone ${FFMPEG_REPO} && \ + cd FFmpeg && \ + git checkout ifelse(index(IMAGE,`sg2'),-1,`FFMPEG_VER',`FFMPEG_SHA') #ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_SVT_VP9',`FFMPEG_PATCH_SVT_VP9(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_DLDT',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -#ifdef(`BUILD_OPENVINO',`FFMPEG_PATCH_ANALYTICS(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl -ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ifdef(`BUILD_SVT_HEVC',`FFMPEG_PATCH_SVT_HEVC(BUILD_HOME/FFmpeg)')dnl +#ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg-FFMPEG_VER)')dnl +ifdef(`BUILD_LIBVA2',`FFMPEG_PATCH_VAAPI(BUILD_HOME/FFmpeg)')dnl +ifdef(`BUILD_ONEVPL_DISP',` +include(media-delivery.m4) -ifelse(FFMPEG_FLV_PATCH,true, -ARG FFMPEG_PATCHES_RELEASE_REPO=https://github.com/VCDP/CDN.git +RUN cd BUILD_HOME/FFmpeg && \ + cp BUILD_HOME/media-delivery/patches/ffmpeg/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } +')dnl -RUN cd BUILD_HOME && \ - git clone ${FFMPEG_PATCHES_RELEASE_REPO} && \ - cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ - patch -p1 < BUILD_HOME/CDN/FFmpeg_patches/0001-Add-SVT-HEVC-FLV-support-on-FFmpeg.patch; -)dnl -ifelse(FFMPEG_1TN_PATCH,true, -ARG FFMPEG_1TN_PATCH_REPO=https://raw.githubusercontent.com/OpenVisualCloud/Dockerfiles-Resources/master/n4.4-enhance_1tn_performance.patch -RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +ifelse(index(IMAGE,`sg2'),-1,,ifelse(FFMPEG_1TN_PATCH,true, +ARG FFMPEG_1TN_PATCH_REPO=https://github.com/spawlows/FFmpeg/commit/6e747101f5fc0c4fb56a178c8ba24fcee4917139.patch +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd BUILD_HOME/FFmpeg && \ wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1;, -)dnl +))dnl -RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +#RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ +RUN cd BUILD_HOME/FFmpeg && \ ./configure --prefix=BUILD_PREFIX --libdir=BUILD_LIBDIR --enable-shared --disable-static --disable-doc --disable-htmlpages \ --disable-manpages --disable-podpages --disable-txtpages \ ifelse(FFMPEG_WARNING_AS_ERRORS,false,--extra-cflags=-w )dnl @@ -109,14 +117,18 @@ RUN cd BUILD_HOME/FFmpeg-FFMPEG_VER && \ ifdef(`BUILD_LIBX264',--enable-gpl --enable-libx264 )dnl ifdef(`BUILD_LIBX265',--enable-gpl --enable-libx265 )dnl ifdef(`BUILD_SVT_AV1',--enable-libsvtav1 )dnl + ifelse(index(IMAGE,`sg2'),-1,ifdef(`BUILD_SVT_HEVC',--enable-libsvthevc ))dnl ifdef(`BUILD_LIBAOM',--enable-libaom )dnl ifdef(`BUILD_LIBVMAF',--enable-libvmaf --enable-version3 )dnl ifdef(`BUILD_DAV1D',--enable-libdav1d )dnl + ifdef(`BUILD_ONEVPL_DISP',--enable-libvpl )dnl && make -j$(nproc) && \ make install DESTDIR=BUILD_DESTDIR && \ make install ifdef(`REBUILD_OPENCV_VIDEOIO',`dnl -REBUILD_OPENCV_VIDEOIO()dnl +ifelse(index(IMAGE,`sg2'),-1,` +#REBUILD_OPENCV_VIDEOIO()dnl +')dnl ')dnl ') diff --git a/template/components/gmmlib.m4 b/template/components/gmmlib.m4 index 9b2a58505..718442d5f 100644 --- a/template/components/gmmlib.m4 +++ b/template/components/gmmlib.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/gmmlib.sg1.m4 b/template/components/gmmlib.sg1.m4 index e627a9631..2ca2cf54a 100644 --- a/template/components/gmmlib.sg1.m4 +++ b/template/components/gmmlib.sg1.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl include(begin.m4) -define(`GMMLIB_VER',intel-media-sg1-pv1.3) -define(`GMMLIB_SRC_REPO',https://github.com/VCDP/gmmlib/archive/GMMLIB_VER.tar.gz) +define(`GMMLIB_VER',intel-gmmlib-22.3.0) +define(`GMMLIB_SRC_REPO',https://github.com/intel/gmmlib/archive/refs/tags/GMMLIB_VER.tar.gz) include(gmmlib.m4) include(end.m4)dnl diff --git a/template/components/gmmlib.sg2.m4 b/template/components/gmmlib.sg2.m4 new file mode 100644 index 000000000..dc88cefc2 --- /dev/null +++ b/template/components/gmmlib.sg2.m4 @@ -0,0 +1,58 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +DECLARE(`GMMLIB_VER',intel-gmmlib-22.1.7) +DECLARE(`GMMLIB_SRC_REPO',https://github.com/intel/gmmlib/archive/refs/tags/GMMLIB_VER.tar.gz) + +ifelse(OS_NAME,ubuntu,` +define(`GMMLIB_BUILD_DEPS',`ca-certificates ifdef(`BUILD_CMAKE',,cmake) g++ make wget') +') + +ifelse(OS_NAME,centos,` +define(`GMMLIB_BUILD_DEPS',`ifdef(`BUILD_CMAKE',,cmake) gcc-c++ make wget') +') + +define(`BUILD_GMMLIB',` +# build gmmlib +ARG GMMLIB_REPO=GMMLIB_SRC_REPO +RUN cd BUILD_HOME && \ + wget -O - ${GMMLIB_REPO} | tar xz +RUN cd BUILD_HOME/gmmlib-GMMLIB_VER && mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=BUILD_LIBDIR .. && \ + make -j$(nproc) && \ + make install DESTDIR=BUILD_DESTDIR && \ + make install +') + +REG(GMMLIB) + +include(end.m4)dnl diff --git a/template/components/gst-core.m4 b/template/components/gst-core.m4 index d82512a93..c45005436 100644 --- a/template/components/gst-core.m4 +++ b/template/components/gst-core.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -44,22 +44,16 @@ define(`GSTCORE_INSTALL_DEPS',`glib2 gobject-introspection') define(`BUILD_GSTCORE',` # build gst-core -ARG GSTCORE_REPO=https://github.com/GStreamer/gstreamer/archive/GSTCORE_VER.tar.gz +ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTCORE_REPO} | tar xz + wget -O - ${GSTCORE_REPO} | tar xJ RUN cd BUILD_HOME/gstreamer-GSTCORE_VER && \ meson build --libdir=BUILD_LIBDIR --libexecdir=BUILD_LIBDIR \ --prefix=BUILD_PREFIX --buildtype=plain \ -Dexamples=disabled \ -Dtests=disabled \ -Ddoc=disabled \ - -Dintrospection=enabled \ - -Dgtk_doc=disabled \ - -Dpython=enabled \ - -Dgst-python:libpython-dir=BUILD_LIBDIR \ - -Dcustom_subprojects="gst-libav,gst-plugins-base,gst-plugins-good,gst-plugins-bad,gst-plugins-ugly,gst-python" \ - -Dlibsoup:sysprof=disabled \ - -Dgpl=enabled && \ + -Dintrospection=enabled && \ cd build && \ ninja install && \ DESTDIR=BUILD_DESTDIR ninja install diff --git a/template/components/gst-gva.m4 b/template/components/gst-gva.m4 index a1b0728af..ef522a407 100644 --- a/template/components/gst-gva.m4 +++ b/template/components/gst-gva.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -30,7 +30,8 @@ dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl include(begin.m4) -DECLARE(`GVA_VER',v1.6) +DECLARE(`GVA_VER',master) +DECLARE(`GVA_VER_HASH',ec2748da5b577bbf510525f57eabde6c58efd589) DECLARE(`GVA_WITH_DRM',no) DECLARE(`GVA_WITH_X11',no) @@ -40,11 +41,13 @@ DECLARE(`GVA_WITH_EGL',no) DECLARE(`GVA_ENABLE_PAHO_INST',ifdef(`BUILD_LIBPAHO',ON,OFF)) DECLARE(`GVA_ENABLE_RDKAFKA_INST',ifdef(`BUILD_LIBRDKAFKA',ON,OFF)) -DECLARE(`GVA_ENABLE_AUDIO_INFERENCE_ELEMENTS',OFF) -DECLARE(`GVA_ENABLE_VAAPI',ifdef(`BUILD_GSTVAAPI',ON,OFF)) +DECLARE(`GVA_ENABLE_AUDIO_INFERENCE_ELEMENTS',ON) +DECLARE(`GVA_ENABLE_VAAPI',ifdef(`BUILD_MEDIA_DRIVER_PKG',ON,OFF)) +DECLARE(`GVA_ENABLE_WARNING_AS_ERRORS',OFF) +include(gst-plugins-base.m4) ifelse(OS_NAME,ubuntu,` -define(`GVA_BUILD_DEPS',`ifdef(`BUILD_CMAKE',,cmake) git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates ifdef(`BUILD_LIBVA2',,libva-dev)') +define(`GVA_BUILD_DEPS',`ifdef(`BUILD_CMAKE',,cmake) git ocl-icd-opencl-dev opencl-headers pkg-config libpython3-dev python-gi-dev ca-certificates ifdef(`BUILD_LIBVA2',,libva-dev) curl gnupg2 software-properties-common') define(`GVA_INSTALL_DEPS',`ocl-icd-libopencl1 python3-gi python3-gi-cairo python3-dev libgl1-mesa-glx ifdef(`ENABLE_INTEL_GFX_REPO',libva2 ifelse(GVA_WITH_DRM,yes,libva-drm2))') ') @@ -56,33 +59,29 @@ define(`GVA_INSTALL_DEPS',`ocl-icd libass python3-devel boost-regex python36-gob define(`BUILD_GVA',` # build gst-plugin-gva # formerly https://github.com/opencv/gst-video-analytics -ARG GVA_REPO=https://github.com/openvinotoolkit/dlstreamer_gst.git -# TODO: This is a workaround for a bug in dlstreamer_gst +ARG GVA_REPO=https://github.com/dlstreamer/dlstreamer ENV LIBRARY_PATH=BUILD_LIBDIR -RUN git clone -b GVA_VER --depth 1 $GVA_REPO BUILD_HOME/gst-video-analytics && \ +RUN git clone -b GVA_VER $GVA_REPO BUILD_HOME/gst-video-analytics && \ cd BUILD_HOME/gst-video-analytics && \ + git checkout GVA_VER_HASH && \ git submodule update --init && \ mkdir -p build && cd build && \ ifelse(OS_NAME:OS_VERSION,centos:7,`(. /opt/rh/devtoolset-9/enable && ')ifdef(`BUILD_CMAKE',cmake,ifelse(OS_NAME,centos,cmake3,cmake)) \ - -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ - -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ - -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX \ - -DCMAKE_BUILD_TYPE=Release \ - -DDISABLE_SAMPLES=ON \ - -DENABLE_PAHO_INSTALLATION=GVA_ENABLE_PAHO_INST \ - -DENABLE_RDKAFKA_INSTALLATION=GVA_ENABLE_RDKAFKA_INST \ - -DENABLE_VAAPI=GVA_ENABLE_VAAPI \ - -DENABLE_VAS_TRACKER=ON \ - -DENABLE_AUDIO_INFERENCE_ELEMENTS=GVA_ENABLE_AUDIO_INFERENCE_ELEMENTS \ - -Dwith_drm=GVA_WITH_DRM \ - -Dwith_x11=GVA_WITH_X11 \ - -Dwith_glx=GVA_WITH_GLX \ - -Dwith_wayland=GVA_WITH_WAYLAND \ - -Dwith_egl=GVA_WITH_EGL \ - .. \ + -DVERSION_PATCH="$(git rev-list --count --first-parent HEAD)" \ + -DGIT_INFO=git_"$(git rev-parse --short HEAD)" \ + -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_SAMPLES=OFF \ + -DENABLE_PAHO_INSTALLATION=GVA_ENABLE_PAHO_INST \ + -DENABLE_RDKAFKA_INSTALLATION=GVA_ENABLE_RDKAFKA_INST \ + -DENABLE_VAAPI=GVA_ENABLE_VAAPI \ + -DENABLE_AUDIO_INFERENCE_ELEMENTS=GVA_ENABLE_AUDIO_INFERENCE_ELEMENTS \ + -DTREAT_WARNING_AS_ERROR=GVA_ENABLE_WARNING_AS_ERRORS \ + .. \ && make -j $(nproc) \ && make install \ && make install DESTDIR=BUILD_DESTDIR ifelse(OS_NAME:OS_VERSION,centos:7,` )') + ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:BUILD_LIBDIR/gstreamer-1.0/:/usr/local/lib/ RUN cp -r BUILD_HOME/gst-video-analytics/build/intel64/Release/lib/* BUILD_LIBDIR/gstreamer-1.0/. diff --git a/template/components/gst-libav.m4 b/template/components/gst-libav.m4 index 2950b0e85..75c4c03a0 100644 --- a/template/components/gst-libav.m4 +++ b/template/components/gst-libav.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -43,9 +43,9 @@ define(`GSTLIBAV_BUILD_DEPS',`wget tar gcc-c++ ifdef(`BUILD_MESON',,meson)') define(`BUILD_GSTLIBAV',` # build gst-plugin-libav -ARG GSTLIBAV_REPO=https://github.com/GStreamer/gst-libav/archive/GSTCORE_VER.tar.gz +ARG GSTLIBAV_REPO=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTLIBAV_REPO} | tar xz + wget -O - ${GSTLIBAV_REPO} | tar xJ RUN cd BUILD_HOME/gst-libav-GSTCORE_VER && \ meson build --libdir=BUILD_LIBDIR --libexecdir=BUILD_LIBDIR \ --prefix=BUILD_PREFIX --buildtype=plain && \ diff --git a/template/components/gst-orc.m4 b/template/components/gst-orc.m4 index 6da35ae69..d3d13ad9d 100644 --- a/template/components/gst-orc.m4 +++ b/template/components/gst-orc.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/gst-plugins-bad.m4 b/template/components/gst-plugins-bad.m4 index 7bb87bd8f..3298ef4a8 100644 --- a/template/components/gst-plugins-bad.m4 +++ b/template/components/gst-plugins-bad.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -61,9 +61,9 @@ define(`GSTBAD_INSTALL_DEPS',`glib2 gobject-introspection ifelse(GST_CURLUSESSL, define(`BUILD_GSTBAD',` # build gst-plugin-bad -ARG GSTBAD_REPO=https://github.com/GStreamer/gst-plugins-bad/archive/GSTCORE_VER.tar.gz +ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTBAD_REPO} | tar xz && \ + wget -O - ${GSTBAD_REPO} | tar xJ && \ cd gst-plugins-bad-GSTCORE_VER && \ ifelse(OS_NAME:OS_VERSION,centos:7,`(. /opt/rh/devtoolset-9/enable && ')meson build \ --prefix=BUILD_PREFIX \ @@ -74,6 +74,7 @@ RUN cd BUILD_HOME && \ -Dexamples=disabled \ -Dtests=disabled \ -Dintrospection=enabled \ + -Dgpl=enabled \ -Drtmp=ifelse(GST_RTMP,true,enabled,disabled) \ -Dx265=ifdef(`BUILD_LIBX265',enabled,disabled) \ -Drsvg=ifelse(GST_RSVG,true,enabled,disabled) \ diff --git a/template/components/gst-plugins-base.m4 b/template/components/gst-plugins-base.m4 index fc3c9a361..a07205547 100644 --- a/template/components/gst-plugins-base.m4 +++ b/template/components/gst-plugins-base.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -57,9 +57,9 @@ define(`GSTBASE_INSTALL_DEPS',`glib2 mesa-libEGL gobject-introspection ifelse(GS define(`BUILD_GSTBASE',` # build gst-plugin-base -ARG GSTBASE_REPO=https://github.com/GStreamer/gst-plugins-base/archive/GSTCORE_VER.tar.gz +ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTBASE_REPO} | tar xz + wget -O - ${GSTBASE_REPO} | tar xJ RUN cd BUILD_HOME/gst-plugins-base-GSTCORE_VER && \ meson build \ --prefix=BUILD_PREFIX \ diff --git a/template/components/gst-plugins-good.m4 b/template/components/gst-plugins-good.m4 index e3f7c40bf..3774e281c 100644 --- a/template/components/gst-plugins-good.m4 +++ b/template/components/gst-plugins-good.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -61,9 +61,9 @@ define(`GSTGOOD_INSTALL_DEPS',`glib2 ifelse(GST_XLIB,true,libX11 libXv libXt) if define(`BUILD_GSTGOOD',` # build gst-plugin-good -ARG GSTGOOD_REPO=https://github.com/GStreamer/gst-plugins-good/archive/GSTCORE_VER.tar.gz +ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTGOOD_REPO} | tar xz + wget -O - ${GSTGOOD_REPO} | tar xJ RUN cd BUILD_HOME/gst-plugins-good-GSTCORE_VER && \ meson build --libdir=BUILD_LIBDIR --libexecdir=BUILD_LIBDIR \ --prefix=BUILD_PREFIX --buildtype=plain \ diff --git a/template/components/gst-plugins-ugly.m4 b/template/components/gst-plugins-ugly.m4 index 0356e24ec..2552638a3 100644 --- a/template/components/gst-plugins-ugly.m4 +++ b/template/components/gst-plugins-ugly.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -56,13 +56,14 @@ define(`GSTUGLY_INSTALL_DEPS',`glib2') define(`BUILD_GSTUGLY',` # build gst-plugin-ugly -ARG GSTUGLY_REPO=https://github.com/GStreamer/gst-plugins-ugly/archive/GSTCORE_VER.tar.gz +ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTUGLY_REPO} | tar xz + wget -O - ${GSTUGLY_REPO} | tar xJ RUN cd BUILD_HOME/gst-plugins-ugly-GSTCORE_VER && \ meson build --libdir=BUILD_LIBDIR --libexecdir=BUILD_LIBDIR \ --prefix=BUILD_PREFIX --buildtype=plain \ -Ddoc=disabled \ + -Dgpl=enabled \ -Dx264=ifdef(`BUILD_LIBX264',enabled,disabled) \ && cd build && \ ninja install && \ diff --git a/template/components/gst-python.m4 b/template/components/gst-python.m4 index bf3eb4d71..18a9c46ee 100644 --- a/template/components/gst-python.m4 +++ b/template/components/gst-python.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/gst-vaapi.m4 b/template/components/gst-vaapi.m4 index 18a0effeb..fb5677827 100644 --- a/template/components/gst-vaapi.m4 +++ b/template/components/gst-vaapi.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -33,9 +33,9 @@ include(begin.m4) include(gst-plugins-bad.m4) ifelse(OS_NAME,ubuntu,` -define(`GSTVAAPI_BUILD_DEPS',`ca-certificates ifdef(`BUILD_MESON',,meson) tar g++ wget pkg-config libdrm-dev libglib2.0-dev libudev-dev flex bison ifdef(`ENABLE_INTEL_GFX_REPO',libva-dev)') +define(`GSTVAAPI_BUILD_DEPS',`ca-certificates ifdef(`BUILD_MESON',,meson) tar g++ wget pkg-config libdrm-dev libglib2.0-dev libudev-dev flex bison libva-dev') -define(`GSTVAAPI_INSTALL_DEPS',`libdrm2 libglib2.0-0 libpciaccess0 libgl1-mesa-glx ifdef(`ENABLE_INTEL_GFX_REPO',libva2 libva-drm2 libva-x11-2 libva-wayland2)' ifelse(OS_NAME:OS_VERSION,ubuntu:20.04,libgles2)) +define(`GSTVAAPI_INSTALL_DEPS',`libdrm2 libglib2.0-0 libpciaccess0 libgl1-mesa-dev libva2 libva-drm2 libva-x11-2 libva-wayland2 ifelse(OS_NAME:OS_VERSION,ubuntu:20.04,libgles2)') ') ifelse(OS_NAME,centos,` @@ -45,20 +45,20 @@ define(`GSTVAAPI_INSTALL_DEPS',`glib2 libdrm libpciaccess') define(`BUILD_GSTVAAPI',` # patch gst-vaapi with gst-video-analytics patch -ARG GST_PLUGIN_VAAPI_PATCH_VER=v1.0.0 -ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/opencv/gst-video-analytics.git +ARG GST_PLUGIN_VAAPI_PATCH_VER=ec2748da5b577bbf510525f57eabde6c58efd589 +ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/dlstreamer/dlstreamer # build gst-plugin-vaapi -ARG GSTVAAPI_REPO=https://github.com/GStreamer/gstreamer-vaapi/archive/GSTCORE_VER.tar.gz +ARG GSTVAAPI_REPO=https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-GSTCORE_VER.tar.xz RUN cd BUILD_HOME && \ - wget -O - ${GSTVAAPI_REPO} | tar xz + wget -O - ${GSTVAAPI_REPO} | tar xJ RUN cd BUILD_HOME/gstreamer-vaapi-GSTCORE_VER && \ git clone ${GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS} && \ - cd gst-video-analytics && git checkout ${GST_PLUGIN_VAAPI_PATCH_VER} && \ + cd dlstreamer && git checkout ${GST_PLUGIN_VAAPI_PATCH_VER} && \ cd .. && \ - git apply gst-video-analytics/patches/gstreamer-vaapi/vasurface_qdata.patch && \ - rm -fr gst-video-analytics + git apply dlstreamer/patches/gstreamer-vaapi/*.patch && \ + rm -fr dlstreamer RUN cd BUILD_HOME/gstreamer-vaapi-GSTCORE_VER && \ meson build \ diff --git a/template/components/intel-gfx.m4 b/template/components/intel-gfx.m4 index 788ea36c9..6c01d2ef2 100644 --- a/template/components/intel-gfx.m4 +++ b/template/components/intel-gfx.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -36,10 +36,11 @@ define(`INTEL_GFX_URL',https://repositories.intel.com/graphics) pushdef(`_install_ubuntu',`dnl pushdef(`_tmp',`ifelse($1,`',UBUNTU_CODENAME(OS_VERSION),UBUNTU_CODENAME(OS_VERSION)-$1)')dnl -INSTALL_PKGS(PKGS(curl ca-certificates gpg-agent software-properties-common)) +INSTALL_PKGS(PKGS(ca-certificates gpg-agent software-properties-common wget)) + +RUN wget -qO - INTEL_GFX_URL/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu ifelse(OS_VERSION,20.04,focal,jammy) nahi" | tee /etc/apt/sources.list.d/intel.gpu.focal.list -RUN curl -fsSL INTEL_GFX_URL/intel-graphics.key | apt-key add - -RUN apt-add-repository "deb INTEL_GFX_URL/ubuntu _tmp main" popdef(`_tmp')') ifelse(OS_NAME,ubuntu,ifelse(OS_VERSION,20.04, diff --git a/template/components/ipsecmb.m4 b/template/components/ipsecmb.m4 index dc8de373a..2a4927339 100644 --- a/template/components/ipsecmb.m4 +++ b/template/components/ipsecmb.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/jsonhpp.m4 b/template/components/jsonhpp.m4 index 27442d4b0..347118c05 100644 --- a/template/components/jsonhpp.m4 +++ b/template/components/jsonhpp.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libaom.m4 b/template/components/libaom.m4 index 683f016a6..b6a1601de 100644 --- a/template/components/libaom.m4 +++ b/template/components/libaom.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libfdk-aac.m4 b/template/components/libfdk-aac.m4 index e1a3b0f5a..8eb494237 100644 --- a/template/components/libfdk-aac.m4 +++ b/template/components/libfdk-aac.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libjsonc.m4 b/template/components/libjsonc.m4 index bb8ce5d4b..27455203c 100644 --- a/template/components/libjsonc.m4 +++ b/template/components/libjsonc.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libnice.m4 b/template/components/libnice.m4 index 868994305..9df296394 100644 --- a/template/components/libnice.m4 +++ b/template/components/libnice.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libogg.m4 b/template/components/libogg.m4 index f7a5b56cc..eb3e98046 100644 --- a/template/components/libogg.m4 +++ b/template/components/libogg.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libopus.m4 b/template/components/libopus.m4 index 0b450f477..4b46917a0 100644 --- a/template/components/libopus.m4 +++ b/template/components/libopus.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libpahomqtt.m4 b/template/components/libpahomqtt.m4 index 15a53d16e..d6b602d15 100644 --- a/template/components/libpahomqtt.m4 +++ b/template/components/libpahomqtt.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/librdkafka.m4 b/template/components/librdkafka.m4 index dc875b5c4..1ae6adf96 100644 --- a/template/components/librdkafka.m4 +++ b/template/components/librdkafka.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libre.m4 b/template/components/libre.m4 index 51d6c24be..14de5bc59 100644 --- a/template/components/libre.m4 +++ b/template/components/libre.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libsrtp2.m4 b/template/components/libsrtp2.m4 index 62b94c6ef..b7bae846f 100644 --- a/template/components/libsrtp2.m4 +++ b/template/components/libsrtp2.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libva-utils.sg2.m4 b/template/components/libva-utils.sg2.m4 new file mode 100644 index 000000000..fe804b9f9 --- /dev/null +++ b/template/components/libva-utils.sg2.m4 @@ -0,0 +1,68 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +DECLARE(`LIBVA_UTILS_VER',2.15.0) +DECLARE(`LIBVA_UTILS_SRC_REPO',https://github.com/intel/libva-utils/archive/LIBVA_UTILS_VER.tar.gz) + +#ifelse(OS_NAME,ubuntu,` +#define(`LIBVA2_BUILD_DEPS',`automake ca-certificates gcc libdrm-dev libtool make pkg-config wget ifelse(LIBVA2_X11,true,libx11-dev libxext-dev libxfixes-dev) ifelse(LIBVA2_WAYLAND,true,libwayland-dev)') + +#define(`LIBVA2_INSTALL_DEPS',`libdrm2 ifelse(LIBVA2_X11,true,libx11-6 libxext6 libxfixes3) ifelse(LIBVA2_WAYLAND,true,libwayland-client0)') +#') + +#ifelse(OS_NAME,centos,` +#define(`LIBVA2_BUILD_DEPS',`automake gcc libdrm-devel libtool make pkg-config wget which ifelse(LIBVA2_X11,true,libX11-devel libXfixes-devel libXext-devel) ifelse(LIBVA2_WAYLAND,true,wayland-devel)') + +#define(`LIBVA2_INSTALL_DEPS',`libdrm ifelse(LIBVA2_X11,true,libX11 libXfixes libXext) ifelse(LIBVA2_WAYLAND,true,libwayland-client)') +#') + +define(`BUILD_LIBVA_UTILS',` +# build libva-utils +ARG LIBVA_UTILS_REPO=LIBVA_UTILS_SRC_REPO +RUN cd BUILD_HOME && \ + wget -O - ${LIBVA_UTILS_REPO} | tar xz +RUN cd BUILD_HOME/libva-utils-LIBVA_UTILS_VER && \ + ./autogen.sh --prefix=BUILD_PREFIX --libdir=BUILD_LIBDIR && \ + make -j$(nproc) && \ + make install DESTDIR=BUILD_DESTDIR && \ + make install +') + +#define(`ENV_VARS_LIBVA2',`dnl +#ENV LIBVA_DRIVERS_PATH=BUILD_LIBDIR/dri +#ENV LIBVA_DRIVER_NAME=iHD +#ENV DISPLAY=:0.0 +#') + +REG(LIBVA_UTILS) + +include(end.m4)dnl diff --git a/template/components/libva2.m4 b/template/components/libva2.m4 index 653604a2f..b17454eb6 100644 --- a/template/components/libva2.m4 +++ b/template/components/libva2.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libva2.sg1.m4 b/template/components/libva2.sg1.m4 index 4b3b01587..4510f7560 100644 --- a/template/components/libva2.sg1.m4 +++ b/template/components/libva2.sg1.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl include(begin.m4) -define(`LIBVA2_VER',intel-media-sg1-pv1.3) -define(`LIBVA2_SRC_REPO',https://github.com/VCDP/libva/archive/LIBVA2_VER.tar.gz) +define(`LIBVA2_VER',2.16.0) +define(`LIBVA2_SRC_REPO',https://github.com/intel/libva/archive/refs/tags/LIBVA2_VER.tar.gz) include(libva2.m4) include(end.m4)dnl diff --git a/template/components/libva2.sg2.m4 b/template/components/libva2.sg2.m4 new file mode 100644 index 000000000..9610af294 --- /dev/null +++ b/template/components/libva2.sg2.m4 @@ -0,0 +1,73 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +DECLARE(`LIBVA2_VER',2.15.0) +DECLARE(`LIBVA2_SRC_REPO',https://github.com/intel/libva/archive/LIBVA2_VER.tar.gz) +DECLARE(`LIBVA2_X11',true) +DECLARE(`LIBVA2_WAYLAND',true) + +ifelse(OS_NAME,ubuntu,` +define(`LIBVA2_BUILD_DEPS',`automake ca-certificates gcc libdrm-dev libtool make pkg-config wget ifelse(LIBVA2_X11,true,libx11-dev libxext-dev libxfixes-dev) ifelse(LIBVA2_WAYLAND,true,libwayland-dev)') + +define(`LIBVA2_INSTALL_DEPS',`libdrm2 ifelse(LIBVA2_X11,true,libx11-6 libxext6 libxfixes3) ifelse(LIBVA2_WAYLAND,true,libwayland-client0)') +') + + +define(`BUILD_LIBVA2',` +# build libva2 +ARG LIBVA2_REPO=LIBVA2_SRC_REPO +RUN cd BUILD_HOME && \ + wget -O - ${LIBVA2_REPO} | tar xz +RUN cd BUILD_HOME/libva-LIBVA2_VER && \ + ./autogen.sh --prefix=BUILD_PREFIX --libdir=BUILD_LIBDIR && \ + make -j$(nproc) && \ + make install DESTDIR=BUILD_DESTDIR && \ + make install +') + +define(`FFMPEG_PATCH_VAAPI',`dnl +ARG FFMPEG_PATCH_VAAPI_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/ffmpeg-patch-0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.tar.gz +RUN cd BUILD_HOME && \ + wget -O - ${FFMPEG_PATCH_VAAPI_REPO} | tar xz && \ + cd $1 && \ + patch -p1 < ../0041-lavc-vaapi_encode_h265-fix-max_transform_hierarchy_d.patch || true +') + +define(`ENV_VARS_LIBVA2',`dnl +ENV LIBVA_DRIVERS_PATH=BUILD_LIBDIR/dri +ENV LIBVA_DRIVER_NAME=iHD +ENV DISPLAY=:0.0 +') + +REG(LIBVA2) + +include(end.m4)dnl diff --git a/template/components/libvmaf.m4 b/template/components/libvmaf.m4 index 950c69fa5..27f5dce20 100644 --- a/template/components/libvmaf.m4 +++ b/template/components/libvmaf.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libvorbis.m4 b/template/components/libvorbis.m4 index d3bd0b8ac..f4c5922d6 100644 --- a/template/components/libvorbis.m4 +++ b/template/components/libvorbis.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libvpx.m4 b/template/components/libvpx.m4 index 18b7ec216..5fb48e274 100644 --- a/template/components/libvpx.m4 +++ b/template/components/libvpx.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libx264.m4 b/template/components/libx264.m4 index 040fa3ef7..86769da23 100644 --- a/template/components/libx264.m4 +++ b/template/components/libx264.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/libx265.m4 b/template/components/libx265.m4 index bda49ea81..6e540fa1b 100644 --- a/template/components/libx265.m4 +++ b/template/components/libx265.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/media-delivery.m4 b/template/components/media-delivery.m4 new file mode 100644 index 000000000..3dc3db52f --- /dev/null +++ b/template/components/media-delivery.m4 @@ -0,0 +1,45 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +DECLARE(`INTEL_MEDIADEL_REPO',https://github.com/intel/media-delivery) +DECLARE(`INTEL_MEDIADEL_VER',v3) + +define(`BUILD_MEDIADEL',` + +# Patch with oneVPL patches +RUN cd /opt/build && \ + if [ ! -d "media-delivery" ]; then git clone INTEL_MEDIADEL_REPO && cd media-delivery && git checkout INTEL_MEDIADEL_VER; fi +') + +REG(MEDIADEL) + +include(end.m4)dnl diff --git a/template/components/media-driver-pkg.sg2.m4 b/template/components/media-driver-pkg.sg2.m4 new file mode 100644 index 000000000..d9350baf0 --- /dev/null +++ b/template/components/media-driver-pkg.sg2.m4 @@ -0,0 +1,62 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +ifelse(OS_NAME,ubuntu,` +define(`MEDIA_DRIVER_PKG_BUILD_DEPS',`ca-certificates gpg-agent software-properties-common wget') +define(`MEDIA_DRIVER_PKG_INSTALL_DEPS',`ca-certificates gpg-agent software-properties-common wget') +') + +define(`INTEL_GFX_URL',https://repositories.intel.com/graphics) + +define(`BUILD_MEDIA_DRIVER_PKG',` +RUN wget -qO - INTEL_GFX_URL/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu ifelse(OS_VERSION,20.04,focal,jammy) ifelse(OS_VERSION,20.04,main,arc)" | tee /etc/apt/sources.list.d/intel.gpu.ifelse(OS_VERSION,20.04,focal,jammy).list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* +') + +define(`INSTALL_MEDIA_DRIVER_PKG',` +RUN wget -qO - INTEL_GFX_URL/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg +RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu ifelse(OS_VERSION,20.04,focal,jammy) ifelse(OS_VERSION,20.04,main,arc)" | tee /etc/apt/sources.list.d/intel.gpu.ifelse(OS_VERSION,20.04,focal,jammy).list + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + intel-opencl-icd libvpl2 intel-level-zero-gpu level-zero-dev intel-media-va-driver-non-free && \ + rm -rf /var/lib/apt/lists/* +') + +REG(MEDIA_DRIVER_PKG) + +include(end.m4)dnl diff --git a/template/components/media-driver.m4 b/template/components/media-driver.m4 index d9e8816fa..a235b105a 100644 --- a/template/components/media-driver.m4 +++ b/template/components/media-driver.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/media-driver.sg1.m4 b/template/components/media-driver.sg1.m4 index bb21a8320..43f748f2d 100644 --- a/template/components/media-driver.sg1.m4 +++ b/template/components/media-driver.sg1.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ include(begin.m4) include(libva2.sg1.m4) include(gmmlib.sg1.m4) -define(`MEDIA_DRIVER_VER',intel-media-sg1-pv1.3) -define(`MEDIA_DRIVER_SRC_REPO',https://github.com/VCDP/media-driver/archive/MEDIA_DRIVER_VER.tar.gz) +define(`MEDIA_DRIVER_VER',intel-media-22.5.4) +define(`MEDIA_DRIVER_SRC_REPO',https://github.com/intel/media-driver/archive/refs/tags/MEDIA_DRIVER_VER.tar.gz) define(`ENABLE_PRODUCTION_KMD',ON) include(media-driver.m4) diff --git a/template/components/media-driver.sg2.m4 b/template/components/media-driver.sg2.m4 new file mode 100644 index 000000000..adaa8ac1f --- /dev/null +++ b/template/components/media-driver.sg2.m4 @@ -0,0 +1,60 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +DECLARE(`MEDIA_DRIVER_VER',intel-media-22.5.2) +DECLARE(`MEDIA_DRIVER_SRC_REPO',https://github.com/intel/media-driver/archive/MEDIA_DRIVER_VER.tar.gz) +DECLARE(`ENABLE_PRODUCTION_KMD',ON) + +ifelse(OS_NAME,ubuntu,` +define(`MEDIA_DRIVER_BUILD_DEPS',`ca-certificates ifdef(`BUILD_CMAKE',,cmake) g++ libpciaccess-dev make pkg-config wget') +define(`MEDIA_DRIVER_INSTALL_DEPS',`libpciaccess0') +') + +ifelse(OS_NAME,centos,` +define(`MEDIA_DRIVER_BUILD_DEPS',`ifdef(`BUILD_CMAKE',,cmake) gcc-c++ libpciaccess-devel make pkg-config wget ifelse(OS_VERSION,7,devtoolset-9)') +') + +define(`BUILD_MEDIA_DRIVER',` +# build media driver +ARG MEDIA_DRIVER_REPO=MEDIA_DRIVER_SRC_REPO +RUN cd BUILD_HOME && \ + wget -O - ${MEDIA_DRIVER_REPO} | tar xz +RUN cd BUILD_HOME/media-driver-MEDIA_DRIVER_VER && mkdir build && cd build && \ + ifelse(OS_NAME:OS_VERSION,centos:7,`(. /opt/rh/devtoolset-9/enable && ')cmake -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=BUILD_LIBDIR -DENABLE_PRODUCTION_KMD=ENABLE_PRODUCTION_KMD .. && \ + make -j$(nproc)ifelse(OS_NAME:OS_VERSION,centos:7,` )') && \ + make install DESTDIR=BUILD_DESTDIR && \ + make install +') + +REG(MEDIA_DRIVER) + +include(end.m4)dnl diff --git a/template/components/meson.m4 b/template/components/meson.m4 index 17f1e8f50..6b6dd8741 100644 --- a/template/components/meson.m4 +++ b/template/components/meson.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/msdk.m4 b/template/components/msdk.m4 index 2803e46ad..a26de65e6 100644 --- a/template/components/msdk.m4 +++ b/template/components/msdk.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/msdk.sg1.m4 b/template/components/msdk.sg1.m4 index 50f034d06..5f1ba8a21 100644 --- a/template/components/msdk.sg1.m4 +++ b/template/components/msdk.sg1.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -32,8 +32,8 @@ include(begin.m4) include(libva2.sg1.m4) -define(`MSDK_VER',intel-media-sg1-pv1.3) -define(`MSDK_SRC_REPO',https://github.com/VCDP/MediaSDK/archive/MSDK_VER.tar.gz) +define(`MSDK_VER',intel-mediasdk-22.5.4) +define(`MSDK_SRC_REPO',https://github.com/Intel-Media-SDK/MediaSDK/archive/MSDK_VER.tar.gz) include(msdk.m4) include(end.m4)dnl diff --git a/template/components/nasm.m4 b/template/components/nasm.m4 index c408cac6f..171eed149 100644 --- a/template/components/nasm.m4 +++ b/template/components/nasm.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -43,7 +43,8 @@ define(`NASM_BUILD_DEPS',`ca-certificates wget tar gcc-c++ make bzip2') define(`BUILD_NASM',` # build nasm #ARG NASM_REPO=https://www.nasm.us/pub/nasm/releasebuilds/NASM_VER/nasm-NASM_VER.tar.bz2 -# TODO: to revert to official nasm repo +# TODO: Revert to NASM repo, this is temp fix is nasm repo certificate expired temporarily + ARG NASM_REPO=https://github.com/OpenVisualCloud/Dockerfiles-Resources/raw/master/nasm-NASM_VER.tar.bz2 RUN cd BUILD_HOME && \ wget -O - ${NASM_REPO} | tar xj && \ diff --git a/template/components/nginx-cert.m4 b/template/components/nginx-cert.m4 index 3adae5df8..ada13ab38 100644 --- a/template/components/nginx-cert.m4 +++ b/template/components/nginx-cert.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/nginx-flv.m4 b/template/components/nginx-flv.m4 index a07d647f3..96f42113d 100644 --- a/template/components/nginx-flv.m4 +++ b/template/components/nginx-flv.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/nginx-upload.m4 b/template/components/nginx-upload.m4 index c76f1c28a..be7cb43ee 100644 --- a/template/components/nginx-upload.m4 +++ b/template/components/nginx-upload.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/nginx.m4 b/template/components/nginx.m4 index 90ba703cd..5efd0f061 100644 --- a/template/components/nginx.m4 +++ b/template/components/nginx.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/node.m4 b/template/components/node.m4 index 58b4537ee..26ba68926 100644 --- a/template/components/node.m4 +++ b/template/components/node.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/onevpl-atsm.m4 b/template/components/onevpl-atsm.m4 new file mode 100644 index 000000000..91af91715 --- /dev/null +++ b/template/components/onevpl-atsm.m4 @@ -0,0 +1,64 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +DECLARE(`ONEVPL_GPU_VER',intel-onevpl-22.5.2) +DECLARE(`ONEVPL_GPU_SRC_REPO',https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/ONEVPL_GPU_VER.tar.gz) +DECLARE(`ONEVPL_GPU_BUILD_SAMPLES',no) + +ifelse(OS_NAME,ubuntu,` +define(`ONEVPL_GPU_BUILD_DEPS',`ca-certificates gcc g++ make ifdef(`BUILD_CMAKE',,cmake) pkg-config wget') +') + +ifelse(OS_NAME,centos,` +define(`ONEVPL_GPU_BUILD_DEPS',`ifdef(`BUILD_CMAKE',,cmake) gcc gcc-c++ make pkg-config wget ifdef(OS_VERSION,7,devtoolset-9)') +') + +define(`BUILD_ONEVPL_GPU',` +# build onevpl runtime for GPU +ARG ONEVPL_GPU_REPO=ONEVPL_GPU_SRC_REPO +RUN cd BUILD_HOME && \ + wget -O - ${ONEVPL_GPU_REPO} | tar xz +RUN cd BUILD_HOME/oneVPL-intel-gpu-ONEVPL_GPU_VER && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX \ + -DCMAKE_INSTALL_LIBDIR=BUILD_LIBDIR \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=BUILD_DESTDIR && \ + make install +') + +REG(ONEVPL_GPU) + +include(end.m4)dnl diff --git a/template/components/onevpl-dispatch.m4 b/template/components/onevpl-dispatch.m4 new file mode 100644 index 000000000..9fef2ef71 --- /dev/null +++ b/template/components/onevpl-dispatch.m4 @@ -0,0 +1,75 @@ +dnl BSD 3-Clause License +dnl +dnl Copyright (c) 2023, Intel Corporation +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions are met: +dnl +dnl * Redistributions of source code must retain the above copyright notice, this +dnl list of conditions and the following disclaimer. +dnl +dnl * Redistributions in binary form must reproduce the above copyright notice, +dnl this list of conditions and the following disclaimer in the documentation +dnl and/or other materials provided with the distribution. +dnl +dnl * Neither the name of the copyright holder nor the names of its +dnl contributors may be used to endorse or promote products derived from +dnl this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +include(begin.m4) + +include(media-delivery.m4) + +DECLARE(`ONEVPL_DISP_VER',v2022.2.0) +DECLARE(`ONEVPL_DISP_VER_TRUNC',2022.2.0) +DECLARE(`ONEVPL_DISP_SRC_REPO',https://github.com/oneapi-src/oneVPL/archive/refs/tags/ONEVPL_DISP_VER.tar.gz) +DECLARE(`ONEVPL_DISP_BUILD_SAMPLES',no) + +ifelse(OS_NAME,ubuntu,` +define(`ONEVPL_DISP_BUILD_DEPS',`ca-certificates gcc g++ make git ifdef(`BUILD_CMAKE',,cmake) patch') +') + +define(`BUILD_ONEVPL_DISP',` +# build onevpl dispatcher +ARG ONEVPL_DISP_REPO=ONEVPL_DISP_SRC_REPO +RUN cd BUILD_HOME && \ + wget -O - ${ONEVPL_DISP_REPO} | tar xz +RUN cd BUILD_HOME/oneVPL-ONEVPL_DISP_VER_TRUNC && \ + cp /opt/build/media-delivery/patches/libvpl2/* . && \ + { set -e; \ + for patch_file in $(find -iname "*.patch" | sort -n); do \ + echo "Applying: ${patch_file}"; \ + patch -p1 < ${patch_file}; \ + done; } && \ + mkdir -p build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX \ + -DCMAKE_INSTALL_LIBDIR=BUILD_LIBDIR \ + -DBUILD_SAMPLES=MSDK_BUILD_SAMPLES \ + -DBUILD_TUTORIALS=OFF \ + .. && \ + make -j$(nproc) && \ + make install DESTDIR=BUILD_DESTDIR && \ + make install +') + +define(`INSTALL_ONEVPL_DISP',` +# Define ONEVPL lib dir +ENV ONEVPL_SEARCH_PATH=BUILD_LIBDIR +') + + +REG(ONEVPL_DISP) + +include(end.m4)dnl diff --git a/template/components/opencl.m4 b/template/components/opencl.m4 index eeeab16e7..e0ad4f1d1 100644 --- a/template/components/opencl.m4 +++ b/template/components/opencl.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/opencv.m4 b/template/components/opencv.m4 index b934e1292..9bd82d3fe 100644 --- a/template/components/opencv.m4 +++ b/template/components/opencv.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -30,9 +30,8 @@ dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl include(begin.m4) -DECLARE(`OPENCV_VER',4.6.0) -DECLARE(`OPENCV_VER_TRUNC',4.6.0) -DECLARE(`OPENCV_455_FFMPEG5_SUPPORT',5440fd6cb43ea65a056c46b691fcdab1a425e92d) +DECLARE(`OPENCV_VER',4.5.3-openvino-2021.4.2) +DECLARE(`OPENCV_VER_TRUNC',4.5.3) ifelse(OS_NAME,ubuntu,` define(`OPENCV_BUILD_DEPS',`ca-certificates ifdef(`BUILD_CMAKE',,cmake) gcc g++ make wget python3-numpy ccache libeigen3-dev') @@ -44,14 +43,11 @@ define(`OPENCV_BUILD_DEPS',`ifdef(`BUILD_CMAKE',,cmake3) gcc gcc-c++ make wget p define(`BUILD_OPENCV',` # build opencv -ARG OPENCV_REPO=https://github.com/opencv/opencv +ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/OPENCV_VER.tar.gz RUN cd BUILD_HOME && \ - git clone ${OPENCV_REPO} && \ - cd opencv && \ - git checkout OPENCV_VER -# git cherry-pick OPENCV_455_FFMPEG5_SUPPORT + wget -O - ${OPENCV_REPO} | tar xz # TODO: file a bug against opencv since they do not accept full libdir -RUN cd BUILD_HOME/opencv && mkdir build && cd build && \ +RUN cd BUILD_HOME/opencv-OPENCV_VER && mkdir build && cd build && \ ifelse(OS_NAME:OS_VERSION,centos:7,`(. /opt/rh/devtoolset-9/enable && ')ifdef(`BUILD_CMAKE',cmake,ifelse(OS_NAME,centos,cmake3,cmake)) \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=BUILD_PREFIX \ @@ -61,6 +57,9 @@ RUN cd BUILD_HOME/opencv && mkdir build && cd build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ make -j $(nproc) && \ make install DESTDIR=BUILD_DESTDIR && \ @@ -68,7 +67,7 @@ RUN cd BUILD_HOME/opencv && mkdir build && cd build && \ ') define(`REBUILD_OPENCV_VIDEOIO',` -RUN cd BUILD_HOME/opencv/build && \ +RUN cd BUILD_HOME/opencv-OPENCV_VER/build && \ rm -rf ./* && \ ifelse(OS_NAME:OS_VERSION,centos:7,`(. /opt/rh/devtoolset-9/enable && ')ifdef(`BUILD_CMAKE',cmake,ifelse(OS_NAME,centos,cmake3,cmake)) \ -DCMAKE_BUILD_TYPE=Release \ @@ -79,6 +78,9 @@ RUN cd BUILD_HOME/opencv/build && \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PERF_TESTS=OFF \ -DBUILD_TESTS=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENJPEG=OFF \ + -DWITH_JASPER=OFF \ .. && \ cd modules/videoio && \ make -j $(nproc) && \ diff --git a/template/components/openh264.m4 b/template/components/openh264.m4 index bc981c957..b56143ac5 100644 --- a/template/components/openh264.m4 +++ b/template/components/openh264.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/openssl.m4 b/template/components/openssl.m4 index ad8e8b723..0a2270b21 100644 --- a/template/components/openssl.m4 +++ b/template/components/openssl.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021-2021, Intel Corporation +dnl Copyright (c) 2023-2021, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -30,7 +30,7 @@ dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dnl include(begin.m4) -DECLARE(`OPENSSL_VER',1_1_1q) +DECLARE(`OPENSSL_VER',1_1_1s) ifelse(OS_NAME,ubuntu,` define(`OPENSSL_BUILD_DEPS',`ca-certificates wget tar g++ make libtool autoconf') diff --git a/template/components/owt-gst-bad.m4 b/template/components/owt-gst-bad.m4 index 6b1914ad6..219e05cfc 100644 --- a/template/components/owt-gst-bad.m4 +++ b/template/components/owt-gst-bad.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/owt-gst-base.m4 b/template/components/owt-gst-base.m4 index 6b3a5bfbf..b5638567b 100644 --- a/template/components/owt-gst-base.m4 +++ b/template/components/owt-gst-base.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/owt-gst-good.m4 b/template/components/owt-gst-good.m4 index e851df1fa..e169f6e4e 100644 --- a/template/components/owt-gst-good.m4 +++ b/template/components/owt-gst-good.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/owt-gst-gva.m4 b/template/components/owt-gst-gva.m4 index 2bf71451e..0b931b00a 100644 --- a/template/components/owt-gst-gva.m4 +++ b/template/components/owt-gst-gva.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ define(`GVA_WITH_EGL',no) define(`GVA_ENABLE_PAHO_INST',OFF) define(`GVA_ENABLE_RDKAFKA_INST',OFF) -define(`GVA_ENABLE_AUDIO_INFERENCE_ELEMENTS',OFF) +define(`GVA_ENABLE_AUDIO_INFERENCE_ELEMENTS',ON) include(gst-gva.m4) include(end.m4)dnl diff --git a/template/components/owt-gst-ugly.m4 b/template/components/owt-gst-ugly.m4 index e105c7329..ff40ca488 100644 --- a/template/components/owt-gst-ugly.m4 +++ b/template/components/owt-gst-ugly.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/owt.m4 b/template/components/owt.m4 index 2c9d9b1e0..6217864a5 100644 --- a/template/components/owt.m4 +++ b/template/components/owt.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -42,7 +42,6 @@ DECLARE(`OWT_QUIC_VER',v0.1) DECLARE(`LIBNICE_PATCH_VER',5.0) # required components for OWT -include(openssl.m4) define(`OPENH264_VER',v1.7.4) include(openh264.m4) define(`LIBRE_VER',v0.5.0) diff --git a/template/components/owt360.m4 b/template/components/owt360.m4 index 5cfaf8ffe..508e06308 100644 --- a/template/components/owt360.m4 +++ b/template/components/owt360.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/qat-core.m4 b/template/components/qat-core.m4 index 5f7d5d935..97fcbbb38 100644 --- a/template/components/qat-core.m4 +++ b/template/components/qat-core.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/qat-cryptomb.m4 b/template/components/qat-cryptomb.m4 index 1f7dec5bf..7bea6b97b 100644 --- a/template/components/qat-cryptomb.m4 +++ b/template/components/qat-cryptomb.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/qat-engine.m4 b/template/components/qat-engine.m4 index db0e0aa1a..b5c6b41f9 100644 --- a/template/components/qat-engine.m4 +++ b/template/components/qat-engine.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/qat-nginx.m4 b/template/components/qat-nginx.m4 index 819c3b2d4..36f23bece 100644 --- a/template/components/qat-nginx.m4 +++ b/template/components/qat-nginx.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/qat-zip.m4 b/template/components/qat-zip.m4 index 9dd97f142..12182f909 100644 --- a/template/components/qat-zip.m4 +++ b/template/components/qat-zip.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/scvp.m4 b/template/components/scvp.m4 index e0d8b5f87..3c0da68b6 100644 --- a/template/components/scvp.m4 +++ b/template/components/scvp.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/srs.m4 b/template/components/srs.m4 index d640ee4e4..326b4c539 100644 --- a/template/components/srs.m4 +++ b/template/components/srs.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/svt-av1.m4 b/template/components/svt-av1.m4 index 8673629c3..174f2964a 100644 --- a/template/components/svt-av1.m4 +++ b/template/components/svt-av1.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ include(begin.m4) include(yasm.m4) -DECLARE(`SVT_AV1_VER',v1.2.0) +DECLARE(`SVT_AV1_VER',v1.3.0) include(yasm.m4) diff --git a/template/components/svt-hevc.m4 b/template/components/svt-hevc.m4 index 94e539b1c..569bb5f3e 100644 --- a/template/components/svt-hevc.m4 +++ b/template/components/svt-hevc.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/svt-vp9.m4 b/template/components/svt-vp9.m4 index 73d68f56c..6da2c2c31 100644 --- a/template/components/svt-vp9.m4 +++ b/template/components/svt-vp9.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/usrsctp.m4 b/template/components/usrsctp.m4 index 14c88ce7a..d90e22189 100644 --- a/template/components/usrsctp.m4 +++ b/template/components/usrsctp.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/components/yasm.m4 b/template/components/yasm.m4 index f32df1da3..23b45bca5 100644 --- a/template/components/yasm.m4 +++ b/template/components/yasm.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/system/begin.m4 b/template/system/begin.m4 index 4319171e4..c02087291 100644 --- a/template/system/begin.m4 +++ b/template/system/begin.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ DECLARE(`CLEANUP_MAN',yes)dnl DECLARE(`PREAMBLE',dnl ``# BSD 3-Clause License'' ``#'' -``# Copyright (c) 2021, Intel Corporation'' +``# Copyright (c) 2023, Intel Corporation'' ``# All rights reserved.'' ``#'' ``# Redistribution and use in source and binary forms, with or without'' diff --git a/template/system/centos-repo.m4 b/template/system/centos-repo.m4 index d5eaf8153..ea4ca0171 100644 --- a/template/system/centos-repo.m4 +++ b/template/system/centos-repo.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/system/end.m4 b/template/system/end.m4 index f2677fbc7..76ec39bfb 100644 --- a/template/system/end.m4 +++ b/template/system/end.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2020, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without diff --git a/template/system/ubuntu.m4 b/template/system/ubuntu.m4 index ed34211b3..4bb22f759 100644 --- a/template/system/ubuntu.m4 +++ b/template/system/ubuntu.m4 @@ -1,6 +1,6 @@ dnl BSD 3-Clause License dnl -dnl Copyright (c) 2021, Intel Corporation +dnl Copyright (c) 2023, Intel Corporation dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -29,8 +29,8 @@ dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE US dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. define(`UBUNTU_CODENAME',`ifelse( -$1,18.04,bionic, $1,20.04,focal, +$1,22.04,jammy, `ERROR(`ubuntu codename not known for the $1 version')')')dnl define(`UPGRADE_UBUNTU_COMPONENTS',`dnl diff --git a/test/dldt_gst_gvapython_vcaca.sh b/test/dldt_gst_gvapython_vcaca.sh deleted file mode 100755 index 5062b12cc..000000000 --- a/test/dldt_gst_gvapython_vcaca.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -e -rm -rf /home/signal -mkdir -p /home/signal -cat > /home/testgva.py << EOF -from gstgva import VideoFrame, util -from pathlib import Path -class testgva: - def __init__(self): - Path('/home/signal/__init__').touch() - - def process_frame(self, frame): - Path('/home/signal/process_frame').touch() - return True -EOF - -dd if=/dev/urandom bs=115200 count=30 of=/home/test.yuv # 1 seconds video -PATH="/home:$PATH" gst-launch-1.0 -v filesrc location=/home/test.yuv ! videoparse format=i420 width=320 height=240 framerate=30 ! videoconvert ! video/x-raw,format=BGRx ! gvapython module="testgva" class="testgva" ! fakesink -test -f /home/signal/__init__ -test -f /home/signal/process_frame - diff --git a/test/dldt_gst_video_analytics_vcaca.sh b/test/dldt_gst_video_analytics_vcaca.sh deleted file mode 100755 index f0e529bf7..000000000 --- a/test/dldt_gst_video_analytics_vcaca.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -e - -if grep --quiet 'NAME="CentOS Linux"' /etc/os-release; then - yum install -y centos-release-scl wget - yum install -y rh-python36 - source /opt/rh/rh-python36/enable -else - apt-get update - apt-get install -y wget make python3 python3-pip -fi - -pip3 install pyyaml requests - -wget https://storage.openvinotoolkit.org/repositories/open_model_zoo/2021.4/models_bin/1/vehicle-license-plate-detection-barrier-0106/FP32/vehicle-license-plate-detection-barrier-0106.bin -wget https://storage.openvinotoolkit.org/repositories/open_model_zoo/2021.4/models_bin/1/vehicle-license-plate-detection-barrier-0106/FP32/vehicle-license-plate-detection-barrier-0106.xml - -wget https://storage.openvinotoolkit.org/repositories/open_model_zoo/2021.4/models_bin/1/vehicle-attributes-recognition-barrier-0039/FP32/vehicle-attributes-recognition-barrier-0039.bin -wget https://storage.openvinotoolkit.org/repositories/open_model_zoo/2021.4/models_bin/1/vehicle-attributes-recognition-barrier-0039/FP32/vehicle-attributes-recognition-barrier-0039.xml - -wget https://storage.openvinotoolkit.org/repositories/open_model_zoo/2021.4/models_bin/1/license-plate-recognition-barrier-0001/FP32/license-plate-recognition-barrier-0001.bin -wget https://storage.openvinotoolkit.org/repositories/open_model_zoo/2021.4/models_bin/1/license-plate-recognition-barrier-0001/FP32/license-plate-recognition-barrier-0001.xml - -wget -O - https://github.com/dlstreamer/dlstreamer/archive/refs/tags/v1.5.3.tar.gz | tar xz - -dd if=/dev/urandom bs=115200 count=300 of=test.yuv # 10 seconds video -gst-launch-1.0 -v filesrc location=test.yuv ! videoparse format=i420 width=320 height=240 framerate=30 ! x264enc ! mpegtsmux ! filesink location=test.ts -gst-launch-1.0 -v filesrc location=test.ts ! decodebin ! video/x-raw ! videoconvert ! \ - gvadetect model=vehicle-license-plate-detection-barrier-0106.xml model-proc=dlstreamer-1.5.3/samples/model_proc/intel/object_detection/vehicle-license-plate-detection-barrier-0106.json device=HDDL ! queue ! \ - gvaclassify model=vehicle-attributes-recognition-barrier-0039.xml object-class=vehicle model-proc=dlstreamer-1.5.3/samples/model_proc/intel/object_attribute_estimation/vehicle-attributes-recognition-barrier-0039.json device=HDDL ! queue ! \ - gvaclassify model=license-plate-recognition-barrier-0001.xml object-class=license-plate model-proc=dlstreamer-1.5.3/samples/model_proc/intel/optical_character_recognition/license-plate-recognition-barrier-0001.json device=HDDL ! queue ! \ - gvawatermark ! videoconvert ! fakesink; diff --git a/test/ffmpeg_h264_qsv_1280x720.sh b/test/ffmpeg_h264_qsv_1280x720.sh new file mode 100755 index 000000000..55f6ebe9e --- /dev/null +++ b/test/ffmpeg_h264_qsv_1280x720.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=1382400 count=300 of=test-1280x720.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 1280x720 -i test-1280x720.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M test-1280x720.mp4 + ffprobe -v error -show_streams test-1280x720.mp4 + ffmpeg -hwaccel qsv -c:v h264_qsv -i test-1280x720.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_h264_qsv_1920x1080.sh b/test/ffmpeg_h264_qsv_1920x1080.sh new file mode 100755 index 000000000..d56b82961 --- /dev/null +++ b/test/ffmpeg_h264_qsv_1920x1080.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=3110400 count=300 of=test-1920x1080.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -i test-1920x1080.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M test-1920x1080.mp4 + ffprobe -v error -show_streams test-1920x1080.mp4 + ffmpeg -hwaccel qsv -c:v h264_qsv -i test-1920x1080.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_h264_qsv_320x240.sh b/test/ffmpeg_h264_qsv_320x240.sh new file mode 100755 index 000000000..f57983a58 --- /dev/null +++ b/test/ffmpeg_h264_qsv_320x240.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=115200 count=300 of=test-320x240.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 320x240 -i test-320x240.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M test-320x240.mp4 + ffprobe -v error -show_streams test-320x240.mp4 + ffmpeg -hwaccel qsv -c:v h264_qsv -i test-320x240.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_h264_qsv_720x480.sh b/test/ffmpeg_h264_qsv_720x480.sh new file mode 100755 index 000000000..ad15f9299 --- /dev/null +++ b/test/ffmpeg_h264_qsv_720x480.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=518400 count=300 of=test-720x480.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 720x480 -i test-720x480.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M test-720x480.mp4 + ffprobe -v error -show_streams test-720x480.mp4 + ffmpeg -hwaccel qsv -c:v h264_qsv -i test-720x480.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_hevc_qsv_1280x720.sh b/test/ffmpeg_hevc_qsv_1280x720.sh new file mode 100755 index 000000000..bb30c2510 --- /dev/null +++ b/test/ffmpeg_hevc_qsv_1280x720.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=1382400 count=300 of=test-1280x720.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 1280x720 -i test-1280x720.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v hevc_qsv -b:v 5M test-1280x720.mp4 + ffprobe -v error -show_streams test-1280x720.mp4 + ffmpeg -hwaccel qsv -c:v hevc_qsv -i test-1280x720.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_hevc_qsv_1920x1080.sh b/test/ffmpeg_hevc_qsv_1920x1080.sh new file mode 100755 index 000000000..002af51b5 --- /dev/null +++ b/test/ffmpeg_hevc_qsv_1920x1080.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=3110400 count=300 of=test-1920x1080.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -i test-1920x1080.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v hevc_qsv -b:v 5M test-1920x1080.mp4 + ffprobe -v error -show_streams test-1920x1080.mp4 + ffmpeg -hwaccel qsv -c:v hevc_qsv -i test-1920x1080.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_hevc_qsv_320x240.sh b/test/ffmpeg_hevc_qsv_320x240.sh new file mode 100755 index 000000000..929be3e08 --- /dev/null +++ b/test/ffmpeg_hevc_qsv_320x240.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=115200 count=300 of=test-320x240.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 320x240 -i test-320x240.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v hevc_qsv -b:v 5M test-320x240.mp4 + ffprobe -v error -show_streams test-320x240.mp4 + ffmpeg -hwaccel qsv -c:v hevc_qsv -i test-320x240.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_hevc_qsv_720x480.sh b/test/ffmpeg_hevc_qsv_720x480.sh new file mode 100755 index 000000000..f2eb8799e --- /dev/null +++ b/test/ffmpeg_hevc_qsv_720x480.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ve +case "$1" in + xeon_*) + echo "Skipped for a CPU only platform" + ;; + *) + dd if=/dev/urandom bs=518400 count=300 of=test-720x480.yuv # 10 seconds video + ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 720x480 -i test-720x480.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v hevc_qsv -b:v 5M test-720x480.mp4 + ffprobe -v error -show_streams test-720x480.mp4 + ffmpeg -hwaccel qsv -c:v hevc_qsv -i test-720x480.mp4 -f null /dev/null +esac diff --git a/test/ffmpeg_svt_dash.sh b/test/ffmpeg_svt_dash.sh index f30b8e882..ac580b845 100755 --- a/test/ffmpeg_svt_dash.sh +++ b/test/ffmpeg_svt_dash.sh @@ -1,11 +1,4 @@ #!/bin/bash -ve -case "$1" in - *ubuntu*) - apt-get update && apt-get install -y -q --no-install-recommends curl;; - *centos*) - yum install -y -q curl;; -esac - dd if=/dev/urandom bs=115200 count=300 of=test.yuv # 10 seconds video ffmpeg -re -f rawvideo -vcodec rawvideo -s 320x240 -r 30 -pix_fmt yuv420p -i test.yuv -c:v libsvt_hevc -f dash ./test_dash.mpd diff --git a/test/ffmpeg_svt_hls.sh b/test/ffmpeg_svt_hls.sh index 6f8cd6f51..3714ec237 100755 --- a/test/ffmpeg_svt_hls.sh +++ b/test/ffmpeg_svt_hls.sh @@ -1,11 +1,4 @@ #!/bin/bash -ve -case "$1" in - *ubuntu*) - apt-get update && apt-get install -y -q --no-install-recommends curl;; - *centos*) - yum install -y -q curl;; -esac - dd if=/dev/urandom bs=115200 count=300 of=test.yuv # 10 seconds video ffmpeg -re -f rawvideo -vcodec rawvideo -s 320x240 -r 30 -pix_fmt yuv420p -i test.yuv -c:v libsvt_hevc -f hls ./test_hls.m3u8 diff --git a/test/svt_aom.sh b/test/svt_aom.sh index c77077908..5cdf0e9ef 100755 --- a/test/svt_aom.sh +++ b/test/svt_aom.sh @@ -1,5 +1,5 @@ #!/bin/bash -e dd if=/dev/urandom bs=115200 count=300 of=test.yuv # 10 seconds video -SvtAv1EncApp -i test.yuv -w 320 -h 240 -b out.ivf . +SvtAv1EncApp -i test.yuv -w 320 -h 240 -b out.ivf aomdec --progress -o out.yuv out.ivf diff --git a/test/svt_av1.sh b/test/svt_av1.sh index ff410d186..95daa987b 100755 --- a/test/svt_av1.sh +++ b/test/svt_av1.sh @@ -1,4 +1,4 @@ #!/bin/bash -e dd if=/dev/urandom bs=115200 count=300 of=test.yuv # 10 seconds video -SvtAv1EncApp -i test.yuv -w 320 -h 240 -b out.ivf . +SvtAv1EncApp -i test.yuv -w 320 -h 240 -b out.ivf diff --git a/test/svt_dav1d.sh b/test/svt_dav1d.sh index db781485b..a0e7389ce 100755 --- a/test/svt_dav1d.sh +++ b/test/svt_dav1d.sh @@ -1,5 +1,5 @@ #!/bin/bash -e dd if=/dev/urandom bs=115200 count=300 of=test.yuv # 10 seconds video -SvtAv1EncApp -i test.yuv -w 320 -h 240 -b out.ivf . +SvtAv1EncApp -i test.yuv -w 320 -h 240 -b out.ivf dav1d --demuxer ivf -i out.ivf -o out.yuv