|
1 | 1 |
|
2 | 2 | [English](./README.md) | 简体中文 |
3 | | -#Ubuntu* 18.04和Ubuntu* 20.04 Docker文件 |
| 3 | +# **OpenVINO™ integration with TensorFlow Runtime** Docker文件 Ubuntu* 18.04和Ubuntu* 20.04 |
4 | 4 |
|
5 | 5 |
|
6 | 6 | 我们提供Ubuntu* 18.04和Ubuntu* 20.04 Dockerfiles, 可用来构建用于CPU、GPU、VPU和VAD-M上**OpenVINO™ integration with TensorFlow**的运行时Docker*图像。 |
7 | 7 | 它们包含所有运行时python所需安装包及共享库,以支持使用OpenVINO™后端执行TensorFlow Python应用程序。默认条件下,它可托管一个Jupyter服务器,该服务器附带Image Classification及演示在CPU上使用OpenVINO™ integration with TensorFlow的性能优势的Object Detection示例。 |
8 | 8 |
|
| 9 | +以下 ARGS 可用于配置 docker build |
| 10 | + |
| 11 | +TF_VERSION:要使用的 TensorFlow 版本。默认为“v2.9.1” |
| 12 | +OPENVINO_VERSION:要使用的 OpenVINO 版本。默认为“2022.1.0” |
| 13 | +OVTF_BRANCH:要使用的 OpenVINO™ integration with TensorFlow 分支。默认为“releases/2.1.0” |
| 14 | + |
9 | 15 | 构建docker镜像 |
10 | 16 |
|
11 | | - docker build -t openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 - < ubuntu20/openvino_tensorflow_cgvh_runtime_2.0.0.dockerfile |
| 17 | + docker build -t openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 - < ubuntu20/openvino_tensorflow_cgvh_runtime_2.1.0.dockerfile |
12 | 18 | 启动可访问**CPU**的Jupyter服务器: |
13 | 19 |
|
14 | 20 | docker run -it --rm \ |
15 | 21 | -p 8888:8888 \ |
16 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 |
| 22 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 |
17 | 23 |
|
18 | 24 | 启动可访问**iGPU**的Jupyter服务器: |
19 | 25 |
|
20 | 26 | docker run -it --rm \ |
21 | 27 | -p 8888:8888 \ |
22 | 28 | --device-cgroup-rule='c 189:* rmw' \ |
23 | 29 | --device /dev/dri:/dev/dri \ |
24 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 |
| 30 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 |
25 | 31 |
|
26 | 32 |
|
27 | 33 | 启动可访问**MYRIAD**的Jupyter服务器: |
|
30 | 36 | -p 8888:8888 \ |
31 | 37 | --device-cgroup-rule='c 189:* rmw' \ |
32 | 38 | -v /dev/bus/usb:/dev/bus/usb \ |
33 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 |
| 39 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 |
34 | 40 |
|
35 | 41 | 启动可访问**VAD-M**的Jupyter服务器: |
36 | 42 |
|
|
40 | 46 | --mount type=bind,source=/var/tmp,destination=/var/tmp \ |
41 | 47 | --device /dev/ion:/dev/ion \ |
42 | 48 | -v /dev/bus/usb:/dev/bus/usb \ |
43 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 |
| 49 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 |
44 | 50 |
|
45 | 51 | 启动可以访问“所有“计算单元的容器,并通过/bin/bash 提供容器shell访问: |
46 | 52 |
|
|
50 | 56 | --device /dev/dri:/dev/dri \ |
51 | 57 | --mount type=bind,source=/var/tmp,destination=/var/tmp \ |
52 | 58 | -v /dev/bus/usb:/dev/bus/usb \ |
53 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 /bin/bash |
| 59 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 /bin/bash |
54 | 60 |
|
55 | 61 | 如果在英特尔第10和11代设备iGPU上执行失败, 请设定docker构建参数INTEL_OPENCL为20.35.17767 |
56 | 62 |
|
57 | | - docker build -t openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0 --build-arg INTEL_OPENCL=20.35.17767 - < ubuntu20/openvino_tensorflow_cgvh_runtime_2.0.0.dockerfile |
| 63 | + docker build -t openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0 --build-arg INTEL_OPENCL=20.35.17767 - < ubuntu20/openvino_tensorflow_cgvh_runtime_2.1.0.dockerfile |
58 | 64 |
|
59 | 65 | # Dockerfiles for [TF-Serving](#https://github.com/tensorflow/serving) with OpenVINO<sup>TM</sup> integration with Tensorflow |
60 | 66 |
|
| 67 | +The TF Serving dockerfile requires the **OpenVINO™ integration with TensorFlow Runtime** image to be built. Refer to the section above for instructions on building it. |
| 68 | + |
| 69 | +以下 ARGS 可用于配置 docker build |
| 70 | + |
| 71 | +TF_SERVING_VERSION: 用于构建模型服务可执行文件的 TF Serving 映像的标记。默认为“v2.9.0” |
| 72 | +OVTF_VERSION: 要使用的 **OpenVINO™ integration with TensorFlow Runtime** 集成图像的标签。认为"2.1.0" |
| 73 | + |
61 | 74 | 构建服务docker镜像: |
62 | | -1. 构建运行时docker镜像。该docker文件可构建OpenVINO<sup>TM</sup> integration with Tensorflow运行时镜像并在上面安装tensorflow模型服务器二进制文件。 |
| 75 | +1. 该docker文件可构建OpenVINO<sup>TM</sup> integration with Tensorflow运行时镜像并在上面安装tensorflow模型服务器二进制文件。 |
63 | 76 |
|
64 | | - docker build -t openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0-serving -f ubuntu20/openvino_tensorflow_cgvh_runtime_2.0.0-serving.dockerfile . |
| 77 | + docker build -t openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0-serving -f ubuntu20/openvino_tensorflow_cgvh_runtime_2.1.0-serving.dockerfile . |
65 | 78 |
|
66 | 79 | 此处为Resnet50模型使用OpenVINO Integration with Tensorflow实例,提供了REST API相关客户端脚本。 |
67 | 80 |
|
|
75 | 88 | -p 8501:8501 \ |
76 | 89 | -v <path to resnet_v2_50_classifiation>:/models/resnet \ |
77 | 90 | -e MODEL_NAME=resnet \ |
78 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0-serving |
| 91 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0-serving |
79 | 92 |
|
80 | 93 | 在**iGPU**上运行: |
81 | 94 |
|
|
86 | 99 | -v <path to resnet_v2_50_classifiation>:/models/resnet \ |
87 | 100 | -e MODEL_NAME=resnet \ |
88 | 101 | -e OPENVINO_TF_BACKEND=GPU \ |
89 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0-serving |
| 102 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0-serving |
90 | 103 |
|
91 | 104 | 在**MYRIAD**上运行: |
92 | 105 |
|
|
97 | 110 | -v <path to resnet_v2_50_classifiation>:/models/resnet \ |
98 | 111 | -e MODEL_NAME=resnet \ |
99 | 112 | -e OPENVINO_TF_BACKEND=MYRIAD \ |
100 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0-serving |
| 113 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0-serving |
101 | 114 |
|
102 | 115 | 在**MYRIAD**上运行: |
103 | 116 |
|
|
110 | 123 | -v <path to resnet_v2_50_classifiation>:/models/resnet \ |
111 | 124 | -e OPENVINO_TF_BACKEND=VAD-M \ |
112 | 125 | -e MODEL_NAME=resnet \ |
113 | | - openvino/openvino_tensorflow_ubuntu20_runtime:2.0.0-serving |
| 126 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0-serving |
114 | 127 |
|
115 | 128 | 3. 运行脚本从客户端发送推理请求并从服务器获取预测。 |
116 | 129 | wget https://raw.githubusercontent.com/tensorflow/serving/master/tensorflow_serving/example/resnet_client.py |
117 | 130 | python resnet_client.py |
118 | 131 |
|
| 132 | +在执行 **OpenVINO™ integration with TensorFlow** 集成时应用的所有相关环境变量在通过容器运行时也适用。例如,要在启动 TensorFlow Serving 容器时禁用 **OpenVINO™ integration with TensorFlow 的集成**,只需提供 OPENVINO_TF_DISABLE=1 作为 `docker run` 命令的环境变量之一。有关更多此类环境变量,请参见 [USAGE.md](../docs/USAGE_cn.md)。 |
| 133 | + |
| 134 | + |
| 135 | + docker run -it --rm \ |
| 136 | + -p 8501:8501 \ |
| 137 | + -v <path to resnet_v2_50_classifiation>:/models/resnet \ |
| 138 | + -e MODEL_NAME=resnet \ |
| 139 | + -e OPENVINO_TF_DISABLE=1 \ |
| 140 | + openvino/openvino_tensorflow_ubuntu20_runtime:2.1.0-serving |
| 141 | + |
119 | 142 | # 预构建镜像 |
120 | 143 |
|
121 | 144 | - [Ubuntu18 runtime image on Docker* Hub](https://hub.docker.com/r/openvino/openvino_tensorflow_ubuntu18_runtime) |
|
0 commit comments