Merge branch 'ci-train-2' into ci-train

This commit is contained in:
Fangjun Kuang 2023-12-23 00:31:53 +08:00
commit 7c07f0c9b9
12 changed files with 29 additions and 16 deletions

View File

@ -1,4 +1,5 @@
ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION}
ARG TORCHAUDIO_VERSION="0.13.0"
ARG TORCH_VERSION="1.13.0"
@ -8,10 +9,9 @@ ARG KALDIFEAT_VERSION="1.25.3.dev20231221"
ARG _K2_VERSION="${K2_VERSION}+cpu.torch${TORCH_VERSION}"
ARG _KALDIFEAT_VERSION="${KALDIFEAT_VERSION}+cpu.torch${TORCH_VERSION}"
FROM python:${PYTHON_VERSION}
RUN apt-get update -y && \
apt-get install -qq -y \
ffmpeg \
git \
git-lfs \
less \

View File

@ -3,6 +3,9 @@ set -ex
cd /icefall
export PYTHONPATH=/icefall:$PYTHONPATH
python3 -c "import torch; print(torch.__file__)"
python3 -c "import torchaudio; print(torchaudio.__version__)"
python3 -c "import icefall; print(icefall.__file__)"
cd egs/librispeech/ASR

View File

@ -8,7 +8,7 @@ concurrency:
jobs:
build-cpu-docker:
name: py${{ matrix.python-version }} torch${{ matrix.torch-version }}
name: py${{ matrix.python-version }} torch${{ matrix.torch-version }} v${{ matrix.version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@ -18,6 +18,7 @@ jobs:
torch-version: ["1.13.0", "2.0.0", "2.0.1", "2.1.0", "2.1.1", "2.1.2"]
k2-version: ["1.24.4.dev20231220"]
kaldifeat-version: ["1.25.3.dev20231221"]
version: ["1.0"]
steps:
# refer to https://github.com/actions/checkout
@ -44,17 +45,22 @@ jobs:
run: |
cd .github/scripts/docker
torch_version=${{ matrix.torch-version }}
if [[ $torch_version == "1.13.0" ]]; then
if [[ $torch_version == 1.13.0 ]]; then
torchaudio_version=0.13.0
elif [[ $torch_version == "2.0.0" ]]; then
elif [[ $torch_version == 2.0.0 ]]; then
torchaudio_version=2.0.1
elif [[ $torch_version == "2.0.1" ]]; then
torchaudio_version=2.0.2"
elif [[ $torch_version == 2.0.1 ]]; then
torchaudio_version=2.0.2
else
torchaudio_version=$torch_version
fi
echo "torch_version: $torch_version"
echo "torchaudio_version: $torchaudio_version"
tag=ghcr.io/k2-fsa/icefall:cpu-py${{ matrix.python-version }}-torch${{ matrix.torch-version }}
version=${{ matrix.version }}
tag=ghcr.io/k2-fsa/icefall:cpu-py${{ matrix.python-version }}-torch${{ matrix.torch-version }}-v$version
echo "tag: $tag"
docker build \
-t $tag \

View File

@ -16,13 +16,17 @@ concurrency:
jobs:
train-librispeech:
name: ${{ matrix.python-version }}
name: py${{ matrix.python-version }} torch${{ matrix.torch-version }} v${{ matrix.version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
torch-version: ["1.13.0", "2.0.0", "2.0.1", "2.1.0", "2.1.1", "2.1.2"]
k2-version: ["1.24.4.dev20231220"]
kaldifeat-version: ["1.25.3.dev20231221"]
version: ["1.0"]
steps:
# refer to https://github.com/actions/checkout
@ -42,7 +46,7 @@ jobs:
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/k2-fsa/icefall:cpu-py${{ matrix.python-version }}
image: ghcr.io/k2-fsa/icefall:cpu-py${{ matrix.python-version }}-torch${{ matrix.torch-version }}-v${{ matrix.version }}
options: |
--volume ${{ github.workspace }}/:/icefall
shell: bash

View File

@ -0,0 +1 @@
../../../librispeech/ASR/zipformer/my_profile.py

View File

@ -1 +0,0 @@
../../../librispeech/ASR/zipformer/profile.py

View File

@ -17,7 +17,7 @@
# limitations under the License.
"""
Usage: ./pruned_transducer_stateless/profile.py
Usage: ./pruned_transducer_stateless/my_profile.py
"""
import argparse

View File

@ -17,7 +17,7 @@
# limitations under the License.
"""
Usage: ./pruned_transducer_stateless4/profile.py
Usage: ./pruned_transducer_stateless4/my_profile.py
"""
import argparse

View File

@ -17,7 +17,7 @@
# limitations under the License.
"""
Usage: ./pruned_transducer_stateless7/profile.py
Usage: ./pruned_transducer_stateless7/my_profile.py
"""
import argparse

View File

@ -17,7 +17,7 @@
# limitations under the License.
"""
Usage: ./zipformer/profile.py
Usage: ./zipformer/my_profile.py
"""
import argparse

View File

@ -0,0 +1 @@
../../../librispeech/ASR/zipformer/my_profile.py

View File

@ -1 +0,0 @@
../../../librispeech/ASR/zipformer/profile.py