detectron compile error
## detectron compile
conda create -n gtext2 python==3.8
conda activate gtext2
pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
pip install opencv-python scipy timm shapely albumentations Polygon3
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
rm -rf build/ **/*.so
python setup.py build develop
cd gtextdetect/
sudo apt install gcc-10 g++-10
nvcc --version
conda install -c "nvidia/label/cuda-11.7.0" cuda-toolkit
nvcc --version
python setup.py build develop
python demo/demo.py --config-file ./configs/DPText_DETR/TotalText/R_50_poly.yaml --input /data/camera1/2023/202307/20230705/5 --output /home/gnoti/gtextdetect/output/test
## detectron2 error
(base) min@min-MS-7C94:~/python/dptext-detr$ conda create --name textfusenet python=3.7.3 -y
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/gnoti/gtextdetect/adet/layers/csrc/DeformAttn/ms_deform_attn_cpu.cpp:14:
/home/gnoti/anaconda3/envs/dptext/lib/python3.8/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 그런 파일이나 디렉터리가 없습니다
5 | #include <cuda_runtime_api.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
(dptext) gnoti@gnotiocr:~/gtextdetect$ python setup.py build develop
rm -rf build/ **/*.so
apt install nvidia-cuda-toolkit
sudo apt install gcc-10 g++-10
/home/min/anaconda3/envs/DPText-DETR/lib/python3.8/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
435 | function(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
530 | operator=(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
error: command '/usr/bin/nvcc' failed with exit status 1
Line 433+ (approximate):
template<typename _Functor,
typename _Constraints = _Requires<_Callable<_Functor>>>
function(_Functor&& __f)
//noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>()) // comment this out
: _Function_base()
Line 529+ (approximate):
template
_Requires<_Callable<_Functor>, function&>
operator=(_Functor&& __f)
//noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>()) // comment this out
{
function(std::forward<_Functor>(__f)).swap(*this);
return *this;
}
댓글
댓글 쓰기