diff --git a/scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh b/scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh index b09ed351bd15..1cc3c672a93a 100755 --- a/scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh +++ b/scripts/asr_language_modeling/ngram_lm/install_beamsearch_decoders.sh @@ -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 diff --git a/tutorials/asr/Offline_ASR.ipynb b/tutorials/asr/Offline_ASR.ipynb index 8544d230878c..41cc79ff6783 100644 --- a/tutorials/asr/Offline_ASR.ipynb +++ b/tutorials/asr/Offline_ASR.ipynb @@ -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",