Update openvino demo with copy_bom tool
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
This commit is contained in:
		
							parent
							
								
									1f1fd9102b
								
							
						
					
					
						commit
						ae5dd3b313
					
				
							
								
								
									
										19
									
								
								demos/openvino/openvino.yaml
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										19
									
								
								demos/openvino/openvino.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | includes: | ||||||
|  |   - base.yaml | ||||||
|  | # openvino benchmark | ||||||
|  | targets: | ||||||
|  |   # copy benchmark_app | ||||||
|  |   - target: /bin | ||||||
|  |     copy: | ||||||
|  |       - files: | ||||||
|  |         - ../openvino_src/bin/intel64/Release/benchmark_app | ||||||
|  |   # copy plugins.xml | ||||||
|  |   - target: /lib | ||||||
|  |     copy: | ||||||
|  |       - files: | ||||||
|  |         - ../openvino_src/bin/intel64/Release/lib/plugins.xml | ||||||
|  |   # copy models | ||||||
|  |   - target: / | ||||||
|  |     copy: | ||||||
|  |       - files: | ||||||
|  |         - ../model | ||||||
| @ -1,9 +1,10 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| benchmark=benchmark_app | benchmark=benchmark_app | ||||||
| inference_bin=openvino_src/bin/intel64/Release |  | ||||||
| occlum_lib=/usr/local/occlum/x86_64-linux-musl/lib |  | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  | SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||||||
|  | bomfile=${SCRIPT_DIR}/openvino.yaml | ||||||
|  | 
 | ||||||
| # 1. Init Occlum Workspace | # 1. Init Occlum Workspace | ||||||
| rm -rf occlum_instance | rm -rf occlum_instance | ||||||
| mkdir occlum_instance | mkdir occlum_instance | ||||||
| @ -23,27 +24,9 @@ new_json="$(jq '.resource_limits.user_space_size = "320MB" | | |||||||
| echo "${new_json}" > Occlum.json | echo "${new_json}" > Occlum.json | ||||||
| 
 | 
 | ||||||
| # 2. Copy files into Occlum Workspace and Build | # 2. Copy files into Occlum Workspace and Build | ||||||
| cp ../$inference_bin/$benchmark image/bin | rm -rf image | ||||||
| cp ../$inference_bin/lib/libinference_engine.so image/lib | copy_bom -f $bomfile --root image --include-dir /opt/occlum/etc/template | ||||||
| cp ../$inference_bin/lib/libinference_engine_c_api.so image/lib | 
 | ||||||
| cp ../$inference_bin/lib/libformat_reader.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libinference_engine_transformations.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libngraph.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libinference_engine_ir_v7_reader.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libinference_engine_ir_reader.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libMKLDNNPlugin.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libinference_engine_legacy.so image/lib |  | ||||||
| cp ../$inference_bin/lib/libinference_engine_lp_transformations.so image/lib |  | ||||||
| cp ../$inference_bin/lib/plugins.xml image/lib |  | ||||||
| cp $occlum_lib/libopencv_imgcodecs.so.4.1 image/lib |  | ||||||
| cp $occlum_lib/libopencv_imgproc.so.4.1 image/lib |  | ||||||
| cp $occlum_lib/libopencv_core.so.4.1 image/lib |  | ||||||
| cp $occlum_lib/libopencv_videoio.so.4.1 image/lib |  | ||||||
| cp $occlum_lib/libz.so.1 image/lib |  | ||||||
| [ -e $occlum_lib/libtbb.so.2 ] && cp $occlum_lib/libtbb.so.2 image/lib |  | ||||||
| [ -e $occlum_lib/libtbbmalloc.so.2 ] && cp $occlum_lib/libtbbmalloc.so.2 image/lib |  | ||||||
| mkdir image/model |  | ||||||
| cp -r ../model/* image/model |  | ||||||
| occlum build | occlum build | ||||||
| 
 | 
 | ||||||
| # 3. Run benchmark | # 3. Run benchmark | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user