Skip to content

Commit 1aff598

Browse files
authored
Fixing linux demos (#3018) (#3032)
* Fixing linux demos * Windows fixes * PIP_BREAK_SYSTEM_PACKAGES=1
1 parent 5f12721 commit 1aff598

File tree

16 files changed

+46
-26
lines changed

16 files changed

+46
-26
lines changed

demos/age_gender_recognition/python/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_z
1919
:::{dropdown} **Deploying with Docker**
2020
Start OVMS container with image pulled in previous step and mount `model` directory :
2121
```bash
22+
chmod -R 755 model
2223
docker run --rm -d -u $(id -u):$(id -g) -v $(pwd)/model:/models/age_gender -p 9000:9000 -p 8000:8000 openvino/model_server:latest --model_path /models/age_gender --model_name age_gender --port 9000 --rest_port 8000
2324
```
2425
:::

demos/benchmark/cpp/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ The application can be used with any model or pipeline served in OVMS, by reques
1919
### Prepare the model
2020
Start OVMS with resnet50-binary model:
2121
```bash
22-
curl -L --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.bin -o resnet50-binary/1/model.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.xml -o resnet50-binary/1/model.xml
22+
curl -L --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.bin -o resnet50-binary/1/model.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.xml -o resnet50-binary/1/model.xml
23+
chmod -R 755 resnet50-binary
2324
```
2425

2526
### Prepare the server

demos/bert_question_answering/python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616

1717

18-
FROM ubuntu:20.04
18+
FROM ubuntu:22.04
1919
RUN apt update && apt install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
2020
WORKDIR /bert
2121
COPY bert_question_answering.py tokens_bert.py html_reader.py requirements.txt ./

demos/face_detection/python/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ optional arguments:
7171
Start the OVMS service locally:
7272

7373
```console
74-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/face-detection-retail-0004/FP32/face-detection-retail-0004.bin -o model/1/face-detection-retail-0004.bin
75-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/face-detection-retail-0004/FP32/face-detection-retail-0004.xml -o model/1/face-detection-retail-0004.xml
74+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/face-detection-retail-0004/FP32/face-detection-retail-0004.bin -o model/1/face-detection-retail-0004.bin
75+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/face-detection-retail-0004/FP32/face-detection-retail-0004.xml -o model/1/face-detection-retail-0004.xml
7676
```
7777

7878
## Deploying OVMS
7979

8080
:::{dropdown} **Deploying with Docker**
8181
```bash
82+
chmod -R 755 model
8283
docker run --rm -d -u $(id -u):$(id -g) -v `pwd`/model:/models -p 9000:9000 openvino/model_server:latest --model_path /models --model_name face-detection --port 9000 --shape auto
8384
```
8485
:::

demos/horizontal_text_detection/python/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The client can work efficiently also over slow internet connection with long lat
77
### Download horizontal text detection model from OpenVINO Model Zoo
88

99
```bash
10-
curl -L --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/horizontal-text-detection-0001/FP32/horizontal-text-detection-0001.bin -o horizontal-text-detection-0001/1/horizontal-text-detection-0001.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/horizontal-text-detection-0001/FP32/horizontal-text-detection-0001.xml -o horizontal-text-detection-0001/1/horizontal-text-detection-0001.xml
10+
curl -L --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/horizontal-text-detection-0001/FP32/horizontal-text-detection-0001.bin -o horizontal-text-detection-0001/1/horizontal-text-detection-0001.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/horizontal-text-detection-0001/FP32/horizontal-text-detection-0001.xml -o horizontal-text-detection-0001/1/horizontal-text-detection-0001.xml
1111
```
1212

1313
```bash
@@ -20,6 +20,7 @@ horizontal-text-detection-0001
2020

2121
### Start the OVMS container:
2222
```bash
23+
chmod -R 755 horizontal-text-detection-0001
2324
docker run -d -u $(id -u):$(id -g) -v $(pwd)/horizontal-text-detection-0001:/model -p 9000:9000 openvino/model_server:latest \
2425
--model_path /model --model_name text --port 9000 --layout NHWC:NCHW
2526
```

demos/image_classification/cpp/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ make
1818

1919
Start OVMS with resnet50-binary model:
2020
```bash
21-
curl -L --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.bin -o resnet50-binary/1/model.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.xml -o resnet50-binary/1/model.xml
21+
curl -L --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.bin -o resnet50-binary/1/model.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.xml -o resnet50-binary/1/model.xml
2222
```
2323

2424
# Client requesting prediction synchronously
@@ -30,6 +30,7 @@ The client also tests server responses for accuracy.
3030

3131
## Prepare the server
3232
```bash
33+
chmod -R 755 resnet50-binary
3334
docker run -d -u $(id -u):$(id -g) -v $(pwd)/resnet50-binary:/model -p 9001:9001 openvino/model_server:latest \
3435
--model_path /model --model_name resnet --port 9001 --layout NHWC:NCHW
3536
```

demos/mediapipe/holistic_tracking/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,25 @@ The models setup should look like this
5050
│   └── 1
5151
│   └── hand_recrop.tflite
5252
├── holistic_tracking.pbtxt
53+
├── iris_landmark
54+
│   └── 1
55+
│   └── iris_landmark.tflite
56+
├── mediapipe
57+
│   └── modules
58+
│   └── hand_landmark
59+
│   └── handedness.txt
60+
├── mediapipe_holistic_tracking.py
5361
├── palm_detection_full
5462
│   └── 1
5563
│   └── palm_detection_full.tflite
5664
├── pose_detection
5765
│   └── 1
5866
│   └── pose_detection.tflite
59-
── pose_landmark_full
60-
└── 1
61-
└── pose_landmark_full.tflite
62-
63-
67+
── pose_landmark_full
68+
│   └── 1
69+
│   └── pose_landmark_full.tflite
70+
├── README.md
71+
└── requirements.txt
6472
```
6573
## Server Deployment
6674
:::{dropdown} **Deploying with Docker**
@@ -71,6 +79,7 @@ docker pull openvino/model_server:latest
7179

7280
```
7381
```bash
82+
chmod -R 755 .
7483
docker run -d -v $PWD/mediapipe:/mediapipe -v $PWD:/models -p 9000:9000 openvino/model_server:latest --config_path /models/config_holistic.json --port 9000
7584
```
7685
:::

demos/mediapipe/image_classification/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_z
6060
## Server Deployment
6161
:::{dropdown} **Deploying with Docker**
6262
```bash
63+
chmod -R 755 resnetMediapipe
6364
docker run -d -v $PWD:/mediapipe -p 9000:9000 openvino/model_server:latest --config_path /mediapipe/config.json --port 9000
6465
```
6566
:::

demos/mediapipe/object_detection/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ python mediapipe_object_detection.py --download_models
2828
## Server Deployment
2929
:::{dropdown} **Deploying with Docker**
3030
```bash
31+
sed -i 's;ssdlite_object_detection_labelmap.txt;/demo/ssdlite_object_detection_labelmap.txt;g' graph.pbtxt
3132
docker run -d -v $PWD:/demo -p 9000:9000 openvino/model_server:latest --config_path /demo/config.json --port 9000
3233
```
3334
:::

demos/optical_character_recognition/python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Converted east-resnet50 model will have the following interface:
9393
### Text-recognition model
9494
Download [text-recognition](https://github.com/openvinotoolkit/open_model_zoo/tree/2022.1.0/models/intel/text-recognition-0014) model and store it in `${PWD}/text-recognition/1` folder.
9595
```bash
96-
curl -L --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/text-recognition-0014/FP32/text-recognition-0014.bin -o text-recognition/1/model.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/text-recognition-0014/FP32/text-recognition-0014.xml -o text-recognition/1/model.xml
97-
chmod -R 755 text-recognition/
96+
curl -L --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/text-recognition-0014/FP32/text-recognition-0014.bin -o text-recognition/1/model.bin https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/text-recognition-0014/FP32/text-recognition-0014.xml -o text-recognition/1/model.xml
97+
chmod -R 755 text-recognition
9898
```
9999

100100
text-recognition model will have the following interface:

demos/person_vehicle_bike_detection/python/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ The purpose of this demo is to show how to send data from multiple sources (came
1010

1111
## Prepare model files
1212
```console
13-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.bin -o model/1/person-vehicle-bike-detection-crossroad-0078.bin
13+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.bin -o model/1/person-vehicle-bike-detection-crossroad-0078.bin
1414

15-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.xml -o model/1/person-vehicle-bike-detection-crossroad-0078.xml
15+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/person-vehicle-bike-detection-crossroad-0078/FP32/person-vehicle-bike-detection-crossroad-0078.xml -o model/1/person-vehicle-bike-detection-crossroad-0078.xml
1616
```
1717

1818
## Server Deployment
1919
:::{dropdown} **Deploying with Docker**
2020
```bash
21+
chmod -R 755 model
2122
docker run -d -v `pwd`/model:/models -p 9000:9000 openvino/model_server:latest --model_path /models --model_name person-vehicle-detection --port 9000 --shape auto
2223
```
2324
:::

demos/python_demos/Dockerfile.ubuntu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ENV LD_LIBRARY_PATH=/ovms/lib
2020
ENV PYTHONPATH=/ovms/lib/python
2121
RUN apt update && apt install -y python3-pip git
2222
COPY requirements.txt .
23+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
2324
RUN pip3 install -r requirements.txt
2425
USER ovms
2526
ENTRYPOINT [ "/ovms/bin/ovms" ]

demos/single_face_analysis_pipeline/python/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ You can prepare the workspace that contains all the above by just running
3232
You can prepare the workspace that contains all the above by running
3333

3434
```console
35-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -o workspace/age-gender-recognition-retail-0013/1/age-gender-recognition-retail-0013.xml
36-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.bin -o workspace/age-gender-recognition-retail-0013/1/age-gender-recognition-retail-0013.bin
37-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -o workspace/emotions-recognition-retail-0003/1/emotions-recognition-retail-0003.xml
38-
curl --create-dir https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.bin -o workspace/emotions-recognition-retail-0003/1/emotions-recognition-retail-0003.bin
39-
cp config.json workspace/.
35+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -o workspace/age-gender-recognition-retail-0013/1/age-gender-recognition-retail-0013.xml
36+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.bin -o workspace/age-gender-recognition-retail-0013/1/age-gender-recognition-retail-0013.bin
37+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -o workspace/emotions-recognition-retail-0003/1/emotions-recognition-retail-0003.xml
38+
curl --create-dirs https://storage.openvinotoolkit.org/repositories/open_model_zoo/2022.1/models_bin/2/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.bin -o workspace/emotions-recognition-retail-0003/1/emotions-recognition-retail-0003.bin
4039
```
4140

4241
### Final directory structure
@@ -48,7 +47,6 @@ workspace/
4847
│   └── 1
4948
│   ├── age-gender-recognition-retail-0013.bin
5049
│   └── age-gender-recognition-retail-0013.xml
51-
├── config.json
5250
└── emotions-recognition-retail-0003
5351
└── 1
5452
├── emotions-recognition-retail-0003.bin
@@ -58,6 +56,8 @@ workspace/
5856
## Server Deployment
5957
:::{dropdown} **Deploying with Docker**
6058
```bash
59+
cp config.json workspace/.
60+
chmod -R 755 workspace
6161
docker run -p 9000:9000 -d -v ${PWD}/workspace:/workspace openvino/model_server --config_path /workspace/config.json --port 9000
6262
```
6363
:::
@@ -70,6 +70,7 @@ Assuming you have unpacked model server package, make sure to:
7070
as mentioned in [deployment guide](../../../docs/deploying_server_baremetal.md), in every new shell that will start OpenVINO Model Server.
7171
```bat
7272
cd demos\single_face_analysis_pipeline\python
73+
copy config.json workspace
7374
ovms --config_path workspace/config.json --port 9001
7475
```
7576
:::

demos/using_onnx_model/python/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ default: client_preprocessing
2020

2121
client_preprocessing:
2222
# Download ONNX ResNet50 model
23-
curl --fail -L --create-dir https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx -o workspace/resnet50-onnx/1/resnet50-caffe2-v1-9.onnx
23+
curl --fail -L --create-dirs https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx -o workspace/resnet50-onnx/1/resnet50-caffe2-v1-9.onnx
2424

2525
BASE_OS?=ubuntu
2626

2727
server_preprocessing:
2828
# Download ONNX ResNet50 model
29-
curl --fail -L --create-dir https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx -o workspace/resnet50-onnx/1/resnet50-caffe2-v1-9.onnx
29+
curl --fail -L --create-dirs https://github.com/onnx/models/raw/main/validated/vision/classification/resnet/model/resnet50-caffe2-v1-9.onnx -o workspace/resnet50-onnx/1/resnet50-caffe2-v1-9.onnx
3030
# Build custom node
3131
cd ../../../src/custom_nodes && \
3232
make BASE_OS=${BASE_OS} NODES=image_transformation && \

docs/ovms_quickstart.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ docker pull openvino/model_server:latest
5050
Store components of the model in the `model/1` directory. Here are example commands pulling an object detection model from Kaggle:
5151

5252
```console
53-
curl --create-dir https://www.kaggle.com/api/v1/models/tensorflow/faster-rcnn-resnet-v1/tensorFlow2/faster-rcnn-resnet50-v1-640x640/1/download -o model/1/1.tar.gz
54-
tar xzf 1.tar.gz -C model/1
53+
curl -L --create-dirs https://www.kaggle.com/api/v1/models/tensorflow/faster-rcnn-resnet-v1/tensorFlow2/faster-rcnn-resnet50-v1-640x640/1/download -o model/1/1.tar.gz
54+
tar xzf model/1/1.tar.gz -C model/1
5555
```
5656

5757
OpenVINO Model Server expects a particular folder structure for models - in this case `model` directory has the following content:
@@ -73,6 +73,7 @@ For more information about the directory structure and how to deploy multiple mo
7373
### Step 4: Start the Model Server
7474
:::{dropdown} **Deploying with Docker**
7575
```bash
76+
chmod -R 755 model
7677
docker run -d -u $(id -u) --rm -v ${PWD}/model:/model -p 9000:9000 openvino/model_server:latest --model_name faster_rcnn --model_path /model --port 9000
7778
```
7879

third_party/opencv/install_opencv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fi
4242
#===================================================================================================
4343
# OpenCV installation
4444

45-
if [ "$os" == "ubuntu24.04" ] || [ "$os" == "ubuntu22.04" ] ; then
45+
if [ "$os" == "ubuntu24.04" ] || [ "$os" == "ubuntu22.04" ] || [ "$os" == "ubuntu20.04" ] ; then
4646
export DEBIAN_FRONTEND=noninteractive
4747
apt update && apt install -y build-essential git cmake \
4848
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)