CPU Docker 下无法正常运行train.py

用户您好,请详细描述您所遇到的问题,这会帮助我们快速定位问题~

1.芯片型号:例如X3、X3派、J5等

2.天工开物开发包OpenExplorer版本:XJ3_OE_2.5.2

3.问题定位:环境部署

4.问题具体描述:进入CPU Docker之后,运行python3 tools/train.py --step float --config configs/segmentation/unet.py ,

报错:

Traceback (most recent call last):

File “tools/train.py”, line 10, in

import horizon_plugin_pytorch as horizon

ModuleNotFoundError: No module named ‘horizon_plugin_pytorch’

于是运行

root@f3b064b2efe9:/open_explorer/ddk/package/host# bash install.sh --aitoolchain

输出:

horizon_plugin_pytorch-1.4.4+cu111.torch1102-cp38-cp38-linux_x86_64.whl…

WARNING: Requirement ‘horizon_plugin_pytorch-1.4.4+cu111.torch1102-cp38-cp38-linux_x86_64\nhorizon_plugin_pytorch-1.4.4+cu111.torch1102-cp38-cp38-linux_x86_64.whl’ looks like a filename, but the file does not exist

ERROR: horizon_plugin_pytorch-1.4.4+cu111.torch1102-cp38-cp38-linux_x86_64

horizon_plugin_pytorch-1.4.4+cu111.torch1102-cp38-cp38-linux_x86_64.whl is not a valid wheel filename.

Install horizon_torch_samples horizon_torch_samples-1.2.0+openexplore1.6.21-py3-none-any

horizon_torch_samples-1.2.0+openexplore1.6.21-py3-none-any.whl…

WARNING: Requirement ‘horizon_torch_samples-1.2.0+openexplore1.6.21-py3-none-any\nhorizon_torch_samples-1.2.0+openexplore1.6.21-py3-none-any.whl’ looks like a filename, but the file does not exist

ERROR: horizon_torch_samples-1.2.0+openexplore1.6.21-py3-none-any

horizon_torch_samples-1.2.0+openexplore1.6.21-py3-none-any.whl is not a valid wheel filename.

plugin的依赖是cuda11.1,torch 1.10.2,torchvision0.11.3,建议在GPU docker中使用,或者在本地python虚拟环境中安装plugin