SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
756 stars 271 forks source link

How to properly install warp-ctc for cuda 10.1 #157

Closed s-omranpour closed 4 years ago

s-omranpour commented 4 years ago
git clone https://github.com/SeanNaren/warp-ctc.git
cd warp-ctc
mkdir build; cd build

In case you don’t have cmake install it: sudo apt install cmake cmake .. Then take a look at this and do what “tq09mx” said. You need gcc version <= 7 so install it:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7

then,

make
export CUDA_HOME="/usr/local/cuda"
cd ../pytorch_binding
python3 setup.py install
Nosferath commented 4 years ago

Just followed these instructions, including the tq09mx bit. I already had gcc<=7 so I skipped that part. Everything seems to work so far.

Edit: Everything worked well in the end. I found this trying to build warp-ctc with GPU (CUDA) support. The important bit is to export CUDA_HOME before installing.

SeanNaren commented 4 years ago

Thanks for opening up this issue, I'll work on getting this fixed in the main branch

SeanNaren commented 4 years ago

Merged PR into warp-ctc, pull and rebuild warp-ctc to take effect!