我试图在macOS上运行Movidius macOS。在macOS上使用NCSDK需要VirtualBox +接口,因为这个USB必须在Ubuntu16.04上运行,并且它支持Tensorflow和Caffe。我已经成功地使用这个Dockerfile编译了码头上的NCSDK。然后,我创建了一个docker-machine,并像往常一样附加到virtualbox:
$ docker-machine create --driver virtualbox linux
$ eval $(docker-machine env linux)
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
linux * virtualbox Running tcp://192.168.99.100:2376 v17.12.1-ce
$ docker-machine env linux
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/loretoparisi/.docker/machine/machines/linux"
export DOCKER_MACHINE_NAME="linux"
# Run this command to configure your shell:
# eval $(docker-machine env linux)我已经将设备插入VirtualBox,所以当运行docker映像时,如下所示
docker run --rm -it movidius bash我能看到连接的设备:
movidius@macos:~/ncsdk/examples/apps/hello_ncs_cpp$ lsusb
Bus 001 Device 005: ID 03e7:2150
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub其中03e7是Intel设备,正如linux设备is列表这里中所期望的那样。
03e7 Intel
2150 Myriad VPU [Movidius Neural Compute Stick]所以我应该去做和跑:
cd examples/apps/hello_ncs_cpp/ \
make hello_ncs_cpp \
make run但我得到
cd cpp; ./hello_ncs_cpp; cd ..
Error - Could not open NCS device.
mvncStatus value: -6在尝试python示例时,我得到了相同的错误
movidius@macos:~/ncsdk/examples/apps/hello_ncs_py$ python hello_ncs.py
Error - Could not open NCS device.查看python代码,我可以看到设备已被正确枚举:
# get a list of names for all the devices plugged into the system
ncs_names = fx.EnumerateDevices()
if (len(ncs_names) < 1):
print("Error - no NCS devices detected, verify an NCS device is connected.")
quit()
# get the first NCS device by its name. For this program we will always open the first NCS device.
dev = fx.Device(ncs_names[0])
print(ncs_names[0])因为我可以看到1作为设备名称。打印我得到的dev.OpenDevice() api的错误堆栈跟踪:
mvncStatus.ERROR
Traceback (most recent call last):
File "hello_ncs.py", line 43, in <module>
dev.OpenDevice()
File "/usr/local/lib/python2.7/dist-packages/mvnc/mvncapi.py", line 147, in OpenDevice
raise Exception(Status(status))
Exception: mvncStatus.ERROR
Error - Could not open NCS device.我还尝试使用docker选项--device附加设备,但没有成功地尝试如下:
docker run --rm -it --net=host --privileged --device=/dev/usb/hiddev4正如所描述的这里。
更新我知道最新版本的Microsoft和MicrosoftSurface膝上存在相同的驱动程序问题。
发布于 2018-04-27 11:35:32
在Docker容器中,必须以根用户而不是普通用户的身份运行make run。原因是Docker不支持udev/udevadm服务,因此只有root才能访问usb设备。
发布于 2018-04-23 05:16:59
查看是否可以通过以下线程解决问题:https://ncsforum.movidius.com/discussion/140/mac-os-x
请参考Ramana.rachakonda的第8点:“仅当连接到我所拥有的USB集线器上的USB2端口时才有效,而不是在连接到USB3端口时才起作用。如果只有USB3端口,请尝试用USB2扩展电缆连接棒”。
https://stackoverflow.com/questions/49181354
复制相似问题