uci-rendering / psdr-cuda

Path-space differentiable renderer
BSD 3-Clause "New" or "Revised" License
155 stars 11 forks source link

Installation help #12

Closed sixftninja closed 2 years ago

sixftninja commented 2 years ago

I am having trouble successfully installing psdr-cuda. Please help. (I am new to this, pardon stupidity if any)

My system: NVIDIA-SMI 495.29.05 Driver Version: 495.29.05 CUDA Version: 11.5 gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 cmake version 3.20.0

What I did:

Installed pybind11: pip install "pybind11[global]"

Installed OptiX: chmod +x NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64.sh ./NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64.sh cd NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64 mkdir build && cd build cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc make -j4 this does not install in usr/local/cuda-11.5/ Created softlink as explained in the docs

Enoki $ git clone --recursive https://github.com/mitsuba-renderer/enoki cd enoki mkdir build && cd build cmake ../ cmake --build .

then in psdr-cuda root dir: mkdir build cd build cmake -D CMAKE_C_COMPILER=gcc-9 \ -D CMAKE_CXX_COMPILER=g++-9 \ -D PYTHON_INCLUDE_PATH=/usr/include/python3.8/ \ -D OpenEXR_ROOT=/usr/include/OpenEXR/ \ -D ENOKI_DIR=/home/user/enoki/ \ ..

when I run the above commands I get an error. Here's the entire message:

The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/gcc-9 - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++-9 - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-11.5 (found suitable version "11.5", minimum required is "10.0") CMake Error at CMake/FindOptiX.cmake:67 (message): OptiX headers (optix.h and friends) not found. Please locate before proceeding. Call Stack (most recent call first): CMake/FindOptiX.cmake:76 (OptiX_report_error) CMakeLists.txt:59 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/paperspace/psdr-cuda/build/CMakeFiles/CMakeOutput.log". See also "/home/paperspace/psdr-cuda/build/CMakeFiles/CMakeError.log".

Can you please help? Thanks!

andyyankai commented 2 years ago

It seems you haven't include optix include dir and Cmake cannot find optix. Try to see if you can build optix SDK, or you can put the optix include dir at /psdr_cuda_dir/../ or /psdr_cuda_dir/ so your cmake can find where is optix