Add ACT PyTorch3D wheel and install guide
Browse files
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
Docker/requirements/ACT/pytorch3d-0.7.8-cp310-cp310-linux_x86_64.whl filter=lfs diff=lfs merge=lfs -text
|
Docker/requirements/ACT/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ACT 环境 PyTorch3D 安装说明
|
| 2 |
+
|
| 3 |
+
这个目录提供 ACT 环境使用的 PyTorch3D 预编译 wheel 包,适合在无法直接使用 Docker 镜像时安装。
|
| 4 |
+
|
| 5 |
+
## 适用环境
|
| 6 |
+
|
| 7 |
+
- Linux x86_64 服务器
|
| 8 |
+
- Python 3.10
|
| 9 |
+
- PyTorch 2.2.2 + CUDA 11.8,也就是 `torch==2.2.2+cu118`
|
| 10 |
+
- NVIDIA GPU 驱动需要支持 CUDA 11.8
|
| 11 |
+
|
| 12 |
+
当前 wheel 文件:
|
| 13 |
+
|
| 14 |
+
```bash
|
| 15 |
+
pytorch3d-0.7.8-cp310-cp310-linux_x86_64.whl
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
校验值:
|
| 19 |
+
|
| 20 |
+
```bash
|
| 21 |
+
sha256: b051237f4b099f2f9644c656d7148722b8db0f6a7d02111f67e55b748ac68352
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
## 下载文件
|
| 25 |
+
|
| 26 |
+
在服务器上安装 Hugging Face CLI:
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
pip install -U huggingface_hub
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
下载 ACT requirements 和 PyTorch3D wheel:
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
hf download MetaAct/robotwin-act \
|
| 36 |
+
--repo-type dataset \
|
| 37 |
+
--include "Docker/requirements/robotwin-act-with-code_h20.requirements.txt" \
|
| 38 |
+
--include "Docker/requirements/ACT/*" \
|
| 39 |
+
--local-dir .
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
下载完成后,文件会在:
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
Docker/requirements/robotwin-act-with-code_h20.requirements.txt
|
| 46 |
+
Docker/requirements/ACT/pytorch3d-0.7.8-cp310-cp310-linux_x86_64.whl
|
| 47 |
+
Docker/requirements/ACT/README.md
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## 安装顺序
|
| 51 |
+
|
| 52 |
+
进入你的 ACT Python 环境,例如:
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
conda activate RoboTwin
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
先安装 ACT 的普通依赖:
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
pip install -r Docker/requirements/robotwin-act-with-code_h20.requirements.txt
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
如果 requirements 里包含 `pytorch3d` 且安装失败,可以先跳过它,最后单独安装下面这个 wheel。
|
| 65 |
+
|
| 66 |
+
安装 PyTorch3D wheel:
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
pip install --no-deps --force-reinstall Docker/requirements/ACT/pytorch3d-0.7.8-cp310-cp310-linux_x86_64.whl
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
`--no-deps` 的作用是只安装 PyTorch3D 本体,不让 pip 自动改动已经装好的 PyTorch/CUDA 相关包。
|
| 73 |
+
|
| 74 |
+
## 验证安装
|
| 75 |
+
|
| 76 |
+
运行:
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
python - <<'PY'
|
| 80 |
+
import torch
|
| 81 |
+
import pytorch3d
|
| 82 |
+
import pytorch3d._C
|
| 83 |
+
from pytorch3d.ops import sample_farthest_points
|
| 84 |
+
|
| 85 |
+
print("torch:", torch.__version__, "cuda:", torch.version.cuda)
|
| 86 |
+
print("pytorch3d:", pytorch3d.__version__)
|
| 87 |
+
print("cuda_available:", torch.cuda.is_available())
|
| 88 |
+
|
| 89 |
+
if torch.cuda.is_available():
|
| 90 |
+
x = torch.rand(1, 128, 3, device="cuda")
|
| 91 |
+
y, idx = sample_farthest_points(x, K=16)
|
| 92 |
+
torch.cuda.synchronize()
|
| 93 |
+
print("pytorch3d cuda op ok:", y.shape, idx.shape)
|
| 94 |
+
PY
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
看到 `pytorch3d cuda op ok` 就说明 PyTorch3D 可以正常使用。
|
| 98 |
+
|
| 99 |
+
## 常见问题
|
| 100 |
+
|
| 101 |
+
如果提示 `No matching distribution found for pytorch3d`,不要直接 `pip install pytorch3d`。PyTorch3D 不是普通纯 Python 包,需要和 Python、PyTorch、CUDA 版本匹配。
|
| 102 |
+
|
| 103 |
+
如果提示 CUDA 版本不一致,先检查:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
python - <<'PY'
|
| 107 |
+
import torch
|
| 108 |
+
print(torch.__version__)
|
| 109 |
+
print(torch.version.cuda)
|
| 110 |
+
PY
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
ACT 当前匹配的是 `torch==2.2.2+cu118`。如果你的环境是 `cu121`、`cu124` 或其他版本,这个 wheel 不一定适用。
|
| 114 |
+
|
| 115 |
+
如果是在 H20 服务器或同类型 GPU 上使用,推荐保持 ACT 环境和这里写的一致。
|
Docker/requirements/ACT/pytorch3d-0.7.8-cp310-cp310-linux_x86_64.whl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b051237f4b099f2f9644c656d7148722b8db0f6a7d02111f67e55b748ac68352
|
| 3 |
+
size 20292863
|