# On Linux

​**用户需要基于比特大陆提供的docker进行开发**，docker中已安装交叉编译环境，及开发工具依赖的库和软件。

**1. PCIE环境驱动安装卸载：**

```
Note:如果用户有比特大陆pcie卡，则需要按照如下方式进行驱动安装。
$ cd bmnnsdk2-bm1684_v2.0.1/scripts
$ sudo ./install_driver_pcie.sh
```

**2. PCIE驱动卸载方式如下：**

```
Note:如果用户有比特大陆pcie卡，则需要按照如下方式进行驱动卸载。
$ sudo./remove_driver_pcie.sh
```

**3. docker安装：**

```
$ sudo apt-get install docker.io
$ sudo usermod -aG docker $USER​ 
```

{% hint style="info" %}
提示：需要logout系统然后重新登录，再使用docker就不需要sudo了。
{% endhint %}

**4. 加载docker镜像**

```
$ docker load -i bmnnsdk2-bm1684_v2.0.1.docker
```

**5. 运行docker 镜像**

```
$ tar zxvf bmnnsdk2-bm1684_v2.0.1.tar.gz
$ cd bmnnsdk2-bm1684_v2.0.1
$ ./docker_run_bmnnsdk.sh
```

**6. 交叉编译环境验证：**

```
# cd  /workspace/scripts/
# ./install_lib.sh nntc
# cd /workspace/examples/SSD_object/cpp_cv_bmcv_bmrt/
# make -f Makefile.arm
```

​ 如果编译通过说明交叉编译工具链正确，开发环境是可以正确使用的。

**7. 模型转换工具安装及环境配置**

```
# cd  /workspace/scripts/
# source envsetup_cmodel.sh
```

bmnetc，bmnett，bmnetp，bmnetm，bmnetu模型转换工具及量化工具的环境配置已完成，关于工具使用的详细信息请阅读 [第3章节](/bmnnsdk2-1684-2-0-1/wang-luo-mo-xing-bian-yi/gai-shu.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://1684.gitbook.io/bmnnsdk2-1684-2-0-1/on-linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
