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

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
xwu2git committed Jan 25, 2019
0 parents commit 03083be
Show file tree
Hide file tree
Showing 519 changed files with 23,589 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
software/*.tar.gz
software/*.tgz
software/*.patch
build/*
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required (VERSION 2.8)

Project(DockerFiles NONE)
enable_testing()

file(GLOB dirs "*")
foreach(dir ${dirs})
if(EXISTS ${dir}/CMakeLists.txt)
add_subdirectory(${dir})
endif()
endforeach()

# legal message
execute_process(COMMAND printf "\nThis script will build third party components licensed under various open source licenses into your container images. 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.\n\n")
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2018, VCSE
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.
121 changes: 121 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
This repository hosts docker build files for multiple platform/OS/image combinations. Each image is tagged with development status.

Image:
- FFmpeg: image optimized for media creation and delivery. Included codecs: aac, mp3, opus, ogg, vorbis, x264, x265, vp8/9, av1 and SVT-HEVC. The GPU images are accelerated with vaapi and qsv.
- GStreamer: image optimized for media creation and delivery. Included the base, good, bad, ugly and libav set of plugins. The GPU images are accelerated with vaapi.
- DLDT+FFmpeg: image optimized for media analytics. Included what are in the FFmpeg image. Inferencing engine and tracking plugins to be included.
- DLDT+GStreamer: image optimized for media analytics. Included what are in the GStreamer image. Inferencing engine and tracking plugins to be included.
- FFmpeg+GStreamer (Dev): FFmpeg + GStreamer + C++ development files. Model optimizer to be included.
- NGINX+RTMP: image optimized for web hosting and caching. Based on FFmpeg, included NGINX the web server and RTMP the RTMP, DASH and HLS streaming module.

Status:
- C: Compiled. Not yet tested.
- T: Tested. Some tests failed.
- V: Verified. All tests passed.
- -: To be added in subsequent commits.

| Platform: Xeon (CPU) | Ubuntu 16.04 LTS | Ubuntu 18.04 LTS | CentOS-7.4 | CentOS-7.5 | CentOS-7.6 |
|-----|:---:|:---:|:---:|:---:|:---:|
| FFmpeg | V | V | V | V | V |
| GStreamer | V | V | V | V | V |
| DLDT(IE)+FFmpeg | V | V | V | V | V |
| DLDT(IE)+GStreamer | V | V | V | V | V |
| FFmpeg+GStreamer (Dev) | V | V | V | V | V |
| NGINX+RTMP | V | V | V | V | V |

| Platform: VCA2 | Ubuntu 16.04 LTS | Ubuntu 18.04 LTS | CentOS-7.4 | CentOS-7.5 | CentOS-7.6 |
|-----|:---:|:---:|:---:|:---:|:---:|
| FFmpeg | V | V | - | V | V |
| GStreamer | C | C | - | C | C |
| FFmpeg+GStreamer (Dev) | T | T | - | T | T |
| NGINX+RTMP | V | V | - | V | V |

| Platform: XeonE3 (GPU) | Ubuntu 16.04 LTS | Ubuntu 18.04 LTS | CentOS-7.4 | CentOS-7.5 | CentOS-7.6 |
|-----|:---:|:---:|:---:|:---:|:---:|
| FFmpeg | V | V | V | V | V |
| GStreamer | C | C | C | C | C |
| FFmpeg+GStreamer (Dev) | C | C | C | C | C |
| NGINX+RTMP | V | V | V | V | V |

### Update kernel and firmware:

Please see each platform folder README for the platform setup instructions.

### Install docker.ce:
| Ubuntu | CentOS |
|:----------|:----------------|
|(0) sudo apt-get remove docker.io # remove old docker |(0) sudo yum remove docker docker-engine # remove old docker |
|(1) curl -fsSL https://download.docker.com/linux/ubuntu/gpg \| sudo apt-key add - |(1) sudo yum install -y yum-utils device-mapper-persistent-data lvm2 |
|(2) sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |(2) sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo |
|(3) sudo apt-get update && sudo apt-get install -y docker-ce |(3) sudo yum install -y docker-ce |


### Setup docker proxy:
```bash
(4) sudo mkdir -p /etc/systemd/system/docker.service.d
(5) printf "[Service]\nEnvironment=\"HTTPS_PROXY=$https_proxy\" \"NO_PROXY=$no_proxy\"\n" | sudo tee /etc/systemd/system/docker.service.d/proxy.conf
(6) sudo systemctl daemon-reload
(7) sudo systemctl restart docker
```

### Build docker image(s):

```bash
(1) mkdir build
(2) cd build
(3) cmake ..
(4) cd Xeon/ubuntu-16.04/ffmpeg # please build your specific <_platform_>/<_OS_>/<_image_> only as a full build takes a long time.
(5) make # build on the target processor for best performance.
(6) ctest
```

### Run shell:

```bash
(1) Xeon/ubuntu-16.04/ffmpeg/shell.sh #<_platform_>/<_OS_>/<_image_>
```

### Customize:

You can modify any Dockerfile.m4 template for customization. For example, uncomment #include(transform360.m4) in Xeon/ubuntu-16.04/ffmpeg/Dockerfile.m4 to add essential 360 video transformation in the FFmpeg build.
After modification, please rerun cmake and make.

### Use alternative repo:

Certain source repo might be blocked in certain network. You can use alternative repos before build as follows:

```bash
export AOM_REPO=...
export VPX_REPO=...
make
```

For a list of all REPOs and their versions, run the following command:

```bash
grep -E '_(REPO|VER)=' template/*.m4
```

### Use Dockerfile(s) in other project:

It is recommended that you copy the Dockerfile(s) of your platform, OS and image directly into your other project. The following shell scripts show how to sync (if needed) and build the NGINX+RTMP Dockerfile (and its dependency FFmpeg):

update.sh:
```bash
DOCKER_REPO=${DOCKER_REPO="https://<<this-repo>>/master/raw/Xeon/ubuntu-18.04"}
(echo "# xeon-ubuntu1804-ffmpeg" && curl ${DOCKER_REPO}/ffmpeg/Dockerfile) > Dockerfile.2
(echo "# xeon-ubuntu1804-nginx-rtmp" && curl ${DOCKER_REPO}/nginx+rtmp/Dockerfile) > Dockerfile.1
```
build.sh:
```bash
for dep in .2 .1; do
image=$(grep -m1 '#' "Dockerfile$dep" | cut -d' ' -f2)
sudo docker build --network=host --file="Dockerfile$dep" -t "$image:latest" . $(env | grep -E '_(proxy)=' | sed 's/^/--build-arg /')
done
```






1 change: 1 addition & 0 deletions VCA2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include(${CMAKE_SOURCE_DIR}/script/platform.cmake)
14 changes: 14 additions & 0 deletions VCA2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
The Intel(R) Visual Compute Accelerator 2 (Intel VCA 2) features three Intel(R) Xeon(R) processors E3-1500 v5 with Iris(R) Pro P580.

See the following documents for instructions on how to setup Intel VCA 2:
- [Intel VCA 2 Product Specification and Hardware Guide](https://www.intel.com/content/dam/support/us/en/documents/server-products/server-accessories/VCA2_HW_User_Guide.pdf)
- [Intel VCA 2 Product Family Software Guide](https://www.intel.com/content/dam/support/us/en/documents/server-products/server-accessories/VCA_SoftwareUserGuide.pdf)

The Dockerfiles presented in this repo are targeted to run on the Intel VCA 2 nodes.
Therefore the host installation steps mentioned in the parent [README.md](../README.md) apply to each Intel VCA 2 node instead.
The build and test scripts additionally require "sudo" to be available on the node:

```sh
Ubuntu: apt-get install -y sudo
CentOS: yum install -y sudo
```
1 change: 1 addition & 0 deletions VCA2/centos-7.4/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include(${CMAKE_SOURCE_DIR}/script/os.cmake)
4 changes: 4 additions & 0 deletions VCA2/centos-7.4/ffmpeg+gst+dev/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(image "vca2_ffmpeg_gst_devel_centos74")
include("${CMAKE_SOURCE_DIR}/script/image.cmake")
include("${CMAKE_SOURCE_DIR}/script/ffmpeg-tests.cmake")
include("${CMAKE_SOURCE_DIR}/script/gst-tests.cmake")
Loading

0 comments on commit 03083be

Please sign in to comment.