Skip to content

Commit

Permalink
[KOGITO-9319] OpenVino example (#1698)
Browse files Browse the repository at this point in the history
* [KOGITO-9319] OpenVino example

* [KOGITO-9319] Removing unneeded file

* Update serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md

Co-authored-by: Marián Macik <[email protected]>

* Update serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md

Co-authored-by: Marián Macik <[email protected]>

* Update serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/main/resources/openvino.sw.json

Co-authored-by: Marián Macik <[email protected]>

* Update serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml

Co-authored-by: Marián Macik <[email protected]>

* Update serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml

Co-authored-by: Marián Macik <[email protected]>

* [KOGITO-9319] Refactor into two states

* [KOGITO-9319] Mimic openvino structure

* Delete openvino.svg

---------

Co-authored-by: Marián Macik <[email protected]>
  • Loading branch information
fjtirado and MarianMacik authored Jun 23, 2023
1 parent 17e9a04 commit 73b9cf7
Show file tree
Hide file tree
Showing 11 changed files with 11,673 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Kogito Serverless Workflow - Openvino Hello World Example

## Description

This example contains a workflow definition that emulates functionality exposed by [openvino hello world example](https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/001-hello-world/001-hello-world.ipynb)

The flow, given an image file name containing a dog image, returns that dog's race.

## Installing and Running

### Prerequisites

You will need:
- Java 11+ installed
- Environment variable JAVA_HOME set accordingly
- Maven 3.8.6+ installed
- Python3 installed
- Jep installed. Instructions [here](https://github.com/ninia/jep#installation)
- Python required libraries. Run `pip install -r requirements.txt`. Requirements.txt is on example root path.


### Compile and Run in Local Dev Mode

```sh
mvn clean package quarkus:dev
```

### Compile and Run in JVM mode

```sh
mvn clean package
java -jar target/quarkus-app/quarkus-run.jar
```

or on Windows

```sh
mvn clean package
java -jar target\quarkus-app\quarkus-run.jar
```

### Submit a request

The service based on the JSON workflow definition can be access by sending a request to http://localhost:8080/openvino_helloworld
with following content

```json
{
"fileName": "path to a file containing a picture of a dog"
}
```

Complete curl command can be found below:

```sh
curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"fileName": <path>}' http://localhost:8080/openvino_helloworld
```


The flow should return a message with the dog race as property `group`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 73b9cf7

Please sign in to comment.