jkulhanek / tetra-nerf

Official implementation for Tetra-NeRF paper - NeRF represented as triangulation of input point cloud.
https://jkulhanek.com/tetra-nerf
MIT License
278 stars 14 forks source link

Can not install tetra-nerf #4

Closed ZiyangYan closed 1 year ago

ZiyangYan commented 1 year ago

When I use pip install git+https://github.com/jkulhanek/tetra-nerf to install the method,

it raise, " raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-4gefgajf', '-DPYTHON_EXECUTABLE=/media/zyan/sandiskSSD/anaconda3/envs/nerfstudio/bin/python', '-DCMAKE_BUILD_TYPE=Release', '-DEXAMPLE_VERSION_INFO=0.1.1']' returned non-zero exit status 1. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for tetra-nerf Running setup.py clean for tetra-nerf Failed to build tetra-nerf ERROR: Could not build wheels for tetra-nerf, which is required to install pyproject.toml-based projects "

how to deal with it? my nerfstudio is work and the install is correct.

jkulhanek commented 1 year ago

Can you please clone the repository and run “cmake . && make”? Please post the output here.

ZiyangYan commented 1 year ago

Can you please clone the repository and run “cmake . && make”? Please post the output here.

-- The CXX compiler identification is GNU 7.5.0 CMake Error at /media/zyan/sandiskSSD/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:751 (message): Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.

Compiler: /usr/bin/nvcc

Build flags:

Id flags: --keep;--keep-dir;tmp -v

The output was:

255

$ SPACE=

$ CUDART=cudart

$ HERE=/usr/lib/nvidia-cuda-toolkit/bin

$ THERE=/usr/lib/nvidia-cuda-toolkit/bin

$ _TARGETSIZE=

$ _TARGETDIR=

$ _TARGETSIZE=64

$ NVVMIR_LIBRARY_DIR=/usr/lib/nvidia-cuda-toolkit/libdevice

$

PATH=/usr/lib/nvidia-cuda-toolkit/bin:/media/zyan/sandiskSSD/anaconda3/envs/nerfstudio/bin:/media/zyan/sandiskSSD/anaconda3/condabin:/usr/local/cuda-11.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

$ LIBRARIES= -L/usr/lib/x86_64-linux-gnu/stubs

$ rm tmp/a_dlink.reg.c

$ gcc -std=c++14 -D__CUDA_ARCH__=300 -E -x c++

-DCUDA_DOUBLE_MATH_FUNCTIONS -DCUDACC -DNVCC -D"CUDACC_VER_BUILD=85" -D"CUDACC_VER_MINOR=1" -D"CUDACC_VER_MAJOR=9" -include "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" > "tmp/CMakeCUDACompilerId.cpp1.ii"

$ cicc --c++14 --gnu_version=70500 --allow_managed -arch compute_30 -m64

-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "CMakeCUDACompilerId.fatbin.c" -tused -nvvmir-library "/usr/lib/nvidia-cuda-toolkit/libdevice/libdevice.10.bc" --gen_module_id_file --module_id_file_name "tmp/CMakeCUDACompilerId.module_id" --orig_src_file_name "CMakeCUDACompilerId.cu" --gen_c_file_name "tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name "tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name "tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o "tmp/CMakeCUDACompilerId.ptx"

$ ptxas -arch=sm_30 -m64 "tmp/CMakeCUDACompilerId.ptx" -o

"tmp/CMakeCUDACompilerId.sm_30.cubin"

ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'

--error 0xff --

Call Stack (most recent call first): /media/zyan/sandiskSSD/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /media/zyan/sandiskSSD/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test) /media/zyan/sandiskSSD/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred!

ZiyangYan commented 1 year ago

Can you please clone the repository and run “cmake . && make”? Please post the output here.

Do it need to finish the configuration of cmakelist and then try?

jkulhanek commented 1 year ago

Something is wrong with your cuda installation. It also looks like you have multiple cudas installed? When installing nerfstudio, did tinycudann install without problems? What is the output of ncvv —version?

ZiyangYan commented 1 year ago

Something is wrong with your cuda installation. It also looks like you have multiple cudas installed? When installing nerfstudio, did tinycudann install without problems? What is the output of ncvv —version?

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Thu_Feb_10_18:23:41_PST_2022 Cuda compilation tools, release 11.6, V11.6.112 Build cuda_11.6.r11.6/compiler.30978841_0

jkulhanek commented 1 year ago

Did tinycudann install without problems?

ZiyangYan commented 1 year ago

with torch == 1.12.1 I can install tinycudann without problem, with higher version torch, it will has problems, but now I use 1.12.1

Did tinycudann install without problems?

with torch == 1.12.1 I can install tinycudann without problem, with higher version torch, it will has problems, but now I use 1.12.1

jkulhanek commented 1 year ago

How can you use torch 1.12 with cuda 11.6? Please make sure pytorch cuda version matches your installed cuda

ZiyangYan commented 1 year ago

How can you use torch 1.12 with cuda 11.6? Please make sure pytorch cuda version matches your installed cuda

1683299421759 I think torch 1.12 also support cuda 11.6?

jkulhanek commented 1 year ago

Ok, I didn’t know. I have no idea what is wrong with your setup. I it is not too much hassle, can you use the dockerfile instead?

ZiyangYan commented 1 year ago

How can you use torch 1.12 with cuda 11.6? Please make sure pytorch cuda version matches your installed cuda

I create a clean env for nerfstudio with torch 1.13.1 and install the tiny-nn successfully, but when I install tetra-nerf, I has the same problem, I will try to use dockerfile, thanks

ZiyangYan commented 1 year ago

Ok, I didn’t know. I have no idea what is wrong with your setup. I it is not too much hassle, can you use the dockerfile instead?

Hi, I use " docker build -t tetra-nerf:latest --build-context optix=/home/zyan/Downloads/NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64 ." to install image but failed.

The output is: [+] Building 15.1s (9/15) => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2.48kB 0.0s => [internal] load metadata for docker.io/nvidia/cuda:11.6.1-devel-ubunt 4.5s => [context optix] load .dockerignore 0.0s => => transferring optix: 2B 0.0s => [context optix] load from client 0.0s => => transferring optix: 35.18kB 0.0s => [internal] load build context 0.0s => => transferring context: 3.69kB 0.0s => [stage-0 1/9] FROM docker.io/nvidia/cuda:11.6.1-devel-ubuntu18.04@sha 0.0s => CACHED [stage-0 2/9] COPY --from=optix . /home/zyan/Downloads/NVIDIA- 0.0s => ERROR [stage-0 3/9] RUN if [ ! -e /home/zyan/Downloads/NVIDIA-OptiX- 10.5s [stage-0 3/9] RUN if [ ! -e /home/zyan/Downloads/NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64/include/optix.h ]; then echo "Could not find the OptiX library. Please install the Optix SDK and add the following argument to the buildx command: --build-context optix=/path/to/the/SDK"; exit 1; fi && apt-get update && apt-get install -y --no-install-recommends ca-certificates cmake git colmap ffmpeg python3 python3-pip python3-dev python-is-python3 libcgal-dev && rm -rf /var/lib/apt/lists/*:

0 0.433 Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease [1581 B]

0 0.466 Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]

0 0.467 Get:3 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]

0 0.599 Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Packages [1257 kB]

0 0.664 Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]

0 0.707 Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]

0 0.776 Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [23.8 kB]

0 0.815 Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1623 kB]

0 0.950 Get:9 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]

0 1.030 Get:10 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [1588 kB]

0 1.032 Get:11 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]

0 1.036 Get:12 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]

0 1.124 Get:13 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [3296 kB]

0 6.550 Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]

0 6.943 Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2395 kB]

0 7.390 Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [30.8 kB]

0 7.391 Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3717 kB]

0 7.747 Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [1629 kB]

0 7.931 Get:19 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [64.0 kB]

0 8.046 Get:20 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [20.6 kB]

0 8.101 Fetched 29.0 MB in 8s (3760 kB/s)

0 8.101 Reading package lists...

0 9.185 Reading package lists...

0 10.23 Building dependency tree...

0 10.39 Reading state information...

0 10.41 E: Unable to locate package python-is-python3

Dockerfile:12 11 | COPY --from=optix . /home/zyan/Downloads/NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64 12 | >>> RUN if [ ! -e /home/zyan/Downloads/NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64/include/optix.h ]; then echo "Could not find the OptiX library. Please install the Optix SDK and add the following argument to the buildx command: --build-context optix=/path/to/the/SDK"; exit 1; fi && 13 | >>> apt-get update && apt-get install -y --no-install-recommends 14 | >>> ca-certificates 15 | >>> cmake 16 | >>> git 17 | >>> colmap 18 | >>> ffmpeg 19 | >>> python3 20 | >>> python3-pip 21 | >>> python3-dev 22 | >>> python-is-python3 23 | >>> libcgal-dev 24 | >>> && 25 | >>> rm -rf /var/lib/apt/lists/ 26 | error: failed to solve: process "/bin/sh -c if [ ! -e /home/zyan/Downloads/NVIDIA-OptiX-SDK-7.5.0-linux64-x86_64/include/optix.h ]; then echo "Could not find the OptiX library. Please install the Optix SDK and add the following argument to the buildx command: --build-context optix=/path/to/the/SDK"; exit 1; fi && apt-get update && apt-get install -y --no-install-recommends ca-certificates cmake git colmap ffmpeg python3 python3-pip python3-dev python-is-python3 libcgal-dev && rm -rf /var/lib/apt/lists/" did not complete successfully: exit code: 100

1683321795138

however, I have installed the optix is this path, what happen for it?

jkulhanek commented 1 year ago

I believe the error is "E: Unable to locate package python-is-python3". I am not sure why the dockerfile compiles fine on my side.

jkulhanek commented 1 year ago

I am trying now with disabled cache to see if something changed.

jkulhanek commented 1 year ago

Ok, I tried again from scratch, and it worked. I don't understand why it does not work for you.

jkulhanek commented 1 year ago

Please reopen if still experiencing issues.

ZiyangYan commented 1 year ago

Please reopen if still experiencing issues.

I asked my several colleagues to try again in different PC, including windows and different version ubuntu, they met the same problem like me.

jkulhanek commented 1 year ago

Have you tried the newer docker image?

jkulhanek commented 1 year ago

Also, did you modify the older dockerfile in any way?

ZiyangYan commented 1 year ago

Have you tried the newer docker image?

Not yet, I am so busy recently, I will try later, thank you for your response

jkulhanek commented 1 year ago

No problem. I will close the issue for now (there have been a lot of changes since you last tried, and I cannot reproduce the error). If you experience any errors with the new image, please open a new issue (or reopen this one).