MonoPort icon indicating copy to clipboard operation
MonoPort copied to clipboard

Dockerfile or docker image will be much help

Open zhangqijun opened this issue 3 years ago • 2 comments

It would be very helpful to have a docker image. I faild in install ImplicitSegCUDA

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.7/dist-packages/torch/include -I/usr/local/lib/python3.7/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.7/dist-packages/torch/include/TH -I/usr/local/lib/python3.7/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c implicit_seg/cuda/interp2x_boundary2d.cpp -o build/temp.linux-x86_64-3.7/implicit_seg/cuda/interp2x_boundary2d.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=interp2x_boundary2d -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/cuda/bin/nvcc -I/usr/local/lib/python3.7/dist-packages/torch/include -I/usr/local/lib/python3.7/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.7/dist-packages/torch/include/TH -I/usr/local/lib/python3.7/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c implicit_seg/cuda/interp2x_boundary2d_kernel.cu -o build/temp.linux-x86_64-3.7/implicit_seg/cuda/interp2x_boundary2d_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=interp2x_boundary2d -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++11
In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:129:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

zhangqijun avatar Aug 23 '20 13:08 zhangqijun

I tested demo using GCC 5.4.0, you can firstly try to downgrade the GCC version and then reinstall the ImplicitSegCUDA. Moreover, current ImplicitSegCUDA only supports pytorch==1.4.0, compile it with 1.5 or 1.6 will fail

YuliangXiu avatar Aug 23 '20 22:08 YuliangXiu

Dockerimage:pytorch/pytorch:1.4-cuda10.1-cudnn7-runtime download and run https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run

export PATH=/usr/local/cuda-10.1/bin:$PATH
export CPATH=/usr/local/cuda-10.1/include:$CPATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH

pip install -r requirement.txt
pip install PyOpenGL PyOpenGL_accelerate
apt install libgl1-mesa-glx

tianyilt avatar Dec 28 '20 05:12 tianyilt