RTKConsortium / RTK

Reconstruction Toolkit
Apache License 2.0
244 stars 144 forks source link

Investigate dependency to Nvidia packages for Cuda wheels #516

Open SimonRit opened 2 years ago

SimonRit commented 2 years ago

According to the Nvidia Cuda documentation, Nvidia provides wheels for Windows and Linux. The following command lines install the required libraries (which are not packaged by RTK, see here)

python3 -m pip install --upgrade setuptools pip wheel
python3 -m pip install nvidia-pyindex
python3 -m pip install nvidia-cuda-runtime-cu11 nvidia-cufft-cu11 nvidia-cublas-cu11

However, the libraries are not put in the system path by conda so I am not sure how to use these wheels. When importing RTK in Python, I still get the error ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory. It's not clear to me if and how we could use these packages...

EricAtORS commented 1 year ago

Since you mention conda, I suppose you are ok with using conda. I would suggest to just install the nvida cuda libraries with conda as well.

This is what tensorflow also suggests to do when using pip to install tensorflow.

So all you would need is:

conda install -c conda-forge cudatoolkit=11.2

Also, nvidia has official packages that they publish as a conda channel on anaconda.org, but I'm heavily tied into the conda-forge ecosystem and would highly suggest that you use the ones from conda-forge for the scientific community.

SimonRit commented 1 year ago

I am using conda and it would be great to release RTK there. I did try at some point but I did not have time to finalize the PR, see https://github.com/conda-forge/staged-recipes/pull/9255. It can still be a good option for installing cudatoolkit but a quick attempt on my computer did not work out.