Skip to content

Commit 43bccd0

Browse files
Update openvino example
Signed-off-by: Adarsh <[email protected]>
1 parent 27312e5 commit 43bccd0

File tree

4 files changed

+33
-76
lines changed

4 files changed

+33
-76
lines changed

Examples/openvino/README.md

+21-22
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ For additional information on supported models, how to install, run and optimize
44
OpenVINO, please see
55
https://github.com/gramineproject/examples/blob/master/openvino/README.md.
66

7-
Currently tested distro is Ubuntu 20.04.
7+
Currently tested distro is Ubuntu 24.04.
88

99
## Building graminized Docker image
1010

1111
1. Build Docker image:
1212
```bash
13-
docker build --tag ubuntu20.04-openvino --file ubuntu20.04-openvino.dockerfile .
13+
docker build --tag ubuntu24.04-openvino --file ubuntu24.04-openvino.dockerfile .
1414
```
1515

1616
2. Graminize the Docker image using `gsc build`:
1717
```bash
1818
cd ../..
19-
./gsc build --insecure-args ubuntu20.04-openvino \
20-
Examples/openvino/ubuntu20.04-openvino.manifest
19+
./gsc build --insecure-args ubuntu24.04-openvino \
20+
Examples/openvino/ubuntu24.04-openvino.manifest
2121
```
2222

2323
3. Sign the graminized Docker image using `gsc sign-image`:
2424
```bash
25-
./gsc sign-image ubuntu20.04-openvino enclave-key.pem
25+
./gsc sign-image ubuntu24.04-openvino enclave-key.pem
2626
```
2727

2828
## Running the benchmark in GSC
@@ -31,44 +31,43 @@ cd ../..
3131

3232
- For benchmarking:
3333
```bash
34-
$ docker run --cpuset-cpus="0-35,72-107" --cpuset-mems=0 \
34+
docker run --cpuset-cpus="0-35,72-107" --cpuset-mems=0 \
3535
--device /dev/sgx_enclave \
36-
gsc-ubuntu20.04-openvino -i <image files> \
37-
-m model/<public | intel>/<model_dir>/<INT8 | FP16 | FP32>/<model_xml_file> \
38-
-d CPU -b 1 -t 20 -nstreams 72 -nthreads 72 -nireq 72
36+
gsc-ubuntu24.04-openvino -i <image files> \
37+
-m /model/<public | intel>/<model_dir>/<INT8 | FP16 | FP32>/<model_xml_file> \
38+
-d CPU -b 1 -t 20 -nstreams 72 -nthreads 72 -nireq 72 -hint none
3939
```
4040

4141
- For a quick test:
4242
```bash
43-
$ docker run --rm --device /dev/sgx_enclave gsc-ubuntu20.04-openvino \
44-
-m model/public/resnet-50-tf/FP16/resnet-50-tf.xml \
45-
-d CPU -b 1 -t 20 -nstreams 2 -nthreads 2 -nireq 2
43+
docker run --rm --device /dev/sgx_enclave gsc-ubuntu24.04-openvino \
44+
-m /model/public/resnet-50-tf/FP16/resnet-50-tf.xml \
45+
-d CPU -b 1 -t 20 -nstreams 2 -nthreads 2 -nireq 2 -hint none
4646
```
4747

4848
### Latency runs
4949

5050
- For benchmarking:
5151
```bash
52-
$ docker run --cpuset-cpus="0-35,72-107" --cpuset-mems="0" \
52+
docker run --cpuset-cpus="0-35,72-107" --cpuset-mems="0" \
5353
--device /dev/sgx_enclave \
54-
gsc-ubuntu20.04-openvino -i <image files> \
55-
-m model/<public | intel>/<model_dir>/<INT8 | FP16 | FP32>/<model_xml_file> \
56-
-d CPU -b 1 -t 20 -api sync
54+
gsc-ubuntu24.04-openvino -i <image files> \
55+
-m /model/<public | intel>/<model_dir>/<INT8 | FP16 | FP32>/<model_xml_file> \
56+
-d CPU -b 1 -t 20 -api sync -hint none
5757
```
5858

5959
- For a quick test:
6060
```bash
61-
$ docker run --rm --device /dev/sgx_enclave gsc-ubuntu20.04-openvino \
62-
-m model/public/resnet-50-tf/FP16/resnet-50-tf.xml \
63-
-d CPU -b 1 -t 20 -api sync
61+
docker run --rm --device /dev/sgx_enclave gsc-ubuntu24.04-openvino \
62+
-m /model/public/resnet-50-tf/FP16/resnet-50-tf.xml \
63+
-d CPU -b 1 -t 20 -api sync -hint none
6464
```
6565

6666
## Running the benchmark natively
6767

68-
To run the benchmark in a native Docker container (outside Gramine), run the
69-
above commands with the following modifications:
68+
To run the benchmark in a native Docker container (outside Gramine), run the above commands with the following modifications:
7069
- remove `--device=/dev/sgx_enclave`,
71-
- replace `gsc-ubuntu20.04-openvino` with `ubuntu20.04-openvino`.
70+
- replace `gsc-ubuntu24.04-openvino` with `ubuntu24.04-openvino`.
7271

7372
## Notes
7473

Examples/openvino/ubuntu20.04-openvino.dockerfile

-54
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM openvino/ubuntu24_dev:2024.6.0
2+
3+
USER root
4+
5+
ENV MODELS="resnet-50-tf bert-large-uncased-whole-word-masking-squad-0001 ssd_mobilenet_v1_coco"
6+
7+
RUN for model_name in $MODELS; do \
8+
omz_downloader --name $model_name -o /model && \
9+
omz_converter --name $model_name -d /model -o /model; \
10+
done
11+
12+
ENTRYPOINT ["/opt/intel/openvino/samples/cpp/samples_bin/samples_bin/benchmark_app"]

0 commit comments

Comments
 (0)