Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
detectron2
Commits
eadd775b
"...kernels/git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "a8ce8d27351a4d6e977f7b0dd486ef66811bbac0"
Commit
eadd775b
authored
May 28, 2025
by
limm
Browse files
updated README.md support for fastpt compilation
parent
bcc07308
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
README.md
README.md
+13
-10
No files found.
README.md
View file @
eadd775b
...
...
@@ -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
```
-
在首页 | 光合开发者社区下载 dtk2
4
.04 解压在 /opt/ 路径下,并建立软连接,例如:
在
[
开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
DCU Toolkit 中下载 DTK-2
4
.04 解压至 /opt/ 路径下,并建立软链接
-
在首页 | 光合开发者社区下载 dtk2
5
.04 解压在 /opt/ 路径下,并建立软连接,例如:
在
[
开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
DCU Toolkit 中下载 DTK-2
5
.04 解压至 /opt/ 路径下,并建立软链接
```
cd /opt && ln -s dtk-2
4
.04 dtk
cd /opt && ln -s dtk-2
5
.04 dtk
```
-
安装pytorch. fastpt whl包下载目录:
[
开发者社区
](
https://das.sourcefind.cn:55011/portal/#/home
)
. 根据需求下载对应的版本,
以torch whl包为例
[
http
s
://
download.sourcefind.cn:65024/file/4/pytorch/DAS1.5/torch-2.4.1+das.opt2.dtk2504-cp310-cp310-manylinux_2_28_x86_64.whl
](
http
s
://
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*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment