warp-ctc icon indicating copy to clipboard operation
warp-ctc copied to clipboard

Installing on colab

Open ghost opened this issue 5 years ago • 4 comments

I tried to install warp_ctc on colab

but when I tried to install as your direction I got some error like this:

-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "9.2", minimum required is "6.5") 
-- cuda found TRUE
-- Building shared library with GPU support
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_curand_LIBRARY (ADVANCED)
    linked by target "test_gpu" in directory /content/warp-ctc

-- Configuring incomplete, errors occurred!
See also "/content/warp-ctc/build/CMakeFiles/CMakeOutput.log".
See also "/content/warp-ctc/build/CMakeFiles/CMakeError.log".

Here is my CMakeOutput.log and CMakeError.log:

<CMakeError.log>

Determining if the pthread_create exist failed with the following output:
Change Dir: /content/warp-ctc/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_d7aa0/fast"
/usr/bin/make -f CMakeFiles/cmTC_d7aa0.dir/build.make CMakeFiles/cmTC_d7aa0.dir/build
make[1]: Entering directory '/content/warp-ctc/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d7aa0.dir/CheckSymbolExists.c.o
/usr/bin/cc   -fPIC    -o CMakeFiles/cmTC_d7aa0.dir/CheckSymbolExists.c.o   -c /content/warp-ctc/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_d7aa0
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d7aa0.dir/link.txt --verbose=1
/usr/bin/cc -fPIC     -rdynamic CMakeFiles/cmTC_d7aa0.dir/CheckSymbolExists.c.o  -o cmTC_d7aa0 
CMakeFiles/cmTC_d7aa0.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_d7aa0.dir/build.make:97: recipe for target 'cmTC_d7aa0' failed
make[1]: *** [cmTC_d7aa0] Error 1
make[1]: Leaving directory '/content/warp-ctc/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_d7aa0/fast' failed
make: *** [cmTC_d7aa0/fast] Error 2

File /content/warp-ctc/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /content/warp-ctc/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_b0ca1/fast"
/usr/bin/make -f CMakeFiles/cmTC_b0ca1.dir/build.make CMakeFiles/cmTC_b0ca1.dir/build
make[1]: Entering directory '/content/warp-ctc/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b0ca1.dir/CheckFunctionExists.c.o
/usr/bin/cc   -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_b0ca1.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_b0ca1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b0ca1.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_b0ca1.dir/CheckFunctionExists.c.o  -o cmTC_b0ca1 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_b0ca1.dir/build.make:97: recipe for target 'cmTC_b0ca1' failed
make[1]: *** [cmTC_b0ca1] Error 1
make[1]: Leaving directory '/content/warp-ctc/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_b0ca1/fast' failed
make: *** [cmTC_b0ca1/fast] Error 2

Is there anyone install it on colab???

plz give me some any advice.

ghost avatar Nov 02 '18 08:11 ghost

I managed to install it. !git clone https://github.com/SeanNaren/warp-ctc.git !cd warp-ctc; mkdir build; cd build; cmake ..;make !cd warp-ctc/pytorch_binding;python setup.py install

then I restart the runtime to reload the module.

nicolaerosca avatar Feb 08 '19 22:02 nicolaerosca

I managed to install it. !git clone https://github.com/SeanNaren/warp-ctc.git !cd warp-ctc; mkdir build; cd build; cmake ..;make !cd warp-ctc/pytorch_binding;python setup.py install

then I restart the runtime to reload the module.

what's mean that I restart the runtime to reload the module.how to do.

wangwangww avatar Jul 27 '20 16:07 wangwangww

After doing the setup from https://github.com/SeanNaren/warp-ctc Install ctc from baidu to get .so file

  • pip install torch-baidu-ctc Copy the _warp_ctc.cpython-36m-x86_64-linux-gnu.so to warp-ctc/pytorch_binding/warpctc_pytorch by using this command
  • cp /usr/local/lib/python3.6/dist-packages/torch_baidu_ctc/_C.cpython-36m-x86_64-linux-gnu.so /content/warp-ctc/pytorch_binding/warpctc_pytorch Press ctrl+M on colab to restart runtime.

Anubhav007 avatar Oct 29 '20 13:10 Anubhav007

i got this error....

[Env] Backend : GPU(cuda11.1)

`Cloning into 'warp-ctc'... remote: Enumerating objects: 829, done. remote: Total 829 (delta 0), reused 0 (delta 0), pack-reused 829 Receiving objects: 100% (829/829), 388.85 KiB | 10.51 MiB/s, done. Resolving deltas: 100% (419/419), done. -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "11.1", minimum required is "6.5") -- cuda found TRUE -- Building shared library with GPU support -- Configuring done -- Generating done -- Build files have been written to: /content/warp-ctc/build [ 11%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o nvcc fatal : Unsupported gpu architecture 'compute_30' CMake Error at warpctc_generated_reduce.cu.o.cmake:219 (message): Error generating /content/warp-ctc/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_reduce.cu.o

CMakeFiles/warpctc.dir/build.make:70: recipe for target 'CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o' failed make[2]: *** [CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o] Error 1 CMakeFiles/Makefile2:146: recipe for target 'CMakeFiles/warpctc.dir/all' failed make[1]: *** [CMakeFiles/warpctc.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 Could not find libwarpctc.so in ../build. Build warp-ctc and set WARP_CTC_PATH to the location of libwarpctc.so (default is '../build')`

JadeKim042386 avatar Jan 22 '22 02:01 JadeKim042386