-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Code update to 2024.12 rc1 * Add code owner * Enable "-Wall" build flag; fix some warnings. * Fix trivy build * Pinned some dependencies to specific versions --------- Co-authored-by: Jie Dong <jerry.dong@intel.com> Co-authored-by: Xiaoxia Liang <xiaoxia.liang@intel.com>
- Loading branch information
1 parent
2259667
commit 655573d
Showing
53 changed files
with
4,634 additions
and
762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
UseTab: Never | ||
ColumnLimit: 120 | ||
|
||
Language: Cpp | ||
Standard: Cpp11 | ||
|
||
AccessModifierOffset: -4 | ||
AlignConsecutiveMacros: true | ||
AllowAllArgumentsOnNextLine: false | ||
AllowAllConstructorInitializersOnNextLine: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Empty | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakBeforeMultilineStrings: false | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
CommentPragmas: '^#' | ||
DerivePointerAlignment: false | ||
FixNamespaceComments: true | ||
IndentCaseLabels: false | ||
IndentPPDirectives: AfterHash | ||
ForEachMacros: | ||
- foreach | ||
- FOREACH_CHILD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bin | ||
build | ||
lib | ||
|
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright 2023 Intel Corporation | ||
|
||
# global-owner | ||
* @linxie47 @wangjingz @xiaoxial @djie1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Docker image build guide | ||
|
||
### 1. Set timezone correctly before building docker image. | ||
The following command takes Shanghai as an example. | ||
|
||
```bash | ||
timedatectl set-timezone Asia/Shanghai | ||
``` | ||
|
||
### 2. Set up docker service | ||
|
||
```bash | ||
sudo mkdir -p /etc/systemd/system/docker.service.d | ||
printf "[Service]\nEnvironment=\"HTTPS_PROXY=$https_proxy\" \"NO_PROXY=$no_proxy\"\n" | sudo tee /etc/systemd/system/docker.service.d/proxy.conf | ||
sudo systemctl daemon-reload | ||
sudo systemctl restart docker | ||
``` | ||
|
||
### 3. Build docker image | ||
|
||
```bash | ||
cd ./ivsr_ffmpeg_plugin | ||
./build_docker.sh --enable_ov_patch [true|false] --ov_version [2022.3|2023.2|2024.5|2024.5s] --os_version [rockylinux9|ubuntu22] | ||
``` | ||
- `enable_ov_patch`: Set as `true` or `flase` to enable or disable the application of OpenVINO 2022.3 patches, which are needed to support the Enhanced BasicVSR model.<br> | ||
- `ov_version`: Set the OpenVINO version to `2022.3`, `2023.2`, `2024.5`, `2024.5s`, which will be built and installed, the 2024.5s mean install openvino 2024.5 via apt or yum not build and install from source code. iVSR currently supports both OpenVINO 2022.3, 2023.2 and 2024.5, but the patches to enable the Enhanced BasicVSR model are only for OpenVINO 2022.3.<br> | ||
- `os_version`: Set OS version of Docker image to ubuntu22(Ubuntu 22.04) or rockylinux9(Rocky Linux 9.3) to build docker image based on specific OS.<br> | ||
If the docker image builds successfully, you can see a docker image named `ffmpeg_ivsr_sdk_${os_version}_ov${ov_version}` such as `ffmpeg_ivsr_sdk_ubuntu22_ov2022.3` or `ffmpeg_ivsr_sdk_rockylinux9_ov2022.3` in the output of `docker image ls`.<br> | ||
|
||
### 4. Start Docker Container | ||
|
||
```bash | ||
sudo docker run -itd --name ffmpeg_ivsr_sdk_container --privileged -e MALLOC_CONF="oversize_threshold:1,background_thread:true,metadata_thp:auto,dirty_decay_ms:9000000000,muzzy_decay_ms:9000000000" -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy --shm-size=128g --device=/dev/dri:/dev/dri ffmpeg_ivsr_sdk_[ubuntu22|rockylinux9]_[ov2022.3|ov2023.2|ov2024.5]:latest bash | ||
sudo docker exec -it ffmpeg_ivsr_sdk_container bash | ||
``` | ||
Note `--device=/dev/dri:/dev/dri` is specified in the command to add the host gpu device to container.<br> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Generic Manual Build Steps for FFmpeg + IVSR plugin Software | ||
|
||
### 1. (Optional) Install software for Intel® Data Center GPU Flex Series | ||
To facilitate inference on Intel Data Center GPU, it's necessary to have both the kernel driver and the run-time driver and software installed. If you're planning to run inference on a CPU only, you can disregard this step.<br> | ||
|
||
The detailed installation instruction is on [this page](https://dgpu-docs.intel.com/driver/installation.html#).<br> | ||
|
||
|
||
### 2. Install OpenCV | ||
OpenCV, which is used by the iVSR SDK sample for image processing tasks, needs to be installed. Detailed installation instructions can be found at [Installation OpenCV in Linux](https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html).<br> | ||
|
||
### 3. Install OpenVINO | ||
OpenVINO, currently the only backend supported by iVSR for model inference, should also be installed. You can refer to this [instruction](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_linux.md) to build OpenVINO from the source code.<br> | ||
|
||
### 4. Build iVSR SDK | ||
Once the dependencies are installed in the system, you can proceed to build the iVSR SDK and its sample.<br> | ||
```bash | ||
source <OpenVINO installation dir>/install/setupvars.sh | ||
export OpenCV_DIR=<OpenCV installation dir>/install/lib/cmake/opencv4 | ||
cd ivsr_sdk | ||
mkdir -p ./build | ||
cd ./build | ||
cmake .. -DENABLE_THREADPROCESS=ON -DENABLE_SAMPLE=ON -DCMAKE_BUILD_TYPE=Release | ||
make | ||
make install | ||
``` | ||
### 5. Build FFmpeg with iVSR plugin | ||
We provide patches specifically for FFmpeg n6.1. Apply these patches as instructed below:<br> | ||
```bash | ||
git clone https://github.com/FFmpeg/FFmpeg.git ./ivsr_ffmpeg_plugin/ffmpeg | ||
cd ./ivsr_ffmpeg_plugin/ffmpeg | ||
git checkout n6.1 | ||
cp ../patches/*.patch ./ | ||
for patch_file in $(find -iname "*.patch" | sort -n); do \ | ||
echo "Applying: ${patch_file}"; \ | ||
git am --whitespace=fix ${patch_file}; \ | ||
done; | ||
``` | ||
Finally, build FFmpeg. You can also enable other FFmpeg plugins as per the instructions provided in the [Compile FFmpeg for Ubuntu](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu) guide.<br> | ||
```bash | ||
source <OpenVINO installation folder>/install/setupvars.sh | ||
./configure --enable-libivsr --extra-cflags=-fopenmp --extra-ldflags=-fopenmp | ||
make -j $(nproc --all) | ||
make install | ||
``` |
Oops, something went wrong.