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

not able to install prerequisite spconv v1.2.1 #148

Open
tarmas99 opened this issue Jun 23, 2022 · 2 comments
Open

not able to install prerequisite spconv v1.2.1 #148

tarmas99 opened this issue Jun 23, 2022 · 2 comments

Comments

@tarmas99
Copy link

Hi... I am following the following steps to get spconv set up. But the spconv wheel building is failing continuously since last 24 hours despite trying many options. What is possibly being done wrong by me?

conda create --name XYZ python=3.7 cudatoolkit=10.2 yaml Cython cmake --channel=nvidia
conda activate XYZ
conda install pytorch -c pytorch
conda install nvcc_linux-64 -c conda-forge
~/anaconda3/envs/XYZ/bin/nvcc -V
conda install gxx_linux-64=7.5.0 -c conda-forge
cd $CONDA_PREFIX/bin
ln -s x86_64-conda-linux-gnu-gcc gcc
cd -

export CUDA_HOME=$CONDA_PREFIX
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib
export PATH=$CUDA_HOME/bin:$PATH

pip3 install torch-scatter
conda install -c statiskit libboost-dev
conda install -c conda-forge cmake=3.14.0

git clone -b v1.2.1 https://github.com/traveller59/spconv.git --recursive
cd spconv
python setup.py bdist_wheel

The logs from execution of the last command are pasted below. Any guidance will be appreciated.

`/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/torch/masked/init.py:223: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at /opt/conda/conda-bld/pytorch_1646755861072/work/torch/csrc/utils/tensor_numpy.cpp:68.)
example_input = torch.tensor([[-3, -2, -1], [0, 1, 2]])
running bdist_wheel
running build
running build_py
running build_ext
Release
|||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.7', '-DSPCONV_BuildTests=OFF', '-DPYTORCH_VERSION=11100', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS
_ -D__CUDA_NO_HALF_CONVERSIONS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/samrat_2111cs12/Cylinder3D/spconv/build/lib.linux-x86_64-3.7/spconv', '-DCMAKE_BUILD_TYPE=Release']
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is unknown
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /home/samrat_2111cs12/anaconda3/envs/ctdenv1/bin/x86_64-conda-linux-gnu-c++
-- Check for working CXX compiler: /home/samrat_2111cs12/anaconda3/envs/ctdenv1/bin/x86_64-conda-linux-gnu-c++ - broken
CMake Error at /home/samrat_2111cs12/anaconda3/envs/ctdenv4/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler

"/home/samrat_2111cs12/anaconda3/envs/ctdenv1/bin/x86_64-conda-linux-gnu-c++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/samrat_2111cs12/Cylinder3D/spconv/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_3ea0d/fast && /usr/bin/make  -f CMakeFiles/cmTC_3ea0d.dir/build.make CMakeFiles/cmTC_3ea0d.dir/build
make[1]: Entering directory '/home/samrat_2111cs12/Cylinder3D/spconv/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_3ea0d.dir/testCXXCompiler.cxx.o
/home/samrat_2111cs12/anaconda3/envs/ctdenv1/bin/x86_64-conda-linux-gnu-c++   -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/samrat_2111cs12/anaconda3/envs/ctdenv1/include -DVERSION_INFO=\"1.2.1\"  -o CMakeFiles/cmTC_3ea0d.dir/testCXXCompiler.cxx.o -c /home/samrat_2111cs12/Cylinder3D/spconv/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_3ea0d
/home/samrat_2111cs12/anaconda3/envs/ctdenv4/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3ea0d.dir/link.txt --verbose=1
/home/samrat_2111cs12/anaconda3/envs/ctdenv1/bin/x86_64-conda-linux-gnu-c++ -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/samrat_2111cs12/anaconda3/envs/ctdenv1/include -DVERSION_INFO=\"1.2.1\"  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/samrat_2111cs12/anaconda3/envs/ctdenv1/lib -Wl,-rpath-link,/home/samrat_2111cs12/anaconda3/envs/ctdenv1/lib -L/home/samrat_2111cs12/anaconda3/envs/ctdenv1/lib  CMakeFiles/cmTC_3ea0d.dir/testCXXCompiler.cxx.o -o cmTC_3ea0d
/home/samrat_2111cs12/anaconda3/envs/ctdenv1/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find /lib64/libc.so.6
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_3ea0d.dir/build.make:99: cmTC_3ea0d] Error 1
make[1]: Leaving directory '/home/samrat_2111cs12/Cylinder3D/spconv/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_3ea0d/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)

-- Configuring incomplete, errors occurred!
See also "/home/samrat_2111cs12/Cylinder3D/spconv/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/home/samrat_2111cs12/Cylinder3D/spconv/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "setup.py", line 120, in
zip_safe=False,
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/setuptools/distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 48, in run
self.build_extension(ext)
File "setup.py", line 91, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/samrat_2111cs12/Cylinder3D/spconv', '-DCMAKE_PREFIX_PATH=/home/samrat_2111cs12/anaconda3/envs/ctdenv4/lib/python3.7/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.7', '-DSPCONV_BuildTests=OFF', '-DPYTORCH_VERSION=11100', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/samrat_2111cs12/Cylinder3D/spconv/build/lib.linux-x86_64-3.7/spconv', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.`

@nerovalerius
Copy link

i run the model with the following dependencies:

from my dockerfile:

Install apt dependencies

RUN apt update && apt upgrade -y
RUN apt install -y git wget unzip libboost-all-dev cmake build-essential fmpeg libsm6 libxext6

Install conda dependencies

RUN conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge
RUN conda install python=3.9.2 numpy tqdm pyyaml numba strictyaml -c conda-forge

Install pip dependencies

RUN pip3 install --upgrade pip
RUN pip3 install cython==0.29.24
RUN pip3 install nuscenes-devkit==1.1.6
RUN pip3 install spconv-cu114
RUN pip3 install torch-sparse -f https://data.pyg.org/whl/torch-1.12.0%2Bcu116.html
RUN pip3 install torch-scatter -f https://data.pyg.org/whl/torch-1.12.0%2Bcu116.html

@L-Reichardt
Copy link

Rewritten version of the model for newer CUDA / Spconv versions here

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

3 participants