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

Commit

Permalink
Merge pull request #819 from OpenVisualCloud/23.06
Browse files Browse the repository at this point in the history
23.06 release
  • Loading branch information
lylintel authored Jun 16, 2023
2 parents eef8e7f + 033fa31 commit 1d3f118
Show file tree
Hide file tree
Showing 285 changed files with 3,622 additions and 4,385 deletions.
2 changes: 2 additions & 0 deletions Flex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(platform "flex")
include(platform)
19 changes: 19 additions & 0 deletions Flex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


This folder contains dockerfiles to build Server GPU Flex 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)<br>[ubuntu-22.04/media/dev](ubuntu-22.04/media/dev)|[openvisualcloud/flex-ubuntu2004-media-dev](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2004-media-dev)<br>[openvisualcloud/flex-ubuntu2204-media-dev](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2204-media-dev)|
|media-ffmpeg|[ubuntu-20.04/media/ffmpeg](ubuntu-20.04/media/ffmpeg)<br>[ubuntu-22.04/media/ffmpeg](ubuntu-22.04/media/ffmpeg)|[openvisualcloud/flex-ubuntu2004-media-ffmpeg](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2004-media-ffmpeg)<br>[openvisualcloud/flex-ubuntu2204-media-ffmpeg](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2204-media-ffmpeg)|
|analytics-dev|[ubuntu-20.04/analytics/dev](ubuntu-20.04/analytics/dev)<br>[ubuntu-22.04/analytics/dev](ubuntu-22.04/analytics/dev)|[openvisualcloud/flex-ubuntu2004-analytics-dev](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2004-analytics-dev)<br>[openvisualcloud/flex-ubuntu2204-analytics-dev](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2204-analytics-dev)|
|analytics-gst|[ubuntu-20.04/analytics/gst](ubuntu-20.04/analytics/gst)<br>[ubuntu-22.04/analytics/gst](ubuntu-22.04/analytics/gst)|[openvisualcloud/flex-ubuntu2004-analytics-gst](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2004-analytics/gst)<br>[openvisualcloud/flex-ubuntu2204-analytics-gst](https://hub.docker.com/r/openvisualcloud/flex-ubuntu2204-analytics-gst)|
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(image "sg2_analytics_dev_ubuntu2004")
set(image "flex_analytics_dev_ubuntu2004")
include(image)
include(gst-tests)
include(dldt-gst-tests)
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ RUN apt-get update && \
# 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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -63,11 +64,12 @@ RUN apt-get update && \
# 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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -78,12 +80,13 @@ RUN apt-get update && \

# build libfdkaac
ARG LIBFDKAAC_REPO=https://github.com/mstorsjo/fdk-aac/archive/v2.0.2.tar.gz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -94,11 +97,12 @@ RUN apt-get update && \

# build libopus
ARG LIBOPUS_REPO=https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -112,12 +116,13 @@ RUN apt-get update && \
# 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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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 -j"$(nproc)" && \
make install

RUN apt-get update && \
Expand All @@ -131,7 +136,7 @@ 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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -146,7 +151,7 @@ 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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -157,9 +162,9 @@ RUN apt-get update && \

# build meson
ARG MESON_REPO=https://github.com/mesonbuild/meson
RUN git clone ${MESON_REPO}; \
cd meson; \
git checkout 0.63.0; \
RUN git clone ${MESON_REPO} && \
cd meson && \
git checkout 0.63.0 && \
python3 setup.py install;

RUN apt-get update && \
Expand All @@ -169,6 +174,7 @@ RUN apt-get update && \

# build dav1d
ARG DAV1D_REPO=https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${DAV1D_REPO} | tar xz
RUN cd /opt/build/dav1d-0.9.2 && \
Expand All @@ -186,14 +192,15 @@ RUN apt-get update && \
# 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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

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 -j "$(nproc)" && \
make install

RUN apt-get update && \
Expand All @@ -207,7 +214,7 @@ 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 -j "$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -218,12 +225,13 @@ RUN apt-get update && \

# build svt av1
ARG SVT_AV1_REPO=https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.gz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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) && \
make -j "$(nproc)" && \
sed -i "s/SvtAv1dec/SvtAv1Dec/" SvtAv1Dec.pc && \
make install DESTDIR=/opt/dist && \
make install
Expand All @@ -239,7 +247,7 @@ 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 -j "$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -248,6 +256,7 @@ RUN apt-get update && \
ca-certificates gpg-agent software-properties-common wget && \
rm -rf /var/lib/apt/lists/*

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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

Expand All @@ -263,6 +272,7 @@ RUN apt-get update && \

# build opencv
ARG OPENCV_REPO=https://github.com/opencv/opencv/archive/4.5.3-openvino-2021.4.2.tar.gz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${OPENCV_REPO} | tar xz
# TODO: file a bug against opencv since they do not accept full libdir
Expand All @@ -280,7 +290,7 @@ RUN cd /opt/build/opencv-4.5.3-openvino-2021.4.2 && mkdir build && cd build && \
-DWITH_OPENJPEG=OFF \
-DWITH_JASPER=OFF \
.. && \
make -j $(nproc) && \
make -j "$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand Down Expand Up @@ -319,7 +329,7 @@ RUN cd /opt/build/openvino && \
-DBUILD_TESTS=OFF \
-DTREAT_WARNING_AS_ERROR=OFF \
.. && \
make -j $(nproc) && \
make -j "$(nproc)" && \
make install && \
make install DESTDIR=/opt/dist

Expand All @@ -335,23 +345,25 @@ 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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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 -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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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 -j"$(nproc)" && \
make install DESTDIR=/opt/dist && \
make install

Expand All @@ -362,6 +374,7 @@ RUN apt-get update && \

# build gst-core
ARG GSTCORE_REPO=https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.3.tar.xz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTCORE_REPO} | tar xJ
RUN cd /opt/build/gstreamer-1.20.3 && \
Expand All @@ -382,6 +395,7 @@ RUN apt-get update && \

# build gst-plugin-base
ARG GSTBASE_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.20.3.tar.xz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTBASE_REPO} | tar xJ
RUN cd /opt/build/gst-plugins-base-1.20.3 && \
Expand Down Expand Up @@ -410,6 +424,7 @@ RUN apt-get update && \

# build gst-plugin-good
ARG GSTGOOD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.20.3.tar.xz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTGOOD_REPO} | tar xJ
RUN cd /opt/build/gst-plugins-good-1.20.3 && \
Expand All @@ -435,6 +450,7 @@ RUN apt-get update && \

# build gst-plugin-bad
ARG GSTBAD_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.20.3.tar.xz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTBAD_REPO} | tar xJ && \
cd gst-plugins-bad-1.20.3 && \
Expand Down Expand Up @@ -463,6 +479,7 @@ RUN apt-get update && \

# build gst-plugin-ugly
ARG GSTUGLY_REPO=https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.20.3.tar.xz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTUGLY_REPO} | tar xJ
RUN cd /opt/build/gst-plugins-ugly-1.20.3 && \
Expand All @@ -486,6 +503,7 @@ ARG GST_PLUGIN_VAAPI_REPO_VIDEO_ANALYTICS=https://github.com/dlstreamer/dlstream

# build gst-plugin-vaapi
ARG GSTVAAPI_REPO=https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.20.3.tar.xz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTVAAPI_REPO} | tar xJ

Expand Down Expand Up @@ -537,6 +555,7 @@ RUN apt-get update && \
# build libpahomqtt
ARG PAHO_VER=1.3.10
ARG LIBPAHO_REPO=https://github.com/eclipse/paho.mqtt.c/archive/v${PAHO_VER}.tar.gz
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${LIBPAHO_REPO} | tar -xz
RUN cd /opt/build/paho.mqtt.c-1.3.10 && \
Expand Down Expand Up @@ -599,7 +618,7 @@ RUN git clone -b master $GVA_REPO /opt/build/gst-video-analytics && \
-DENABLE_AUDIO_INFERENCE_ELEMENTS=ON \
-DTREAT_WARNING_AS_ERROR=OFF \
.. \
&& make -j $(nproc) \
&& make -j "$(nproc)" \
&& make install \
&& make install DESTDIR=/opt/dist

Expand All @@ -621,6 +640,7 @@ RUN apt-get update && \
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
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN cd /opt/build && \
wget -O - ${GSTPYTHON_REPO} | tar xJ
RUN cd /opt/build/gst-python-1.20.3 && \
Expand Down Expand Up @@ -663,14 +683,15 @@ RUN cd /opt/build/FFmpeg && \
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) && \
--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
HEALTHCHECK CMD echo "This is a healthcheck test." || exit 1

FROM ubuntu:20.04
LABEL Description="This is the development image for ubuntu 20.04 on Flex Series GPU"
Expand All @@ -697,6 +718,7 @@ 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

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
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

Expand All @@ -714,3 +736,4 @@ 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/

HEALTHCHECK CMD echo "This is a healthcheck test." || exit 1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(dav1d.m4)
include(svt-hevc.m4)
include(svt-av1.m4)
include(svt-vp9.m4)
include(media-driver-pkg.sg2.m4)
include(media-driver-pkg.flex.m4)
include(dldt-ie.m4)
include(libjsonc.m4)
include(librdkafka.m4)
Expand Down Expand Up @@ -44,3 +44,4 @@ WORKDIR /home
# Install
UPGRADE_UBUNTU_COMPONENTS()
INSTALL_ALL(runtime,build)dnl
HEALTHCHECK CMD echo "This is a healthcheck test." || exit 1
Loading

0 comments on commit 1d3f118

Please sign in to comment.