cherubicXN / hawp

Holistically-Attracted Wireframe Parsing [TPAMI'23] & [CVPR' 20]
MIT License
291 stars 51 forks source link

error: could not create 'parsing/_C.cpython-36m-x86_64-linux-gnu.so': No such file or directory #26

Closed GabauerDavid closed 2 years ago

GabauerDavid commented 2 years ago

Hi, Thanks a lot for your contribution. Unfortunately, I receive the following error message: error: could not create 'parsing/_C.cpython-36m-x86_64-linux-gnu.so': No such file or directory

Dockerfile:

FROM nvcr.io/nvidia/pytorch:19.09-py3

# add current folder where Dockerfile and requirements are located to workspace
WORKDIR /workspace
ADD . /workspace

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
RUN apt-get update && apt-get install -qy libsm6 libxext6 libxrender-dev python3-tk apt-utils openmpi-bin liblzma-dev libfreetype6 libpng16-16

ENV CUDA_HOME="/usr/local/cuda"

# update pip
RUN pip install --upgrade pip

# Install Python dependencies
RUN git clone https://github.com/cherubicXN/hawp.git
RUN pip install -r /workspace/hawp/requirement.txt
RUN conda develop .
RUN python /workspace/hawp/setup.py build_ext --inplace
RUN chmod 777 . -R

# Clean up APT when done.
RUN apt-get clean

### docker build -t hawp:v1.0 .
###nd-run -it --rm --name test hawp:v1.0

Details:

 ---> Running in d33aa28ee7a1
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
running build_ext
building 'parsing._C' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/workspace
creating build/temp.linux-x86_64-3.6/workspace/hawp
creating build/temp.linux-x86_64-3.6/workspace/hawp/parsing
creating build/temp.linux-x86_64-3.6/workspace/hawp/parsing/csrc
creating build/temp.linux-x86_64-3.6/workspace/hawp/parsing/csrc/cuda
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/workspace/hawp/parsing/csrc -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c /workspace/hawp/parsing/csrc/vision.cpp -o build/temp.linux-x86_64-3.6/workspace/hawp/parsing/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/workspace/hawp/parsing/csrc -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c /workspace/hawp/parsing/csrc/cuda/linesegment.cu -o build/temp.linux-x86_64-3.6/workspace/hawp/parsing/csrc/cuda/linesegment.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/parsing
g++ -pthread -shared -B /opt/conda/compiler_compat -L/opt/conda/lib -Wl,-rpath=/opt/conda/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/workspace/hawp/parsing/csrc/vision.o build/temp.linux-x86_64-3.6/workspace/hawp/parsing/csrc/cuda/linesegment.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/parsing/_C.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/parsing/_C.cpython-36m-x86_64-linux-gnu.so -> parsing
error: could not create 'parsing/_C.cpython-36m-x86_64-linux-gnu.so': No such file or directory
The command '/bin/sh -c python /workspace/hawp/setup.py build_ext --inplace #--user' returned a non-zero code: 1

I sincerely hope that you can help me out.

GabauerDavid commented 2 years ago

Changing the working directory multiple times solved the issue.

FROM nvcr.io/nvidia/pytorch:20.07-py3

# add current folder where Dockerfile and requirements are located to workspace
WORKDIR /workspace
ADD . /workspace

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
RUN apt-get update && apt-get install -qy libsm6 libxext6 libxrender-dev python3-tk apt-utils openmpi-bin liblzma-dev libfreetype6 libpng16-16

ENV CUDA_HOME="/usr/local/cuda"

# update pip
RUN pip install --upgrade pip

# Install Python dependencies
RUN git clone https://github.com/cherubicXN/hawp.git
RUN pip install -r /workspace/hawp/requirement.txt

WORKDIR /workspace/hawp
RUN conda develop .
RUN python setup.py build_ext --inplace
WORKDIR /workspace
RUN chmod 777 . -R

# Clean up APT when done.
RUN apt-get clean
yxlbit commented 1 year ago

Hi,how do you solve this problem.I encounder the same problem. Thank you.