Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #80 from smart-edge-open/smart-edge-open-release-2109
Browse files Browse the repository at this point in the history
Smart Edge Open 21.09 release
  • Loading branch information
cjnolan authored Sep 30, 2021
2 parents 3ba7abc + f4f5cac commit 132a3a6
Show file tree
Hide file tree
Showing 46 changed files with 454 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ before_install:
- sudo apt-get install -y pylint

script:
- ./run_ci_build.sh
# - ./run_ci_build.sh
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The Technical Steering Committee roles include:
* Any new project repositories must be approved by the Technical Steering Committee.

## Submitting Changes
Inbound contributions are done through [pull requests](https://github.com/open-ness/edgeapps/pulls) which include code changes, enhancements, bug fixes or new applications/features. If you are getting started, you may refer to Github's [how-to](https://help.github.com/articles/using-pull-requests/). With your contributions, we expect that you:
Inbound contributions are done through [pull requests](https://github.com/smart-edge-open/edgeapps/pulls) which include code changes, enhancements, bug fixes or new applications/features. If you are getting started, you may refer to Github's [how-to](https://help.github.com/articles/using-pull-requests/). With your contributions, we expect that you:

* certify that you wrote and/or have the right to submit the pull request,
* agree with the [Developer Certificate of Origin](http://developercertificate.org/),
Expand Down Expand Up @@ -71,18 +71,18 @@ Big contributions, ideas or controversial features should be discussed with the
6. Merging the pull requests can only be performed by the maintainer(s).

## How to report an issue/bug/enhancement
It is encouraged to use the [GitHub Issues](https://github.com/open-ness/edgeapps/issues) tool to report any bug, issue, enhancement or to seek help.
It is encouraged to use the [GitHub Issues](https://github.com/smart-edge-open/edgeapps/issues) tool to report any bug, issue, enhancement or to seek help.

## Resources
Below are some useful resources for getting started with OpenNESS:
* [OpenNESS release notes](https://github.com/open-ness/specs/blob/master/openness_releasenotes.md)
* [OpenNESS solution index](https://github.com/open-ness/specs/blob/master/README.md)
* [OpenNESS architecture and solution overview](https://github.com/open-ness/specs/blob/master/doc/architecture.md)
* [OpenNESS getting started guide — network edge](https://github.com/open-ness/specs/blob/master/doc/getting-started/network-edge/controller-edge-node-setup.md)
* [OpenNESS getting started guide — on-premises](https://github.com/open-ness/specs/blob/master/doc/getting-started/on-premises/controller-edge-node-setup.md)
* [OpenNESS application onboarding — network edge](https://github.com/open-ness/specs/blob/master/doc/applications-onboard/network-edge-applications-onboarding.md)
* [OpenNESS application onboarding — on-premises](https://github.com/open-ness/specs/blob/master/doc/applications-onboard/on-premises-applications-onboarding.md)
* [OpenNESS application development and porting guide](https://github.com/open-ness/specs/blob/master/doc/applications/openness_appguide.md)
* [OpenNESS release notes](https://github.com/smart-edge-open/specs/blob/master/openness_releasenotes.md)
* [OpenNESS solution index](https://github.com/smart-edge-open/specs/blob/master/README.md)
* [OpenNESS architecture and solution overview](https://github.com/smart-edge-open/specs/blob/master/doc/architecture.md)
* [OpenNESS getting started guide — network edge](https://github.com/smart-edge-open/specs/blob/master/doc/getting-started/network-edge/controller-edge-node-setup.md)
* [OpenNESS getting started guide — on-premises](https://github.com/smart-edge-open/specs/blob/master/doc/getting-started/on-premises/controller-edge-node-setup.md)
* [OpenNESS application onboarding — network edge](https://github.com/smart-edge-open/specs/blob/master/doc/applications-onboard/network-edge-applications-onboarding.md)
* [OpenNESS application onboarding — on-premises](https://github.com/smart-edge-open/specs/blob/master/doc/applications-onboard/on-premises-applications-onboarding.md)
* [OpenNESS application development and porting guide](https://github.com/smart-edge-open/specs/blob/master/doc/applications/openness_appguide.md)

## Style Guide / Coding conventions
All contributions must follow the [Development Guide](DEVELOPING.md).
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[![Build Status](https://travis-ci.com/open-ness/edgeapps.svg?branch=master)](https://travis-ci.com/open-ness/edgeapps)
[![Go Report Card](https://goreportcard.com/badge/github.com/open-ness/edgeapps)](https://goreportcard.com/report/github.com/open-ness/edgeapps)
[![Build Status](https://travis-ci.com/smart-edge-open/edgeapps.svg?branch=master)](https://travis-ci.com/smart-edge-open/edgeapps)
[![Go Report Card](https://goreportcard.com/badge/github.com/smart-edge-open/edgeapps)](https://goreportcard.com/report/github.com/smart-edge-open/edgeapps)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

# OpenNESS Edge Applications
This repository presents reference designs of network & enterprise edge applications that have been deployed with the Open Network Edge Services Software (OpenNESS) platform.

## Getting Started

If this is your first stop at OpenNESS project, feel free to familiarize yourself with [OpenNESS philosophy and architecture](https://github.com/open-ness/specs/blob/master/doc/architecture.md) and have a look at the [release notes](https://github.com/open-ness/specs/blob/master/openness_releasenotes.md) to learn about the release history, fixed issues and compatible software/hardware.
If this is your first stop at OpenNESS project, feel free to familiarize yourself with [OpenNESS philosophy and architecture](https://github.com/smart-edge-open/specs/blob/master/doc/architecture.md) and have a look at the [release notes](https://github.com/smart-edge-open/specs/blob/master/openness_releasenotes.md) to learn about the release history, fixed issues and compatible software/hardware.

To get started with OpenNESS installation, follow the steps in [the network edge getting started guide](https://github.com/open-ness/specs/blob/master/doc/getting-started/network-edge/controller-edge-node-setup.md) or [the on-premises getting started guide](https://github.com/open-ness/specs/blob/master/doc/getting-started/on-premises/controller-edge-node-setup.md) according to the desired deployment type. More information about the difference between the two deployment scenarios is provided in the [Deployment Scenarios](https://github.com/open-ness/specs/blob/master/doc/architecture.md#deployment-scenarios) section.
To get started with OpenNESS installation, follow the steps in [the network edge getting started guide](https://github.com/smart-edge-open/specs/blob/master/doc/getting-started/network-edge/controller-edge-node-setup.md) or [the on-premises getting started guide](https://github.com/smart-edge-open/specs/blob/master/doc/getting-started/on-premises/controller-edge-node-setup.md) according to the desired deployment type. More information about the difference between the two deployment scenarios is provided in the [Deployment Scenarios](https://github.com/smart-edge-open/specs/blob/master/doc/architecture.md#deployment-scenarios) section.

The edge applications provided in this repository are landed on OpenNESS which is described in the onboarding guides for [network edge deployment](https://github.com/open-ness/specs/blob/master/doc/applications-onboard/network-edge-applications-onboarding.md) and [on-premises deployment](https://github.com/open-ness/specs/blob/master/doc/applications-onboard/on-premises-applications-onboarding.md). It is advised that you practice with these onboarding guides in order to get a feel of how the edge apps are launched and operated in the OpenNESS environment.
The edge applications provided in this repository are landed on OpenNESS which is described in the onboarding guides for [network edge deployment](https://github.com/smart-edge-open/specs/blob/master/doc/applications-onboard/network-edge-applications-onboarding.md) and [on-premises deployment](https://github.com/smart-edge-open/specs/blob/master/doc/applications-onboard/on-premises-applications-onboarding.md). It is advised that you practice with these onboarding guides in order to get a feel of how the edge apps are launched and operated in the OpenNESS environment.

The full documentation of the OpenNESS solution is accessible at the [OpenNESS index page](https://github.com/open-ness/specs/blob/master/README.md).
The full documentation of the OpenNESS solution is accessible at the [OpenNESS index page](https://github.com/smart-edge-open/specs/blob/master/README.md).


## Contributing
Expand Down
2 changes: 1 addition & 1 deletion applications/cdn-caching/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Extra setup is not required when using the control interface for data / content
#### Setting up the SR-IOV interface
1. Please refer to the link for setting up the SR-IOV interface: [Setting up SR-IOV for network edge](https://github.com/open-ness/specs/blob/master/doc/building-blocks/enhanced-platform-awareness/openness-sriov-multiple-interfaces.md#sriov-for-network-edge)
1. Please refer to the link for setting up the SR-IOV interface: [Setting up SR-IOV for network edge](https://github.com/smart-edge-open/specs/blob/master/doc/building-blocks/enhanced-platform-awareness/openness-sriov-multiple-interfaces.md#sriov-for-network-edge)
2. Set the "sriov" helm key to "True" to enable the sriov annotations and NFD features in the deployment specification.
Expand Down
4 changes: 2 additions & 2 deletions applications/eis-experience-kit/docs/whitepaper.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The EII application can be deployed through the OpenNESS architecture which requ
- **Camera**: A set of cameras connected through the wireless network.


EII installation and deployment on the OpenNESS Network Edge environment is available at [eis-experience-kit](https://github.com/open-ness/edgeapps/blob/master/applications/eis-experience-kit/README.md)
EII installation and deployment on the OpenNESS Network Edge environment is available at [eis-experience-kit](https://github.com/smart-edge-open/edgeapps/blob/master/applications/eis-experience-kit/README.md)

*NOTE: `In the above diagram, the RTSP Camera Stream pod is used for sending the RTSP stream. But in LTE/5G Network real-time deployment, the camera stream will come from real IP camera as per below diagram`*

Expand Down Expand Up @@ -145,6 +145,6 @@ With a Cloud Native approach, the EII application can be deployed on multiple no
The PCB demo sample application when deployed on OpenNESS creates an impactful edge computing use case that utilizes the capability of OpenNESS and EII.

## Reference
- [OpenNESS Architecture]( https://github.com/open-ness/specs/blob/master/doc/architecture.md)
- [OpenNESS Architecture]( https://github.com/smart-edge-open/specs/blob/master/doc/architecture.md)
- [Intel’s Edge Insights for Industrial](https://www.intel.com/content/www/us/en/internet-of-things/industrial-iot/edge-insights-industrial.html)

4 changes: 2 additions & 2 deletions applications/openvino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Copyright (c) 2020 Intel Corporation
### Overview
This sample application demonstrates OpenVINO object detection (pedestrian and vehicle detection) deployment and execution on the OpenNESS edge platform.

- [OpenVINO Sample Application White Paper](https://github.com/open-ness/specs/blob/master/doc/applications/openness_openvino.md)
- [OpenVINO Sample Application Onboarding Guide - Network Edge](https://github.com/open-ness/specs/blob/master/doc/applications-onboard/network-edge-applications-onboarding.md#onboarding-openvino-application)
- [OpenVINO Sample Application White Paper](https://github.com/smart-edge-open/specs/blob/master/doc/applications/openness_openvino.md)
- [OpenVINO Sample Application Onboarding Guide - Network Edge](https://github.com/smart-edge-open/specs/blob/master/doc/applications-onboard/network-edge-applications-onboarding.md#onboarding-openvino-application)


### Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion applications/openvino/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Copyright (c) 2020 Intel Corporation

# OpenVINO Benchmark Performance Test

> Notes: The following all steps assumes that OpenNESS were installed through [OpenNESS playbooks](https://github.com/open-ness/specs/blob/master/doc/getting-started/openness-cluster-setup.md).
> Notes: The following all steps assumes that OpenNESS were installed through [OpenNESS playbooks](https://github.com/smart-edge-open/specs/blob/master/doc/getting-started/openness-cluster-setup.md).
- [Precondition](#precondition)
- [Build benchamrk image](#build-benchamrk-image)
Expand Down
1 change: 1 addition & 0 deletions applications/openvino/clientsim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN apt-get update && \
apt-get -y install sudo && \
apt-get -y install unzip && \
apt-get -y install wget && \
apt-get -y install curl && \
apt-get -y install lsb-core && \
apt-get -y install autoconf libtool && \
apt-get -y install ffmpeg x264 && \
Expand Down
149 changes: 149 additions & 0 deletions applications/openvino/consumer/Dockerfile.pwek
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2019 Intel Corporation

FROM ubuntu:20.04

ENV http_proxy=$http_proxy
ENV https_proxy=$https_proxy
ENV no_proxy=$no_proxy,eaa.openness,analytics.openness
ENV DEBIAN_FRONTEND=noninteractive

## OnPrem NTS uses CPU 0,2 and 3.
## So OpenVINO user needs to configure the value according the setup
ENV OPENVINO_TASKSET_CPU=75

ARG OPENVINO_LINK=https://registrationcenter-download.intel.com/akdlm/irc_nas/17062/l_openvino_toolkit_p_2021.1.110.tgz
ARG YEAR=2021
ARG OPENVINO_DEMOS_DIR=/opt/intel/openvino_$YEAR/deployment_tools/open_model_zoo/demos
ARG MODEL_ROOT=/opt/intel/openvino_$YEAR/deployment_tools/open_model_zoo/tools/downloader
ARG NGINX_VERSION=1.21.1
ARG NGINX_RTMP_MODULE_VERSION=1.2.2
ENV APP_DIR=/opt/intel/openvino_$YEAR/deployment_tools/inference_engine/demos/python_demos/object_detection_demo_ssd_async/

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y
RUN apt install -y curl \
unzip \
python3-pip \
git

RUN apt clean all

# OpenVino installation
RUN cd /tmp && \
curl -O -L $OPENVINO_LINK && \
tar xf l_openvino_toolkit*.tgz && \
cd l_openvino_toolkit* && \
sed -i 's/decline/accept/g' silent.cfg && \
./install_openvino_dependencies.sh && \
./install.sh -s silent.cfg && \
rm -rf /tmp/l_openvino_toolkit*

# Install numpy
RUN pip3 install numpy

# Rebuilding libusb without UDEV support -- required for Intel Movidius Stick
RUN cd /tmp && \
curl -O -L https://github.com/libusb/libusb/archive/v1.0.22.zip && \
unzip v1.0.22.zip && cd libusb-1.0.22 && \
./bootstrap.sh && \
./configure --disable-udev --enable-shared && \
make -j4 && make install && \
rm -rf /tmp/*1.0.22*

# Build Nginx
# Install dependencies
RUN apt-get update && \
apt-get install -y \
ca-certificates \
openssl libssl-dev yasm \
libpcre3-dev librtmp-dev libtheora-dev \
libvorbis-dev libvpx-dev libfreetype6-dev \
libmp3lame-dev libx264-dev libx265-dev && \
rm -rf /var/lib/apt/lists/*

# Download nginx source
RUN mkdir -p /tmp/build && \
cd /tmp/build && \
curl -O -L https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
tar -zxf nginx-${NGINX_VERSION}.tar.gz && \
rm nginx-${NGINX_VERSION}.tar.gz

# Download rtmp-module source
RUN cd /tmp/build && \
curl -O -L https://github.com/arut/nginx-rtmp-module/archive/v${NGINX_RTMP_MODULE_VERSION}.tar.gz && \
tar -zxf v${NGINX_RTMP_MODULE_VERSION}.tar.gz && \
rm v${NGINX_RTMP_MODULE_VERSION}.tar.gz

# Build nginx with nginx-rtmp module
RUN cd /tmp/build/nginx-${NGINX_VERSION} && \
./configure \
--sbin-path=/usr/local/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-client-body-temp-path=/tmp/nginx-client-body \
--with-http_ssl_module \
--with-threads \
--add-module=/tmp/build/nginx-rtmp-module-${NGINX_RTMP_MODULE_VERSION} && \
make -j 2 && \
make install

COPY nginx.conf /etc/nginx/nginx.conf
RUN chmod +s /usr/local/sbin/nginx

# Creating user openvino and adding it to groups "video" and "users" to use GPU and VPU
RUN useradd -ms /bin/bash -G video,users,www-data openvino && \
chown -R openvino /home/openvino

COPY cmd/ /home/openvino
ADD start.sh.pwek /home/openvino/start.sh

RUN chown -R openvino:openvino /opt/intel/openvino*
RUN chown -R openvino:openvino /home/openvino/*

RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log

USER openvino
RUN echo "source /opt/intel/openvino_$YEAR/bin/setupvars.sh" >> ~/.bashrc
RUN bash -c "source ~/.bashrc"

# Build OpenVINO samples
ADD object_detection_demo_ssd_async.patch $APP_DIR
RUN cd $APP_DIR && patch -p0 object_detection_demo_ssd_async.py object_detection_demo_ssd_async.patch

# Download OpenVINO pre-trained models
RUN cd $MODEL_ROOT && python3 -mpip install --user -r ./requirements.in && \
./downloader.py --name pedestrian-detection-adas-0002 && \
./downloader.py --name vehicle-detection-adas-0002

RUN cp -r $MODEL_ROOT/intel/vehicle-detection-adas-0002 $APP_DIR/ && \
cp -r $MODEL_ROOT/intel/pedestrian-detection-adas-0002 $APP_DIR/

# Install Go
RUN cd /tmp && \
curl -O -L https://dl.google.com/go/go1.15.linux-amd64.tar.gz && \
tar -xvf go1.15.linux-amd64.tar.gz

ENV OPENVINO_ROOT=/opt/intel/openvino_$YEAR
ENV GOPATH=/home/openvino/go
ENV GOROOT=/tmp/go
ENV GO111MODULE=on
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir $GOPATH

# Work Dir
WORKDIR /home/openvino
ADD output_320x240.mp4 ./

# Get go dependencies
RUN git config --global http.proxy $http_proxy
RUN go get github.com/gorilla/websocket
RUN go build main.go openvino.go eaa_interface.go

# OpenVINO inference and forwarding
ENTRYPOINT ["./start.sh"]
14 changes: 11 additions & 3 deletions applications/openvino/consumer/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2019 Intel Corporation

declare http_proxy https_proxy no_proxy
sudo docker build \

if [ -z "$1" ];then
sudo docker build \
--build-arg http_proxy="$http_proxy" \
--build-arg https_proxy="$https_proxy" \
--build-arg no_proxy="$no_proxy" \
-t openvino-cons-app:1.0 -f Dockerfile .
else
sudo docker build \
--build-arg http_proxy="$http_proxy" \
--build-arg https_proxy="$https_proxy" \
--build-arg no_proxy="$no_proxy" \
-t openvino-cons-app:1.0 .
-t openvino-cons-app:1.0 -f Dockerfile.pwek .
fi
2 changes: 1 addition & 1 deletion applications/openvino/consumer/cmd/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/open-ness/edgeapps/applications/openvino/consumer
module github.com/smart-edge-open/edgeapps/applications/openvino/consumer

go 1.16

Expand Down
8 changes: 6 additions & 2 deletions applications/openvino/consumer/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
)

var myURN URN
var cpuSet string

// InferenceSettings is the notification structure of OpenVINO inference
// settings: model name & acceleration type
Expand Down Expand Up @@ -257,7 +258,7 @@ func switchModel(payload []byte) {
infSettings.Accelerator)

// Call OpenVINO C++ App with the model name & acceleration type
callOpenVINO(infSettings.Model, infSettings.Accelerator)
callOpenVINO(infSettings.Model, infSettings.Accelerator, cpuSet)
}

func notifListener(conn *websocket.Conn, client *http.Client) {
Expand Down Expand Up @@ -304,8 +305,11 @@ func notifListener(conn *websocket.Conn, client *http.Client) {
}

func main() {
if len(os.Args) < 2 {
log.Fatal("Usage help: ./main <cpu_core>\nFor example: ./main 8")
}
log.Println("OpenVINO Consumer Started")

cpuSet = os.Args[1]
myURN = URN{
ID: "consumer",
Namespace: "openvino",
Expand Down
16 changes: 12 additions & 4 deletions applications/openvino/consumer/cmd/openvino.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"log"
"os"
"os/exec"
"strconv"
"strings"
)

Expand All @@ -20,7 +21,15 @@ const (

var cmd *exec.Cmd

func callOpenVINO(model string, accl string) {
func checkEnvVariable(number string) {

_, err := strconv.Atoi(number)
if err != nil {
log.Fatal("The invalid environment variable: OPENVINO_TASKSET_CPU")
}
}

func callOpenVINO(model string, accl string, cpuset string) {

var modelXML string
// validate accelerator type
Expand All @@ -46,14 +55,13 @@ func callOpenVINO(model string, accl string) {
openvinoPath := os.Getenv("APP_DIR")
openvinoCmd := "object_detection_demo_ssd_async.py"

// get taskset cpu from env
openvinoTasksetCPU := os.Getenv("OPENVINO_TASKSET_CPU")
checkEnvVariable(cpuset)

if err := os.Chdir(openvinoPath); err != nil {
log.Fatal("Failed to change directory:", err)
}

cmd = exec.Command("taskset", "-c", openvinoTasksetCPU,
cmd = exec.Command("taskset", "-c", cpuset,
"python3", openvinoCmd, "-d", accl,
"-i", "rtmp://127.0.0.1:5000/live/test.flv",
"-m", modelXML)
Expand Down
Loading

0 comments on commit 132a3a6

Please sign in to comment.