
https://github.com/xxlong0/Wonder3D/tree/Wonder3D_Plus 에서 branch 신경써서 가져오기
(Wonder3D++가 아닌 버전을 쓸 경우 신경쓸 필요 없음)
# Wonder3D++
git clone --branch Wonder3D_Plus --single-branch https://github.com/xxlong0/Wonder3D.git
내 환경 버전과 맞춰서 수정이 필요
# 내 환경
Ubuntu 20.04.6 LTS (서버 PC 스펙)
GPU NVIDIA RTX A6000
NVIDIA-SMI 535.183.01
Driver Version: 535.183.01
CUDA Version: 12.2
nvcc release 11.8, V11.8.89
설치 버전은 CUDA 11.8에 맞추고 pytorch 2.6으로 지정함(다른 버전도 되는 게 있을 수 있는데 안해봐서 모름)
설치 막히면 기존에 깔린 torch-scatter 이런거 다 지우고 다시 해보기
conda create -n "환경명" python=3.10
pip install --index-url https://download.pytorch.org/whl/cu118 --force-reinstall --no-cache-dir "torch==2.6.0" "torchvision==0.21.0"
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.6.0+cu118.html
설치했으면 로컬 환경의 pytorch를 쓰지 않도록 경로 맞추기
export CUDA_HOME=/usr/local/cuda-11.8
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
python - <<'PY'
import torch, torch.utils.cpp_extension as e
print("torch:", torch.__version__, "torch.cuda:", torch.version.cuda, "CUDA_HOME:", e.CUDA_HOME)
PY
성공했으면 torch 2.6.0 / torch.cuda 11.8 / CUDA_HOME /usr/local/cuda-11.8 비슷하게 나옴
*혹시 다른 pytorch 버전과 CUDA를 쓰고 있다면 https://data.pyg.org/whl/ 목록 참조해서 버전 바꾸기
https://github.com/facebookresearch/pytorch3d/releases/tag/V0.7.8 릴리즈 파일 다운로드 후 설치된 폴더로 이동
설명한대로 따라왔으면 현재 경로는 /home/.../pytorch3d-0.7.8 에 있어야 정상
우선 빌드 도구 업데이트
python -m pip install -U pip setuptools wheel ninja cmake
그 다음 아래 명령어로 pytorch3d 설치
pip install --no-build-isolation --no-deps .
아래 명령어 실행
git clone https://github.com/NVlabs/nvdiffrast.git
cd nvdiffrast
pip install -e .
numpy가 버전2 넘어가면서 충돌이 많이 남
이거 혹시 설치되어 있으면 지우고 가야 함
pip uninstall -y onnxruntime onnxruntime-gpu numpy
pip install --no-cache-dir "numpy==1.26.4"
pip install --no-cache-dir "onnxruntime-gpu==1.17.0"
아래 코드 복사해서 requirements.txt로 만들어서
pip install -r requirements.txt 실행
diffusers[torch]==0.30.0
transformers>=4.25.1
bitsandbytes==0.35.4
decord==0.6.0
pytorch-lightning<2
omegaconf==2.2.3
nerfacc==0.3.3
trimesh==3.9.8
pyhocon==0.3.57
icecream==2.1.0
accelerate
modelcards
einops
ftfy
piq
matplotlib
opencv-python
imageio
imageio-ffmpeg
scipy
pyransac3d
torch_efficient_distloss
tensorboard
rembg
segment_anything
gradio==3.50.2
mosaicml-streaming
pyrender
jaxtyping
pymeshlab
cholespy
open3d
fire
comet_ml
pip install -U iopath 시도해보기