Giter VIP home page Giter VIP logo

openvisualcloud / dockerfiles Goto Github PK

View Code? Open in Web Editor NEW
121.0 12.0 80.0 6.37 MB

Optimized media, analytics and graphics software stack images. Use the dockerfile(s) in your project or as a recipe book for bare metal installation.

License: BSD 3-Clause "New" or "Revised" License

CMake 1.10% Dockerfile 65.97% M4 27.37% Shell 3.71% Python 1.85%
ffmpeg gstreamer rtmp vaapi container nginx analytics openvino encoding media

dockerfiles's People

Contributors

1480c1 avatar alekdu avatar daijh avatar djie1 avatar dlin2 avatar dpatel257 avatar dsmertin avatar fkhoshne avatar g-schnaubelt-intel avatar gokul989 avatar jhou5 avatar jsunintel avatar kefeiyao avatar linxie47 avatar liz-lawrens avatar lylintel avatar qwu16 avatar sdxkeeper avatar tangzhizhen avatar tianjunwork avatar tszumski avatar ttao1 avatar umed avatar xwu2git avatar yan-kai1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockerfiles's Issues

test_xeon_nginx_rtmp_ubuntu1804_nginx_dash failed in several images

https://api.travis-ci.com/v3/job/201936760/log.txt

1: Metadata:
1: encoder : Lavc58.35.100 libx264
1: Side data:
1: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
1: frame= 16 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 31 fps= 31 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 46 fps= 30 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
av_interleaved_write_frame(): Broken pipe
1: [flv @ 0x55f29e254a40] Failed to update header with correct duration.
1: [flv @ 0x55f29e254a40] Failed to update header with correct filesize.
1: Error writing trailer of rtmp://localhost/dash/test: Broken pipe
1: frame= 49 fps= 18 q=29.0 Lsize= 49kB time=-00:00:00.03 bitrate=N/A speed=N/A
1: video:94kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
1: [libx264 @ 0x55f29e255f00] frame I:1 Avg QP:36.00 size: 48644
1: [libx264 @ 0x55f29e255f00] frame P:48 Avg QP:36.00 size: 47025
1: [libx264 @ 0x55f29e255f00] mb I I16..4: 0.0% 0.0% 100.0%
1: [libx264 @ 0x55f29e255f00] mb P I16..4: 100.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 0.0%
1: [libx264 @ 0x55f29e255f00] 8x8 transform intra:0.0%
1: [libx264 @ 0x55f29e255f00] coded y,uvDC,uvAC intra: 100.0% 100.0% 100.0%
1: [libx264 @ 0x55f29e255f00] i16 v,h,dc,p: 0% 0% 95% 5%
1: [libx264 @ 0x55f29e255f00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 3% 3% 34% 12% 10% 11% 10% 9% 9%
1: [libx264 @ 0x55f29e255f00] i8c dc,h,v,p: 93% 0% 0% 7%
1: [libx264 @ 0x55f29e255f00] Weighted P-Frames: Y:0.0% UV:0.0%
1: [libx264 @ 0x55f29e255f00] kb/s:11293.92
1: Conversion failed!

mp3lame repo is not stable to download recently, issue found from Mar 4th, 2019

Logs shown as below:

Step 21/63 : RUN wget -O - ${MP3LAME_REPO} | tar xz; cd lame-${MP3LAME_VER}; ./configure --prefix="/usr" --libdir=/usr/lib64 --enable-shared --enable-nasm; make -j8; make install DESTDIR=/home/build; make install
---> Running in 4e904c50ec63
--2019-03-06 02:49:20-- https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz
Resolving sourceforge.net (sourceforge.net)... 216.105.38.13
Connecting to sourceforge.net (sourceforge.net)|216.105.38.13|:443... connected.
Unable to establish SSL connection.
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
/bin/sh: line 0: cd: lame-3.100: No such file or directory
/bin/sh: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target install'. Stop. make: *** No rule to make target install'. Stop.
The command '/bin/sh -c wget -O - ${MP3LAME_REPO} | tar xz; cd lame-${MP3LAME_VER}; ./configure --prefix="/usr" --libdir=/usr/lib64 --enable-shared --enable-nasm; make -j8; make install DESTDIR=/home/build; make install' returned a non-zero code: 2
Xeon/centos-7.4/dldt+ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_cent74.dir/build.make:57: recipe for target 'Xeon/centos-7.4/dldt+ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_cent74' failed
make[2]: *** [Xeon/centos-7.4/dldt+ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_cent74] Error 2
CMakeFiles/Makefile2:2079: recipe for target 'Xeon/centos-7.4/dldt+ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_cent74.dir/all' failed
make[1]: *** [Xeon/centos-7.4/dldt+ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_cent74.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
The command "make" exited with 2.

test_xeon_dldt_gst_centos74_gst_svt failed in several images test

https://api.travis-ci.com/v3/job/201936746/log.txt

4: New clock: GstSystemClock
4: ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstVP9Dec:vp9dec0: Failed to decode frame
4: Additional debug info:
4: gstvpxdec.c(696): gst_vpx_dec_handle_frame (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstVP9Dec:vp9dec0:
4: corrupt frame
4: Execution ended after 0:00:00.472492924
4: Setting pipeline to PAUSED ...
4: Setting pipeline to READY ...
4: Setting pipeline to NULL ...
4: Freeing pipeline ...
4/10 Test #4: test_xeon_dldt_gst_centos74_gst_svt ....................***Failed 14.14 sec

inference plugins in media-only images

Please use conditional macros to differentiate media and analytics images:

Fetch FFmpeg source

ARG FFMPEG_VER=n4.1
ARG FFMPEG_REPO=https://github.com/FFmpeg/FFmpeg/archive/${FFMPEG_VER}.tar.gz
ARG FFMPEG_FLV_PATCH_REPO=https://raw.githubusercontent.com/VCDP/CDN/master/The-RTMP-protocol-extensions-for-H.265-HEVC.patch
ARG FFMPEG_1TN_PATCH_REPO=https://patchwork.ffmpeg.org/patch/11625/raw
ARG FFMPEG_THREAD_PATCH_REPO=https://patchwork.ffmpeg.org/patch/11035/raw
ARG FFMPEG_MA_PATCH_REPO_01=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0001-Intel-inference-engine-detection-filter.patch
ARG FFMPEG_MA_PATCH_REPO_02=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0002-New-filter-to-do-inference-classify.patch
ARG FFMPEG_MA_PATCH_REPO_03=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0003-iemetadata-convertor-muxer.patch
ARG FFMPEG_MA_PATCH_REPO_04=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0004-Kafka-protocol-producer.patch
ARG FFMPEG_MA_PATCH_REPO_05=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0005-Support-object-detection-and-featured-face-identific.patch
ARG FFMPEG_MA_PATCH_REPO_06=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0006-Send-metadata-in-a-packet-and-refine-the-json-format.patch
ARG FFMPEG_MA_PATCH_REPO_07=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0007-Refine-features-of-IE-filters.patch
ARG FFMPEG_MA_PATCH_REPO_08=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0008-fixed-extra-comma-in-iemetadata.patch
ARG FFMPEG_MA_PATCH_REPO_09=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0009-add-source-as-option-source-url-calculate-nano-times.patch
ARG FFMPEG_MA_PATCH_REPO_10=https://raw.githubusercontent.com/VCDP/FFmpeg-patch/master/media-analytics/0010-fixed-buffer-overflow-issue-in-iemetadata.patch

RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends zlib1g-dev libssl-dev

RUN wget -O - ${FFMPEG_REPO} | tar xz && mv FFmpeg-${FFMPEG_VER} FFmpeg &&
cd FFmpeg &&
wget -O - ${FFMPEG_FLV_PATCH_REPO} | patch -p1 &&
wget -O - ${FFMPEG_1TN_PATCH_REPO} | patch -p1 &&
wget -O - ${FFMPEG_THREAD_PATCH_REPO} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_01} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_02} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_03} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_04} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_05} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_06} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_07} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_08} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_09} | patch -p1 &&
wget -O - ${FFMPEG_MA_PATCH_REPO_10} | patch -p1;

ffmpeg SVT-AV1 plugin bug

ffmpeg -i travel6.mp4 -c:v libsvt_av1 -y travel6_av1.mp4
ffprobe -v error -show_streams travel6_av1.mp4

Probing errors into this:
root@6298ae4ea5e2:/home# x
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ededd3fd40] Empty AV1 Codec Configuration Box
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ededd3fd40] error reading header
travel6_av1.mp4: Invalid data found when processing input

DAV1D ffmpeg plugin include into docker

Verified it works for DAV1D plugin in FFMPEG master branch, and waiting for below dependencies ready for integrating it into Dockerfiles -

  1. FFMPEG stable release (v4.2).
  2. Existing FFMPEG plugin(i.e. SVT) support FFMPEG v4.2

**Cards**

Cards can be added to your board to track the progress of issues and pull requests. You can also add note cards, like this one!

CI build performance improvement

Dockerfiles CI build leverage Travis CI cloud service with a limitation of build time should be <50 mins, what's the opportunity to speed up our dockerfiles build and improve it?

Avoid usage of 'make -j<number>' instead do 'make -j $(nproc)'

For example, we are building some dockerfile with dldt (you can see example below) on a PC with 4 cores and not enough RAM this build process will be endless (it will hang).

RUN git clone -b ${DLDT_VER} ${DLDT_REPO}; \
    cd dldt; \
    git submodule init; \
...
    make -j16; \
    rm -rf ../bin/intel64/Release/lib/libgtest*; \

We can take into account number of cores by using nproc then above step will look like this:

RUN git clone -b ${DLDT_VER} ${DLDT_REPO}; \
    cd dldt; \
    git submodule init; \
...
    make -j $(nproc); \
    rm -rf ../bin/intel64/Release/lib/libgtest*; \

Sporadic "ffmpeg_svt_hevc" test failure

Following test fails sporadically in travis on random centos ffmpeg images:

/mnt/ffmpeg_svt_hevc.sh: line 4: 9 Segmentation fault (core dumped) ffmpeg -f rawvideo -vcodec rawvideo -s 320x240 -r 30 -pix_fmt yuv420p -i test.yuv -c:v libsvt_hevc -y test.mp4
6/10 Test #6: test_xeon_ffmpeg_centos75_ffmpeg_svt_hevc ...***Failed 1.88 sec

Log from master:
https://api.travis-ci.com/v3/job/199781932/log.txt
Log from pull request:
https://api.travis-ci.com/v3/job/199645510/log.txt

Example/Documentation

Need documentation/example of how to build and deploy a C++ application using the combination of the development and the deployment images.

Replace usage of semicolons by "&&"

We need to avoid usage of semicolons.
In case one command finished with failure the RUN won't be marked as failed it just execute next command after semicolon.

For example:

RUN git clone -b ${DLDT_VER} ${DLDT_REPO}; \
    cd dldt; \
    git submodule init; \
    git submodule update --recursive; \
    cd inference-engine; \
    wget -O - ${DLDT_C_API_REPO} | patch -p2; \

If git clone in the above command will fail this RUN won't fail and you may not even notice that something goes wrong, it just execute next commands.

Log too big for GST dev packages

Huge STDOUT for gst dev packge results in big raw file log for travis. Causing it to exceed travis raw log limit.
Figure out:

  • limit log
  • how to increase log limit on travis if possible

a single “CentOS” image copy on dockerhub.

By submitting to dockerhub, plan to redistribute only the “software” layers.
A docker image constructs of multiple layers, with the bottom layer being the OS. The OS image is not redistributed.

Rebuild time improvement

I think we can put each component into its own stage.
When one component has dependencies on other components we can install those components like in the final image.
It makes us available to reuse stages that were not changed.

For example:

  • dldt has dependencies only on CMake and OpenCV hence we install into dldt's stage CMake and OpenCV
  • gstreamer has dependencies on CMake and OpenCV - we install into dldt's stage CMake and OpenCV

When we need to update dldt we do not need to rebuild gstreamer, 'cause gstreamer doesn't depend on dldt.

SVT-AV1 template

There is a SVT-AV1 folder left under /home in the final image.
Also, SVTAv1UnitTests are in the final image.
Please remove those.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.