使用工业英特尔® Edge洞见平台(英特尔® EII)在 GPU 上运行安全装备 UDF 样本的快速步骤
运行安全装备 UDF 示例时遇到以下错误:
运行时错误:无法为设备 GPU 创建插件
以下步骤将帮助您在 GPU 上使用工业英特尔® Edge洞见平台(英特尔® EII)设置和运行安全装备用户定义函数 (UDF) 样本。
- 创建 原始配置文件的副本
mv <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoIngestion/config.json <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoIngestion/config.json.bkup
mv <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoAnalytics/config.json <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoAnalytics/config.json.bkup
- 将安全装备 UDF 目录复制到公共目录
cp -r <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/CustomUdfs/PySafetyGearAnalytics/safety_gear <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/common/video/udfs/python
- 将测试视频复制到test_videos目录
cp <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/CustomUdfs/PySafetyGearIngestion/Safety_Full_Hat_and_Vest.avi <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoIngestion/test_videos/Safety_Full_Hat_and_Vest.avi
- 将 附加的配置文件复制到 VideoT摄取 和 VideoAnalytics 目录
cp config-VideoIngestion.json <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoIngestion/config.json
cp config-VideoAnalytics.json <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/VideoAnalytics/config.json - 配置 和 构建 工业边缘洞见
python3 builder.py -f usecases/video-streaming-all-udfs.yml
cd <working_dir>/edge_insights_industrial/Edge_Insights_for_Industrial_2.6.2/IEdgeInsights/build
cd provision && sudo -E ./provision.sh ../docker-compose.yml
cd .. && docker-compose -f docker-compose-build.yml build - 运行 示例
docker-compose up -d
xhost +
显示带有推理结果的视觉意志