Commit eadd775b authored by limm's avatar limm
Browse files

updated README.md support for fastpt compilation

parent bcc07308
......@@ -21,36 +21,39 @@ Detectron2 是 Facebook AI Research 的下一代软件系统实现最先进的
pip install numpy
pip install 'urllib3==1.26.14'
pip install wheel
pip install opencv-python
```
- 拉取 detectron2 代码
```
git clone -b v0.6-release http://developer.hpccube.com/codes/OpenDAS/detectron2.git
git clone -b v0.6-fastpt http://developer.hpccube.com/codes/OpenDAS/detectron2.git
```
- 在首页 | 光合开发者社区下载 dtk24.04 解压在 /opt/ 路径下,并建立软连接,例如:
[开发者社区](https://developer.hpccube.com/tool/#sdk) DCU Toolkit 中下载 DTK-24.04 解压至 /opt/ 路径下,并建立软链接
- 在首页 | 光合开发者社区下载 dtk25.04 解压在 /opt/ 路径下,并建立软连接,例如:
[开发者社区](https://developer.hpccube.com/tool/#sdk) DCU Toolkit 中下载 DTK-25.04 解压至 /opt/ 路径下,并建立软链接
```
cd /opt && ln -s dtk-24.04 dtk
cd /opt && ln -s dtk-25.04 dtk
```
- 安装pytorch. fastpt whl包下载目录: [开发者社区](https://das.sourcefind.cn:55011/portal/#/home). 根据需求下载对应的版本,
以torch whl包为例[https://download.sourcefind.cn:65024/file/4/pytorch/DAS1.5/torch-2.4.1+das.opt2.dtk2504-cp310-cp310-manylinux_2_28_x86_64.whl](https://download.sourcefind.cn:65024/file/4/pytorch/DAS1.5/torch-2.4.1+das.opt2.dtk2504-cp310-cp310-manylinux_2_28_x86_64.whl)只提供例子,具体需要根据环境安装不同的whl包 安装如下:
以torch whl包为例[http://10.16.4.1:8000/debug/pytorch/dtk25.04/](http://10.16.4.1:8000/debug/pytorch/dtk25.04/)只提供例子,具体需要根据环境安装不同的whl包 安装如下:
```shell
pip install torch* (下载的torch的whl包)
pip install fastpt* (下载的fastpt的whl包,fastpt包安装在torch包后面)
```
#### 源码编译
- 方案一 (优先推荐方案一)
```shell
export FORCE_CUDA=1
export USE_FASTPT_CUDA=1 或者 export USE_FASTPT_CUDA=True (不同版本设置不同,第一种无效用第二种)
source /usr/local/bin/fastpt -C
```
- 方案一 (优先推荐方案一)
```shell
python -m pip install -e detectron2 或者 cd detectron2 && pip install -e .
```
- 方案二
- 方案二, 编译whl包
```
export FORCE_CUDA=1
export USE_FASTPT_CUDA=1
cd detectron2
python setup.py install --user bdist_wheel
pip install dist/detectron2*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment