Skip to content

Installation

Sean Naren edited this page Jun 8, 2017 · 7 revisions

This installation assumes you are willing to install CUDA 7.5+ AND cudnn R5 (for GPU support which is default, however there is CPU support). How to install these are described below.

Torch and CUDA

To install torch7 follow the guide here.

You must have CUDA 7.5 or above (build supported by warp-ctc). To install CUDA 7.5:

Download the .run file of your platform here.

Example for Ubuntu 14.04:

wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run

Then install using below commands.

sudo chmod +x ./cuda_7.5.18_linux.run
sudo ./cuda_7.5.18_linux.run

When prompted with this message I suggest pressing no. Highly recommended to install the latest driver from the nvidia website of your GPU, but the driver is compatible if you select yes.

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 352.xx? ((y)es/(n)o/(q)uit):

Finally modify the .bashrc located at ~/.bashrc, including these lines at the end:

export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

Restart the terminal for changes to take effect.

Luarocks installs

For CUDA implementation (make sure to install these via luarocks first before installing the warp-ctc library):

luarocks install cutorch
luarocks install cunn

To install the Baidu warp-ctc library:

luarocks install http://raw.githubusercontent.com/baidu-research/warp-ctc/master/torch_binding/rocks/warp-ctc-scm-1.rockspec

Other dependencies can be installed via luarocks:

Audio Library for Torch: Audio Library for Torch:

Linux (Ubuntu):

sudo apt-get install libfftw3-dev
sudo apt-get install sox libsox-dev libsox-fmt-all
luarocks install https://github.com/raw/soumith/lua---audio/master/audio-0.1-0.rockspec

Optim: numeric optimization package for Torch:

luarocks install optim

rnn: Recurrent Neural Network library for Torch7's nn:

luarocks install rnn

lua---nnx: An extension to Torch7's nn package:

luarocks install nnx

xlua: A set of useful extensions to Lua:

luarocks install xlua

threads: Threads for Lua and LuaJIT:

luarocks install threads

lua---parallel: A (simple) parallel computing framework for Lua:

luarocks install parallel

nngraph: Graph Computation for nn:

luarocks install nngraph

LMDB: LMDB for Torch used for online training:

git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb/
make
sudo make install

git clone https://github.com/eladhoffer/lmdb.torch
cd lmdb.torch
luarocks make

Note: sometimes the above doesn't work, if on Ubuntu 14.04 below can install LMDB as well:

sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

It is also suggested to update the following libraries:

luarocks install torch
luarocks install nn
luarocks install dpnn

cuDNN

For cuDNN V5 you need to create an account, follow install instructions here. Make sure to install V5.

Once you have completed the above installation, Install lua bindings for cudnn R5:

luarocks install https://github.com/raw/soumith/cudnn.torch/master/cudnn-scm-1.rockspec

Finally clone the repository to access the repo:

git clone https://github.com/SeanNaren/CTCSpeechRecognition.git

To set up the dataset and start training, check AN4 setup.