Vegeta2020 / SE-SSD

SE-SSD: Self-Ensembling Single-Stage Object Detector From Point Cloud, CVPR 2021.
Apache License 2.0
811 stars 128 forks source link

Install error "relocation R_X86_64_PC32" when "python setup.py build develop" #94

Open WesternHill opened 1 year ago

WesternHill commented 1 year ago

I'm now trying to run SE-SSD on docker. But I'm facing same issue for more than a week. Could I have some advise ? or I appreciate to tell me your successed environment.

Goal

Issue

How it can be reproduced?

Install cudnn 7.5.0 as oficially tested

Cudnn .deb file can be obtained from here: https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal

Reference: https://medium.com/repro-repo/install-cuda-10-1-and-cudnn-7-5-0-for-pytorch-on-ubuntu-18-04-lts-9b6124c44cc

COPY materials/libcudnn7_7.5.0.56-1+cuda10.0/* ./ RUN dpkg -i libcudnn7_7.5.0.56-1+cuda10.0_amd64.deb libcudnn7-dev_7.5.0.56-1+cuda10.0_amd64.deb libcudnn7-doc_7.5.0.56-1+cuda10.0_amd64.deb

Install python3.6 and its pip

I refered below but test when "make" would be stucked, so changed make build-all to skip test.

https://gist.github.com/sonhmai/57bca33dc5d03dafb82bafe334f3dd21

ENV PYTHON_VERSION=3.6.5 ENV PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz RUN apt clean && apt update && apt install -y software-properties-common libssl-dev libreadline-dev libbz2-dev libsqlite3-dev zlib1g-dev python-minimal wget RUN wget "$PYTHON_DOWNLOAD_URL" -O python.tar.tgz && tar -zxvf python.tar.tgz RUN ls && cd Python-$PYTHON_VERSION && ./configure --enable-optimizations --enable-loadable-sqlite-extensions && make -j8 build_all && make -j8 install RUN pip3 install --upgrade pip RUN python3 --version && pip3 --version

Install pytorch 1.1

RUN pip3 install torch==1.1

Install spconv

RUN apt install -y libboost-all-dev git RUN pip3 install cmake --upgrade RUN pip3 install wheel RUN git clone https://github.com/poodarchu/spconv --recursive && cd spconv && git checkout 73427720a539caf9a44ec58abe3af7aa9ddb8e39 #3f5b4b716c5d40d RUN cd spconv && python3 setup.py bdist_wheel RUN cd spconv/dist && pip3 install *

Install nuscenes-devkit

RUN pip3 install nuscenes-devkit

Install dependencies for installing SE-SSD

RUN apt update && apt install -y ninja-build RUN pip3 install Cython pythran pytest-runner cmake==3.17.3 RUN pip3 install setuptools==39.1.0 RUN git clone https://github.com/Vegeta2020/SE-SSD.git RUN git clone https://github.com/jackd/ifp-sample.git && pip3 install -e ifp-sample

RUN echo "cd SE-SSD/det3d/core/iou3d $$ python3 setup.py install" >> docker-entrypoint.sh RUN echo "cd SE-SSD && python3 setup.py build develop" >> docker-entrypoint.sh ENTRYPOINT ["/bin/bash","docker-entrypoint.sh"]



# What I already tried and didn't worked
* Add "-Xcompiler","-fPIC" inside of `nvcc: [ ]` at every "extra_compiler_args" where is like [here](https://github.com/Vegeta2020/SE-SSD/blob/b91104ce866e6f012fb937e98e09a61877ef6980/setup.py#L191)
  * This simply didn't make any change at a result.
* Add "-fPIC" inside of `cxx: []`
  * This causes `nvcc fatal : Unknown option "-fPIC"` even though the option is for cxx, not for nvcc.
* Change base-image of docker from "nvidia/cuda:10.0" to 10.1 or 10.2. Neither made change on the result.
* Change pytorch version among 1.1,1.3,1.4,1.6. Any of these version didn't make change.
* Change setuptools version