NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to run this on 3090GPU+pytorch1.7.1+tensorflof1.15.0+pytorch3d?

changfali opened this issue · comments

Hello,
I'm trying to run this repository, which need the environment:
C29qcAA52z
But I only have a 3090GPU, is it possible to make it work?

I try to build that environment on 2070super, but I get an error when run that project, the error is same as the one on 3090:
Traceback (most recent call last):
File "step2_fit_processed_data.py", line 63, in
fit_model.fitting(input_data=input_data, logger=logger)
File "/home/ofmgr/ffhquv/RGB_Fitting/model/ours_fit_model.py", line 241, in fitting
self.infer_render(is_uv_tex=False)
File "/home/ofmgr/ffhquv/RGB_Fitting/model/ours_fit_model.py", line 142, in infer_render
self.renderer(self.pred_vertex, self.facemodel.face_buf, feat=self.pred_color)
File "/home/ofmgr/.conda/envs/ffhquv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/ofmgr/ffhquv/RGB_Fitting/model/renderer_nvdiffrast.py", line 47, in forward
self.ctx = dr.RasterizeCudaContext(device=device)
File "/home/ofmgr/ffhquv/thirdparty/nvdiffrast/nvdiffrast/torch/ops.py", line 177, in init
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
File "/home/ofmgr/ffhquv/thirdparty/nvdiffrast/nvdiffrast/torch/ops.py", line 118, in _get_plugin
torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
File "/home/ofmgr/.conda/envs/ffhquv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 997, in load
keep_intermediates=keep_intermediates)
File "/home/ofmgr/.conda/envs/ffhquv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1202, in _jit_compile
with_cuda=with_cuda)
File "/home/ofmgr/.conda/envs/ffhquv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1279, in _write_ninja_file_and_build_library
verbose)
File "/home/ofmgr/.conda/envs/ffhquv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1369, in _prepare_ldflags
extra_ldflags.append('-L{}'.format(_join_cuda_home('lib64')))
File "/home/ofmgr/.conda/envs/ffhquv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1827, in _join_cuda_home
raise EnvironmentError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

Pip list:
Package Version Location


absl-py 1.4.0
astor 0.8.1
cached-property 1.5.2
cachetools 4.2.4
certifi 2021.5.30
charset-normalizer 2.0.12
click 8.0.4
contextvars 2.4
cycler 0.11.0
dataclasses 0.8
decorator 4.4.2
dlib 19.24.2
dominate 2.9.1
Flask 2.0.3
fvcore 0.1.6 /home/ofmgr/ffhquv/thirdparty/fvcore
gast 0.2.2
google-auth 2.22.0
google-auth-oauthlib 0.4.6
google-pasta 0.2.0
graphviz 0.8.4
grpcio 1.48.2
h5py 3.1.0
idna 3.6
imageio 2.15.0
imageio-ffmpeg 0.4.3
immutables 0.19
importlib-metadata 4.8.3
importlib-resources 5.4.0
iopath 0.1.10 /home/ofmgr/ffhquv/thirdparty/iopath
itsdangerous 2.0.1
Jinja2 3.0.3
joblib 1.1.1
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
kiwisolver 1.3.1
kornia 0.2.0
lmdb 1.4.1
Markdown 3.3.7
MarkupSafe 2.0.1
matplotlib 3.3.4
mxnet 1.9.1
networkx 2.5.1
ninja 1.11.1.1
numpy 1.19.5
nvdiffrast 0.3.1 /home/ofmgr/ffhquv/thirdparty/nvdiffrast
oauthlib 3.2.2
opencv-python 4.5.1.48
opt-einsum 3.3.0
Pillow 8.4.0
pip 21.2.2
portalocker 2.7.0
protobuf 3.19.6
psutil 5.9.7
pyasn1 0.5.1
pyasn1-modules 0.3.0
pyparsing 3.1.1
pyspng 0.1.1
python-dateutil 2.8.2
pytorch3d 0.6.1 /home/ofmgr/ffhquv/thirdparty/pytorch3d-0.6.1
PyWavelets 1.1.1
PyYAML 6.0.1
requests 2.27.1
requests-oauthlib 1.3.1
rsa 4.9
Rtree 0.9.7
scikit-image 0.17.2
scikit-learn 0.24.2
scipy 1.5.4
setuptools 58.0.4
six 1.16.0
tabulate 0.8.10
tensorboard 1.15.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorflow-estimator 1.15.1
tensorflow-gpu 1.15.0
termcolor 1.1.0
threadpoolctl 3.1.0
tifffile 2020.9.3
torch 1.7.1
torchaudio 0.7.2
torchdiffeq 0.0.1
torchvision 0.8.2
tqdm 4.64.1
typing_extensions 4.1.1
urllib3 1.26.18
Werkzeug 2.0.3
wheel 0.37.1
wrapt 1.16.0
yacs 0.1.8
zipp 3.6.0

Could you help me with it?

Based on the error message, it looks like you don't have Cuda properly installed. We unfortunately cannot provide personal tech support here for setting up the execution environment.

Closing as out of scope.