From 7edf94264e4f787749fe2d6e7bf0b124e79e13f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=BBelasko?= Date: Thu, 14 Oct 2021 16:41:27 -0400 Subject: [PATCH 1/2] Script showing example installation with conda --- tools/install_from_scratch_in_conda_env.sh | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/install_from_scratch_in_conda_env.sh diff --git a/tools/install_from_scratch_in_conda_env.sh b/tools/install_from_scratch_in_conda_env.sh new file mode 100644 index 000000000..5b6248463 --- /dev/null +++ b/tools/install_from_scratch_in_conda_env.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -eou pipefail # "strict" mode +set -x # Print executed messages + +PYTHON_VER=3.8 +PYTORCH_VER=1.8.1 +CUDA_VER=11.1 + +echo Installing k2 and PyTorch +conda install -c k2-fsa -c pytorch -c conda-forge k2 python=$PYTHON_VER cudatoolkit=$CUDA_VER pytorch=$PYTORCH_VER + +echo Installing Lhotse +pip install git+https://github.com/lhotse-speech/lhotse + +echo "Installing cmake (avoids issues on older systems)" +pip install cmake + +echo Installing Icefall +pip install -e . + +echo Testing installation - imports +python -c "import k2; import lhotse; import icefall" + +echo Testing installation - yesno recipe +cd egs/yesno/ASR +./prepare.sh +tdnn/train.py +tdnn/decode.py + +echo "All set!" From ca15b32b769e111be808fd58a8c62e286d88e43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=BBelasko?= Date: Thu, 9 Dec 2021 13:56:45 -0500 Subject: [PATCH 2/2] Install torchaudio with pytorch --- tools/install_from_scratch_in_conda_env.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/install_from_scratch_in_conda_env.sh b/tools/install_from_scratch_in_conda_env.sh index 5b6248463..da0931ec8 100644 --- a/tools/install_from_scratch_in_conda_env.sh +++ b/tools/install_from_scratch_in_conda_env.sh @@ -8,7 +8,13 @@ PYTORCH_VER=1.8.1 CUDA_VER=11.1 echo Installing k2 and PyTorch -conda install -c k2-fsa -c pytorch -c conda-forge k2 python=$PYTHON_VER cudatoolkit=$CUDA_VER pytorch=$PYTORCH_VER +conda install \ + -c k2-fsa -c pytorch -c conda-forge \ + k2 \ + python=$PYTHON_VER \ + cudatoolkit=$CUDA_VER \ + pytorch=$PYTORCH_VER \ + torchaudio echo Installing Lhotse pip install git+https://github.com/lhotse-speech/lhotse