NVlabs / nvdiffmodeling

Differentiable rasterization applied to 3D model simplification tasks
Other
455 stars 30 forks source link

Proposition for more comprehensive Readme #6

Closed morph3us-net closed 2 years ago

morph3us-net commented 2 years ago

First of all, thank you for making this freely available for everyone! This is really a great move!

I wanted to suggest a few things for the readme: 1.) Add "Microsoft Visual C++" to the requirements. It should be clear that you have to tick the C++ development environment while installing VS2019.

2.) Install Git via "conda install git" (This makes it easier to install nvdiffrast and clone the repo)

3.) Change "Install NVDiffRast" to something more descriptive: pip install -e git+https://github.com/NVlabs/nvdiffrast.git@main#egg=nvdiffrast

4.) Add another step to the installation, detailing to move to a desired folder via the Anaconda Prompt and cloning this repo: cd YOUR/PATH/HERE git clone https://github.com/NVlabs/nvdiffmodeling.git and afterwards to move into the folder cd nvdiffmodeling

5.) Installing CUDA via Anaconda only deploys the bare essential files. The CUDA path is not set when doing it this way. So I downloaded the CUDA toolkit from nvidia and installed it afterwards, to fix that.

I am sure that all of these things are obvious for professionals, but it took me a while to figure all of this out, so I would like to save other people's time.

ModernTrips commented 2 years ago

a requirements.txt to install the (partly not bespoken) dependencies and/or add in longer prompts like the ones above would be very helpful.

and of course thanks for the work already spent on this project, i hope there will be more windows implementations for neural style transfer, giving some more options besides google colab and / or a full dualboot situation. best regards!

jmunkberg commented 2 years ago

Thanks for you feedback! We have updated the readme with some of the suggestions above in https://github.com/NVlabs/nvdiffmodeling/commit/955fcc03662545efd041129b1d27e0b3a898f8a3

1LOVESJohnny commented 2 years ago

First of all, thank you for making this freely available for everyone! This is really a great move!

I wanted to suggest a few things for the readme: 1.) Add "Microsoft Visual C++" to the requirements. It should be clear that you have to tick the C++ development environment while installing VS2019.

2.) Install Git via "conda install git" (This makes it easier to install nvdiffrast and clone the repo)

3.) Change "Install NVDiffRast" to something more descriptive: pip install -e git+https://github.com/NVlabs/nvdiffrast.git@main#egg=nvdiffrast

4.) Add another step to the installation, detailing to move to a desired folder via the Anaconda Prompt and cloning this repo: cd YOUR/PATH/HERE git clone https://github.com/NVlabs/nvdiffmodeling.git and afterwards to move into the folder cd nvdiffmodeling

5.) Installing CUDA via Anaconda only deploys the bare essential files. The CUDA path is not set when doing it this way. So I downloaded the CUDA toolkit from nvidia and installed it afterwards, to fix that.

I am sure that all of these things are obvious for professionals, but it took me a while to figure all of this out, so I would like to save other people's time.

Hi @morph3us-net, I met the same problem of CUDA runtime error when I set up a conda environment in Windows. Could you please share the details of installing CUDA into a conda environment? Expect for your reply :)

JHnvidia commented 2 years ago

Hi @1LOVESJohnny. It's not advisable to install CUDA through conda. What you should do is to (manually) download and run the CUDA windows installer from https://developer.nvidia.com/cuda-downloads. Preferably make sure that Microsoft Visual C++ is installed prior to installing CUDA.

Hope this helps.

1LOVESJohnny commented 2 years ago

Hi @1LOVESJohnny. It's not advisable to install CUDA through conda. What you should do is to (manually) download and run the CUDA windows installer from https://developer.nvidia.com/cuda-downloads. Preferably make sure that Microsoft Visual C++ is installed prior to installing CUDA.

Hope this helps.

Hi @JHnvidia. Thanks for your reply! Now I've installed CUDA in my local environment. But I got this error still: "No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5'"

However, my CUDA is not installed in this directory. Do you have any idea to reset the CUDA_HOME in a conda environment? Expect for your reply :)

JHnvidia commented 2 years ago

It doesn't bode well. You can set the CUDA_HOME environment manually (e.g. press the windows key and type in "edit the system environment variables" in search) but the installer should set the variable automatically. The default install path is "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA...", so if it's not there something likely failed in the installer.

You can try the following in your pytorch conda environment to see if pytorch installed cuda ok.

python
>>> import torch
>>> torch.cuda.is_available()
True
1LOVESJohnny commented 2 years ago

torch.cuda.is_available()

Hi @JHnvidia, thanks for your help. There was a mistake.. I found the installed CUDA files under the directory CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5', which means CUDA is successfully installed.

However, I still cannot have CUDA runtime detected in a conda environment. Trying the codes to see if pytorch installation is ok, I got the 'False' return value.

image

This is very weird..