pierotofy / OpenSplat

Production-grade 3D gaussian splatting with CPU/GPU support for Windows, Mac and Linux 🚀
https://antimatter15.com/splat/?url=https://splat.uav4geo.com/banana.splat
GNU Affero General Public License v3.0
924 stars 87 forks source link

Installation issues #44

Open briancantwe opened 8 months ago

briancantwe commented 8 months ago

Hello! Working through the installation on a CUDA machine and WSL/Ubuntu 2204.3 on WIndows 11 and getting tripped up during the cmake command in the readme.

I followed the Build (CUDA) steps in the readme, ending here with the last command:

(opensplat) proclocal@PROC66:/mnt/c/Users/PROCLOCAL/Documents/github/opensplat/build$ cmake -DCMAKE_PREFIX_PATH=$PWD/libtorch ..  && make -j$(nproc)
-- Found CUDAToolkit: /usr/include (found version "11.5.119")
-- Found CUDAToolkit: /usr/include (found version "11.5.119")
-- Caffe2: CUDA detected: 11.5
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 11.5
-- /usr/lib/x86_64-linux-gnu/libnvrtc.so shorthash is 65f2c18b
-- USE_CUDNN is set to 0. Compiling without cuDNN support
-- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support
-- Autodetected CUDA architecture(s):  7.5 7.5
-- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
CMake Warning at /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library c10_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:70 (append_torchlib_if_found)
  CMakeLists.txt:51 (find_package)

CMake Warning at /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:51 (find_package)

CMake Error at /snap/cmake/1366/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Torch (missing: TORCH_LIBRARY)
Call Stack (most recent call first):
  /snap/cmake/1366/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:190 (find_package_handle_standard_args)
  CMakeLists.txt:51 (find_package)

-- Configuring incomplete, errors occurred!

Any insight?

Thanks!

pierotofy commented 8 months ago

Looks like it's not finding libtorch. Is libtorch actually in /mnt/c/Users/PROCLOCAL/Documents/github/opensplat/build/libtorch? I wouldn't recommend putting libtorch in the build directory.

briancantwe commented 8 months ago

Ah yes it was. (I tied copying it a few places to see if anything changed.)

I moved it out of the build dir. But I still get the same error as above when I run this command too:

(opensplat) proclocal@PROC66/mnt/c/Users/PROCLOCAL/Documents/github/opensplat/build$ cmake -DCMAKE_PREFIX_PATH=/mnt/c/users/proclocal/documents/github/opensplat/libtorch .. && make -j$(nproc)

Maybe I messed something else up. After I downloaded the libtorch .zip file from pytorch.org, I unzipped it, and pointed DCMAKE_PREFIX_PATH to the libtorch directory it contained. Is that the right thing to have done?

Thanks!

pierotofy commented 8 months ago

You might need to look into this: "static library c10_LIBRARY-NOTFOUND not found."

It might have to do with the WSL environment, but I'm not sure.

OpenSplat runs natively on Windows, I would recommend to compile natively as an alternative.

briancantwe commented 8 months ago

Ok, great, moving over to Windows. What are the corresponding installation instructions for libopencv-dev on Windows?

pierotofy commented 8 months ago

This comment might help: https://github.com/pierotofy/OpenSplat/issues/3#issuecomment-1962344524

pfxuan commented 8 months ago

Or you can use this Windows build action as a reference

briancantwe commented 8 months ago

The #3 comment thread did the trick. All set up now, thank you!