Skip to content

Commit

Permalink
Updated installation of ctc-decoders (#7746)
Browse files Browse the repository at this point in the history
* - Fixed issue with installation of ctc-decoders and Offline-ASR notebook

Signed-off-by: Vitaly Lavrukhin <vlavrukhin@nvidia.com>

* Updated paths in install_beamsearch_decoders.sh

Signed-off-by: Vitaly Lavrukhin <vlavrukhin@nvidia.com>

---------

Signed-off-by: Vitaly Lavrukhin <vlavrukhin@nvidia.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
  • Loading branch information
2 people authored and web-flow committed Oct 19, 2023
1 parent ed64c7d commit 8193c77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,22 @@ else
alias b2install='sudo ./b2'
fi

aptupdate && apt-get upgrade -y && apt-get install -y liblzma-dev && rm -rf /var/lib/apt/lists/* # liblzma needed for flashlight decoder
aptupdate && apt-get upgrade -y && apt-get install -y swig liblzma-dev && rm -rf /var/lib/apt/lists/* # liblzma needed for flashlight decoder

# install Boost package for KenLM
wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2 --no-check-certificate && tar --bzip2 -xf $NEMO_PATH/boost_1_80_0.tar.bz2 && cd boost_1_80_0 && ./bootstrap.sh && b2install --layout=tagged link=static,shared threading=multi,single install -j4 && cd .. || echo FAILURE
export BOOST_ROOT=$NEMO_PATH/boost_1_80_0

git clone https://github.com/NVIDIA/OpenSeq2Seq
cd OpenSeq2Seq
git checkout ctc-decoders
cd ..
mv OpenSeq2Seq/decoders .
mv OpenSeq2Seq/decoders $NEMO_PATH/
rm -rf OpenSeq2Seq
cd decoders

cd $NEMO_PATH/decoders
cp $NEMO_PATH/scripts/installers/setup_os2s_decoders.py ./setup.py
./setup.sh

# install Boost package for KenLM
wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2 --no-check-certificate && tar --bzip2 -xf $NEMO_PATH/decoders/boost_1_80_0.tar.bz2 && cd boost_1_80_0 && ./bootstrap.sh && b2install --layout=tagged link=static,shared threading=multi,single install -j4 || echo FAILURE
export BOOST_ROOT=$NEMO_PATH/decoders/boost_1_80_0

# install KenLM
cd $NEMO_PATH/decoders/kenlm/build && cmake -DKENLM_MAX_ORDER=$KENLM_MAX_ORDER .. && make -j2
cd $NEMO_PATH/decoders/kenlm
Expand Down
1 change: 0 additions & 1 deletion tutorials/asr/Offline_ASR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"except ModuleNotFoundError:\n",
" # install beam search decoder\n",
" import os\n",
" !apt-get update && apt-get install -y swig\n",
" !git clone https://github.com/NVIDIA/NeMo -b \"$BRANCH\"\n",
" pwd = !pwd\n",
" NEMO_PATH = os.path.join(pwd[0], \"NeMo\")\n",
Expand Down

0 comments on commit 8193c77

Please sign in to comment.