Add CI for train.py from librispeech

This commit is contained in:
Fangjun Kuang 2023-12-22 15:56:28 +08:00
parent 702d4f5914
commit 4fa40f5dcd
2 changed files with 64 additions and 0 deletions

7
.github/scripts/docker/Dockerfile vendored Normal file
View File

@ -0,0 +1,7 @@
FROM k2fsa/icefall:torch1.13.0-cuda11.6
WORKDIR /workspace/icefall
RUN cd egs/librispeech/ASR && \
./prepare.sh --stop-stage 1 && \
ls -lh download data

57
.github/workflows/train-librispeech.yml vendored Normal file
View File

@ -0,0 +1,57 @@
name: train librispeech
on:
push:
branches:
- ci-train
workflow_dispatch:
concurrency:
group: train-librispeech-${{ github.ref }}
cancel-in-progress: true
jobs:
train-librispeech:
name: ${{ matrix.image }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
# refer to https://github.com/actions/checkout
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Rename
shell: bash
run: |
cp -v .github/scripts/docker/Dockerfile ./Dockerfile
- name: Free space
shell: bash
run: |
df -h
rm -rf /opt/hostedtoolcache
df -h
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker Image
shell: bash
run: |
cp -v .github/scripts/docker/Dockerfile ./Dockerfile
docker build -t ghcr.io/k2-fsa/icefall:librispeech .
docker image ls