---
# System prepended metadata

title: Intel VPU on QNAP Linux Station(LXC based)
tags: [Tutorial]

---

###### tags: `Tutorial`

# Intel VPU on QNAP Linux Station(LXC based)

## 環境
* 機種 : TS-2888X
* F/W : QTS 4.4.1.0920
* VPU : 3 * Mustang-V100
* MustangUserDriver v1.1.1(computer_vision_sdk_2018.5.445)
* Linux Station (Ubuntu 16.04)

## 前期設定
1. SSH 進 NAS
2. `cd /share/CACHEDEV1_DATA/.qpkg/MustangUserDriver`
3. `source setup_env.sh`
4. `./hddl/bin/hddldaemon`
5. 另外開個 SSH 視窗連 NAS
6. 修改Linux Station LXC confog - (```vim `/sbin/getcfg ubuntu-hd Install_Path -f /etc/config/qpkg.conf`/lxc/ubuntu_1604/config```)
    
    最後一行加入底下兩行 : 
    ```
    lxc.mount.entry = /dev/ion dev/ion none bind,optional,create=file
    lxc.mount.entry = /var/tmp var/tmp none bind,optional,create=dir
    ```
6. `chmod 777 /var/tmp/hddl_*`
7. `chmod 777 /dev/ion`
8. 進入Linux Station 安裝 openvino(openvino_2019.1.133)

## 錯誤狀況
參考"Install Intel® Distribution of OpenVINO™ toolkit for Linux" 對安裝進行驗證 
https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html

1. 使用下列command轉換模型產生 squeezenet1.1_FP16 .xml and .bin 檔案
```
python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo.py --input_model /home/<user>/openvino_models/models/FP32/classification/squeezenet/1.1/caffe/squeezenet1.1.caffemodel --data_type FP16 --output_dir .
```
2. 　./classification_sample -h
![](https://i.imgur.com/lw5N4xD.png)

3. 使用下列command line
```
./classification_sample -i car.png -m ./squeezenet1.1_FP16/squeezenet1.1.xml -d HDDL
```

4.之後會產生freeze直到timeout
![](https://i.imgur.com/i38c3xX.png)

![](https://i.imgur.com/xo5suUx.png)



