Skip to content

Commit

Permalink
v24.12 release version (#24)
Browse files Browse the repository at this point in the history
* 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
3 people authored Dec 12, 2024
1 parent 2259667 commit 655573d
Show file tree
Hide file tree
Showing 53 changed files with 4,634 additions and 762 deletions.
28 changes: 28 additions & 0 deletions .clang-format
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
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
sudo systemctl daemon-reload
sudo systemctl restart docker
cd ./ivsr_ffmpeg_plugin
./build_docker.sh --enable_ov_patch false
./build_docker.sh --ov_version 2024.5s
- name: Check disk space
run: df -h

Expand All @@ -55,7 +55,7 @@ jobs:
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: 'image'
image-ref: 'ffmpeg_ivsr_sdk_ov2022.3'
image-ref: 'ffmpeg_ivsr_sdk_ubuntu22_ov2024.5s'
#format: 'template'
#template: '@/contrib/sarif.tpl'
security-checks: vuln
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
sudo systemctl daemon-reload
sudo systemctl restart docker
cd ./ivsr_ffmpeg_plugin
./build_docker.sh --enable_ov_patch true --ov_version 2022.3
./build_docker.sh --ov_version 2024.5s --os_version rockylinux9
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin
build
lib

8 changes: 0 additions & 8 deletions .gitmodules

This file was deleted.

5 changes: 5 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
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
140 changes: 40 additions & 100 deletions README.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# iVSR Release Notes

# Next Release

## New and Changes

## Bug Fixes

## Known Limitations/Issues
- If the model-guard protected model is loaded, it prints the following *error* messages. They can be ignored as its normal procedure for this kind of model files.<br>
[libprotobuf ERROR thirdparty/protobuf/protobuf/src/google/protobuf/text_format.cc:335] Error parsing text-format tensorflow.GraphDef: 1:2: Message type "tensorflow.GraphDef" has no field named "T".<br>
[libprotobuf ERROR thirdparty/protobuf/protobuf/src/google/protobuf/text_format.cc:335] Error parsing text-format tensorflow.GraphDef: 1:2: Message type "tensorflow.GraphDef" has no field named "T".


# Release v24.05

## New and Changes in v24.05
Expand Down
23 changes: 12 additions & 11 deletions build_ivsr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PROJECTDIR=${PWD}
usage() {
echo "Usage: $0 --enable_ov_patch [true|false]
--enable_compile_ffmpeg [true|false]
--ov_version [2022.3|2023.2]"
--ov_version [2022.3|2023.2|2024.5]"
exit 1
}

Expand Down Expand Up @@ -40,7 +40,7 @@ while [ $# -gt 0 ]; do
;;
--ov_version)
shift
if [ "$1" = "2022.3" ] || [ "$1" = "2023.2" ]; then
if [ "$1" = "2022.3" ] || [ "$1" = "2023.2" ] || [ "$1" = "2024.5" ]; then
OV_VERSION=$1
else
usage
Expand All @@ -55,9 +55,9 @@ while [ $# -gt 0 ]; do
shift # Move to the next argument
done

if [ "$OV_VERSION" = "2023.2" ]; then
if [ "$OV_VERSION" != "2022.3" ]; then
ENABLE_OV_PATCH="false"
echo "There is no openvino patches for openvino 2023.2 version, will ignore the setting of ENABLE_OV_PATCH"
echo "There is no openvino patches for openvino $OV_VERSION, will ignore the setting of ENABLE_OV_PATCH"
fi


Expand Down Expand Up @@ -92,8 +92,8 @@ apt-get update && DEBIAN_FRONTEND=noninteractive && apt-get install -y --no-inst
python3-dev libpython3-dev python3-pip

apt-get clean
pip --no-cache-dir install --upgrade pip setuptools
pip install numpy
pip --no-cache-dir install --upgrade pip==23.0 setuptools==65.5.0
pip install numpy==1.23.5



Expand Down Expand Up @@ -142,8 +142,8 @@ if [ "$OV_VERSION" = "2022.3" ]; then
apt-get clean
fi

## 3.2-2 BKC for OV2023.2
if [ "$OV_VERSION" = "2023.2" ]; then
## 3.2-2 BKC for other OV versions
if [ "$OV_VERSION" != "2022.3" ]; then
apt-get update
apt-get install -y vainfo clinfo
apt-get install -y --no-install-recommends ocl-icd-libopencl1
Expand Down Expand Up @@ -241,7 +241,8 @@ cd ${IVSR_SDK_DIR}/build
cmake .. \
-DENABLE_LOG=OFF -DENABLE_PERF=OFF -DENABLE_THREADPROCESS=ON \
-DCMAKE_BUILD_TYPE=Release
make
make -j $(nproc --all)
make install
echo "Build ivsr sdk finished."


Expand Down Expand Up @@ -289,9 +290,9 @@ if ${ENABLE_COMPILE_FFMPEG}; then
export LD_LIBRARY_PATH=${IVSR_SDK_DIR}/lib:${CUSTOM_IE_LIBDIR}:${TBB_DIR}/../lib:"$LD_LIBRARY_PATH"
cd ${FFMPEG_DIR}
./configure \
--extra-cflags=-fopenmp \
--extra-ldflags=-fopenmp \
--enable-libivsr \
--extra-cflags=-I${IVSR_SDK_DIR}/include/ \
--extra-ldflags=-L${IVSR_SDK_DIR}/lib \
--disable-static \
--disable-doc \
--enable-shared \
Expand Down
36 changes: 36 additions & 0 deletions docs/docker_image_build.md
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 added docs/figs/logo.bmp
Binary file not shown.
45 changes: 45 additions & 0 deletions docs/generic_manual_build.md
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
```
Loading

0 comments on commit 655573d

Please sign in to comment.