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
pytorch3d
Commits
b614e663
Commit
b614e663
authored
Mar 26, 2024
by
sangwz
Browse files
update readme
parent
d8362053
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
51 deletions
+54
-51
README.md
README.md
+54
-51
No files found.
README.md
View file @
b614e663
...
@@ -2,18 +2,27 @@
...
@@ -2,18 +2,27 @@
**PyTorch3D**
是一个用于深度学习中处理
**3D数据**
的库。它提供了一系列功能,方便处理和操作三维数据,
**PyTorch3D**
是一个用于深度学习中处理
**3D数据**
的库。它提供了一系列功能,方便处理和操作三维数据,
##
环境依赖
##
安装
环境以及版本依赖
:
组件支持
:
*
Python 3.8,3.9 or 3.10
*
Python 3.8,3.9 or 3.10
-
dtk-23.10
-
dtk-23.10
-
pytorch-2.1
-
pytorch-2.1
## 安装
### 1. pip安装
可以在光合
[
光合开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
AI 生态包中获取最新的
`pytorch3d`
版本,注意应与DCU Toolkit版本以及pytorch版本对应
```
shell
wget http://10.6.10.68:8000/customized/pytorch3d/23.10/pytorch3d-0.7.6-cp38-cp38-linux_x86_64.whl
python
-m
pip
install
pytorch3d-0.7.6-cp38-cp38-linux_x86_64.whl
```
### 2. 源码编译安装
###
环境准备
###
#
环境准备
*
在
[
开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
DCU Toolkit 中下载 DTK-23.10 解压至 /opt/ 路径下,并建立软链接
*
在
[
开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
DCU Toolkit 中下载 DTK-23.10 解压至 /opt/ 路径下,并建立软链接
...
@@ -21,39 +30,26 @@
...
@@ -21,39 +30,26 @@
cd /opt && ln -s dtk-23.10 dtk
cd /opt && ln -s dtk-23.10 dtk
```
```
*
在光合
[
光合开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
AI 生态包中获取对应的 pytorch
Release
版本(需对应 DCU Toolkit
版本与 python
版本)
*
在光合
[
光合开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
AI 生态包中获取对应的 pytorch
-2.1
版本(需对应 DCU Toolkit 版本)
```
shell
```
shell
wget https://cancon.hpccube.com:65024/directlink/4/pytorch/dtk23.10/torch-2.1.0a0+git793d2b5.abi0.dtk2310-cp38-cp38-manylinux2014_x86_64.whl
cd
path/to/torch
python3
-m
pip
install
torch
*
python3
-m
pip
install
torch-2.1xxxx.whl
```
```
*
导入环境变量以及安装必要依赖库
*
导入环境变量以及安装必要依赖库
```
shell
```
shell
source
/opt/dtk/env.sh
source
/opt/dtk/env.sh
pip3
install
wheel
-i
https://pypi.tuna.tsinghua.edu.cn/simple
--trusted-host
pypi.tuna.tsinghua.edu.cn
pip3
install
wheel
-i
https://pypi.tuna.tsinghua.edu.cn/simple
--trusted-host
pypi.tuna.tsinghua.edu.cn
```
```
### pip安装
#### 编译安装
可以在光合
[
光合开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
AI 生态包中获取最新的
`pytorch3d`
Release 版本.
```
shell
wget http://10.6.10.68:8000/customized/pytorch3d/23.10/pytorch3d-0.7.6-cp38-cp38-linux_x86_64.whl
python
-m
pip
install
pytorch3d-0.7.6-cp38-cp38-linux_x86_64.whl.whl
```
### 编译安装
*
拉取代码
*
拉取代码
```
shell
```
shell
git clone http://developer.hpccube.com/codes/aicomponent/pytorch3d.git
git clone http://developer.hpccube.com/codes/aicomponent/pytorch3d.git
#注意根据需要切换分支
```
```
*
若使用
`GPU`
支持,需要设置环境变量
`FORCE_CUDA`
为1
*
若使用
`GPU`
支持,需要设置环境变量
`FORCE_CUDA`
为1
...
@@ -69,32 +65,39 @@ python -m pip install pytorch3d-0.7.6-cp38-cp38-linux_x86_64.whl.whl
...
@@ -69,32 +65,39 @@ python -m pip install pytorch3d-0.7.6-cp38-cp38-linux_x86_64.whl.whl
pip
install
-e
.
pip
install
-e
.
```
```
*
当编译出现错误时,参考以下说明:
#### 注意事项
当出现错误时,参考以下说明:
*
报错提示缺少
`intel-mkl`
相关库,应安装
`intel-mkl`
*
报错提示缺少
`intel-mkl`
相关库,应安装
`intel-mkl`
或 添加库的路径到环境变量
```
shell
```
shell
#安装
yum-config-manager
--add-repo
https://yum.repos.intel.com/mkl/setup/intel-mkl.repo
yum-config-manager
--add-repo
https://yum.repos.intel.com/mkl/setup/intel-mkl.repo
yum
install
intel-mkl-2020.0-088
-y
--nogpgchec
yum
install
intel-mkl-2020.0-088
-y
--nogpgchec
# 将库路径添加到环境变量中
# 将库路径添加到环境变量中
export
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:/opt/intel/mkl/lib/intel64
export
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:/opt/intel/mkl/lib/intel64
```
```
*
缺少
`magma`
时,安装对应库
*
缺少
`magma`
时,安装对应库
或添加环境变量
```
shell
```
shell
# 默认dtk安装路径为 /opt/dtk
# 默认dtk安装路径为 /opt/dtk
cd
/opt/dtk
cd
/opt/dtk
#安装
wget http://10.6.10.68:8000/debug/pytorch/third_party/magma_v2.7.2-hip_nfs3.2_DTK23.10_intel-2020.1.217_07Oct2023.tar.gz
wget http://10.6.10.68:8000/debug/pytorch/third_party/magma_v2.7.2-hip_nfs3.2_DTK23.10_intel-2020.1.217_07Oct2023.tar.gz
tar
-zxf
magma_v2.7.2-hip_nfs3.2_DTK23.10_intel-2020.1.217_07Oct2023.tar.gz
tar
-zxf
magma_v2.7.2-hip_nfs3.2_DTK23.10_intel-2020.1.217_07Oct2023.tar.gz
mv
magma_v2.7.2-hip_nfs3.2_DTK23.10_intel-2020.1.217_07Oct2023 magma
mv
magma_v2.7.2-hip_nfs3.2_DTK23.10_intel-2020.1.217_07Oct2023 magma
cd magma/lib/
# 添加环境变量
# 添加环境变量
export
LD_LIBRARY_PATH
=
${
ROCM_PATH
}
/magma/lib:
$LD_LIBRARY_PATH
export
LD_LIBRARY_PATH
=
${
ROCM_PATH
}
/magma/lib:
$LD_LIBRARY_PATH
```
```
## 验证
*
python -c "import pytorch3d; pytorch3d.
\_\_
version__",版本号与官方版本同步,查询该软件的版本号。
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