Skip to content

Commit

Permalink
expand_aliases
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Karpov <karpnv@gmail.com>
  • Loading branch information
karpnv committed Jul 12, 2023
1 parent 6e29fad commit a7ce1b3
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# limitations under the License.

# Use this script to install KenLM, OpenSeq2Seq decoder, Flashlight decoder
shopt -s expand_aliases

NEMO_PATH=/workspace/nemo # Path to NeMo folder: /workspace/nemo if you use NeMo/Dockerfile
if [ "$#" -eq 1 ]
then
Expand All @@ -24,14 +26,14 @@ KENLM_MAX_ORDER=10 # Maximum order of KenLM model, also specified in the setup_o
cd $NEMO_PATH

if [ $(id -u) -eq 0 ]; then
alias au='apt-get update'
alias b2='./b2'
alias aptupdate='apt-get update'
alias b2install='./b2'
else
alias au='sudo apt-get update'
alias b2='sudo ./b2'
alias aptupdate='sudo apt-get update'
alias b2install='sudo ./b2'
fi

au && 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 liblzma-dev && rm -rf /var/lib/apt/lists/* # liblzma needed for flashlight decoder'

git clone https://github.com/NVIDIA/OpenSeq2Seq
cd OpenSeq2Seq
Expand All @@ -45,7 +47,7 @@ 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 && b2 --layout=tagged link=static,shared threading=multi,single install -j4 || echo FAILURE
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
Expand Down

0 comments on commit a7ce1b3

Please sign in to comment.