Skip to content

Commit

Permalink
Add icefall as dependencies for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ezerhouni committed Jul 26, 2022
1 parent e9ec2aa commit 3f274af
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/scripts/install-icefall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# This script installs kaldifeat into the directory ~/tmp/icefall
# which is cached by GitHub actions for later runs.

mkdir -p ~/tmp
cd ~/tmp
git clone https://github.com/k2-fsa/icefall
cd icefall
pip install -r requirements.txt
1 change: 1 addition & 0 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
python3 -c "import torch; print('torch version:', torch.__version__)"
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install sherpa
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run-streaming-conformer-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
fi
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install PyTorch ${{ matrix.torch }}
shell: bash
Expand All @@ -86,6 +87,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
Expand Down Expand Up @@ -117,6 +119,8 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
./sherpa/bin/streaming_pruned_transducer_statelessX/streaming_server.py \
--port 6006 \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-streaming-conv-emformer-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
fi
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install PyTorch ${{ matrix.torch }}
shell: bash
Expand All @@ -86,6 +87,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
Expand Down Expand Up @@ -117,6 +119,7 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
./sherpa/bin/conv_emformer_transducer_stateless2/streaming_server.py \
--port 6006 \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-streaming-test-windows-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
python3 -m pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install kaldifeat
shell: bash
Expand All @@ -84,6 +85,7 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
./sherpa/bin/pruned_stateless_emformer_rnnt2/streaming_server.py \
--decoding-method ${{ matrix.decoding }} \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-streaming-test-windows-cuda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
python3 -c "import torch; print('torch version:', torch.__version__)"
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Display CMake version
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-streaming-test-with-long-waves.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
if [[ ${{ matrix.torchaudio }} == "0.10.0" ]]; then
pip install torchaudio==${{ matrix.torchaudio }}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand All @@ -89,6 +90,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
Expand Down Expand Up @@ -126,6 +128,7 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
./sherpa/bin/pruned_stateless_emformer_rnnt2/streaming_server.py \
--decoding-method ${{ matrix.decoding }} \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-streaming-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
if [[ ${{ matrix.torchaudio }} == "0.10.0" ]]; then
pip install torchaudio==${{ matrix.torchaudio }}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand All @@ -87,6 +88,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
Expand Down Expand Up @@ -118,6 +120,7 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
./sherpa/bin/pruned_stateless_emformer_rnnt2/streaming_server.py \
--decoding-method ${{ matrix.decoding }} \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-test-aishell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
fi
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install PyTorch ${{ matrix.torch }}
shell: bash
Expand All @@ -88,6 +89,7 @@ jobs:
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
Expand Down Expand Up @@ -119,6 +121,7 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
sherpa/bin/pruned_transducer_statelessX/offline_server.py \
--decoding-method ${{ matrix.decoding }} \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-test-windows-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
python3 -m pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install kaldifeat
shell: bash
Expand All @@ -84,6 +85,8 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
sherpa/bin/pruned_transducer_statelessX/offline_server.py \
--decoding-method ${{ matrix.decoding }} \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-test-windows-cuda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
# python3 -m pip install k2==1.16.dev20220621+cuda10.1.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Display CMake version
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
fi
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install PyTorch ${{ matrix.torch }}
shell: bash
Expand All @@ -88,6 +89,7 @@ jobs:
python3 -m pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
Expand Down Expand Up @@ -119,6 +121,7 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
sherpa/bin/pruned_transducer_statelessX/offline_server.py \
--decoding-method ${{ matrix.decoding }} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
pip install torchaudio==${{ matrix.torchaudio }}
fi
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Install PyTorch ${{ matrix.torch }}
shell: bash
if: startsWith(matrix.os, 'macos')
Expand All @@ -80,6 +82,7 @@ jobs:
python3 -m pip install torch==${{ matrix.torch }} torchaudio==${{ matrix.torchaudio }} numpy -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install k2==1.16.dev20220621+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/index.html
python3 -m torch.utils.collect_env
.github/scripts/install-icefall.sh
- name: Cache kaldifeat
id: my-cache
uses: actions/cache@v2
Expand Down Expand Up @@ -107,6 +110,8 @@ jobs:
run: |
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
export PYTHONPATH=~/tmp/icefall/:$PYTHONPATH
./sherpa/bin/streaming_pruned_transducer_statelessX/streaming_server.py \
--port 6006 \
--max-batch-size 50 \
Expand Down

0 comments on commit 3f274af

Please sign in to comment.