This example contains a workflow definition that emulates functionality exposed by openvino hello world example
The flow, given an image file name containing a dog image, returns that dog's race.
You will need:
python -m ensurepip --upgrade
pip install -r requirements.txt
and pip install jep
, will be automatically installed when running Maven.NOTE: Requirements.txt install Jep as the last one because it depends on the NumPy library to work correctly.
When using native image compilation, you will also need:
Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need ‘native-image’ installed in GraalVM (using gu install native-image
). Please refer to GraalVM installation documentation for more details.
mvn clean package quarkus:dev
mvn clean package java -jar target/quarkus-app/quarkus-run.jar
Note that this requires GRAALVM_HOME to point to a valid GraalVM installation Also LD_LIBRARY_PATH should include GRAALVM_HOME/lib/server
mvn clean package -Pnative
It will take a while, once finished, run the generated executable.
./target/serverless-workflow-openvino-quarkus-{version}-runner
Once the server is running, you can test it by sending a request to http://localhost:8080/openvino_helloworld
with following content
{ "fileName": "path to a file containing a picture of a dog" }
Complete curl command can be found below:
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
.