ying09 / TextFuseNet

A PyTorch implementation of "TextFuseNet: Scene Text Detection with Richer Fused Features".
MIT License
475 stars 122 forks source link

Installation error both with Dockerfile and conda environment #112

Closed jaztiria99 closed 1 year ago

jaztiria99 commented 1 year ago

I'm trying to run the code in Ubuntu 18.04 machine with GPU and CUDA 11.6 installed.

First, I tried to directly use the provided Dockerfile inside the folder docker. I faced the 'GPG error' problem in the 'RUN apt-get update' step (later I've seen that it could be bypassed with the solution proposed in #106), so as suggested in the README.md, I've copied and pasted the content of Alternate.txt. When trying to make build the Docker container with docker-compose up --force-recreate, I'm obtaining the following error:

/root/miniconda3/envs/textfusenet/lib/python3.7/site-packages/torch/include/c10/cuda/CUDAMacros.h:4:10: fatal error: c10/cuda/impl/cuda_cmake_macros.h: No such file or directory
 #include <c10/cuda/impl/cuda_cmake_macros.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

ERROR conda.cli.main_run:execute(47): `conda run /bin/bash -c python setup.py build develop` failed. (See above for error)
The command 'conda run -n textfusenet /bin/bash -c python setup.py build develop' returned a non-zero code: 1
ERROR: Service 'textfusenet' failed to build : Build failed

Alternatively, I've tried creating a conda environment with the specified requirements in the step-by-step installation.txt. After successful installation, I'm trying to run a demo code: python demo/icdar2013_detection.py This is the error that I'm obtaining:

  File "/home/xxx/yyy/miniconda3/envs/textfusenet/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 78, in <module>
    @torch.jit._script_if_tracing
AttributeError: module 'torch.jit' has no attribute '_script_if_tracing'

After some troubleshooting, I've tried to upgrade the version of cudatoolkit package to 11.6 as specified here, but another error appears:

  File "/media/data/home_folders/xxx/yyy/TextFuseNet/detectron2/layers/deform_conv.py", line 10, in <module>
    from detectron2 import _C
ImportError: /media/data/home_folders/xxx/yyy/TextFuseNet/detectron2/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_32E
ernest-tg commented 1 year ago

I'm running in the exact same problems. Did you find a solution?

jaztiria99 commented 1 year ago

Nope, I wasn't able to solve the problem.