Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to deploy because of torchmcubes #108

Open
Lucas-SJY opened this issue Jul 21, 2024 · 4 comments
Open

Failed to deploy because of torchmcubes #108

Lucas-SJY opened this issue Jul 21, 2024 · 4 comments

Comments

@Lucas-SJY
Copy link

I've got pytorch 2.3.1 with cuda 11.8 support, my torch.cuda.is_available() returned True, and I've got my nvcc -V ready, get the following output.
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

However, when I was trying to run pip install -r requirements.txt, I got problem installing torchmcubes.
Here is the output, could anyone help me fix it?

Building wheel for torchmcubes (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for torchmcubes (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
*** scikit-build-core 0.9.8 using CMake 3.30.0 (wheel)
*** Configuring CMake...
loading initial cache file build/CMakeInit.txt
-- The CXX compiler identification is GNU 9.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- NO CUDA INSTALLATION FOUND, INSTALLING CPU VERSION ONLY!
-- Found Python: /home/lucas/.conda/envs/tripo/bin/python (found version "3.9.19") found components: Interpreter Development Development.Module Development.Embed
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /tmp/pip-build-env-t4ju3b91/overlay/lib/python3.9/site-packages/pybind11/include (found version "2.13.1")
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND)
-- Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (found version "11.8")
CMake Warning at /home/lucas/.conda/envs/tripo/lib/python3.9/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:31 (message):
Caffe2: CUDA cannot be found. Depending on whether you are building Caffe2
or a Caffe2 dependent library, the next warning / error will give you more
info.
Call Stack (most recent call first):
/home/lucas/.conda/envs/tripo/lib/python3.9/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:87 (include)
/home/lucas/.conda/envs/tripo/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:51 (find_package)

  CMake Error at /home/lucas/.conda/envs/tripo/lib/python3.9/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:91 (message):
    Your installed Caffe2 version uses CUDA but I cannot find the CUDA
    libraries.  Please set the proper CUDA prefixes and / or install CUDA.
  Call Stack (most recent call first):
    /home/lucas/.conda/envs/tripo/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
    CMakeLists.txt:51 (find_package)
  
  
  -- Configuring incomplete, errors occurred!
  
  *** CMake configuration failed
  [end of output]

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

@GeraltofRivia1776
Copy link

I get the same problem, I even get it with Pinokio and trying to install locally.

@gvlasov
Copy link

gvlasov commented Aug 15, 2024

Same here, says CUDA compiler not found, but I do have it in my $PATH, it is at /opt/cuda/bin/nvcc, both for the shell I use to run venv/bin/pip install git+https://github.com/tatsy/torchmcubes.git and in ~/.bashrc for current user

@Sido-A
Copy link

Sido-A commented Sep 2, 2024

I had similar issue on my windows 11 but found:
1>> #74 (comment)
(I didnt update the driver since it was the best one for my pc accoding to the message I got by clicking the 'driver update')

then followed the steps in this:
2>> #48 (comment)

and then solved torchmcube issue

@YuQiao0303
Copy link

I solved it on Linux following #48 (comment)

pip install git+https://github.com/tatsy/torchmcubes.git@3aef8afa5f21b113afc4f4ea148baee850cbd472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants