Support docker

This commit is contained in:
Fangjun Kuang 2023-07-27 17:43:25 +08:00
parent 19b942c958
commit 1f9fabc840
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,38 @@
name: Build docker image
on:
push:
branches:
- docker
workflow_dispatch:
concurrency:
group: build_docker-${{ github.ref }}
cancel-in-progress: true
jobs:
build-doc:
name: build docker image
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: k2fsa/icefall:torch1.13.0-cuda11.6

View File

@ -0,0 +1,25 @@
FROM pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
# Install dependencies
RUN pip install --no-cache-dir \
torchaudio==0.13.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html \
k2==1.24.3.dev20230725+cuda11.6.torch1.13.0 -f https://k2-fsa.github.io/k2/cuda.html \
git+https://github.com/lhotse-speech/lhotse \
kaldifeat==1.25.0.dev20230726+cuda11.6.torch1.13.0 -f https://csukuangfj.github.io/kaldifeat/cuda.html \
\
kaldifst \
kaldilm \
kaldialign \
sentencepiece>=0.1.96 \
tensorboard \
typeguard \
dill \
RUN git clone https://github.com/k2-fsa/icefall /workspace/icefall && \
cd /workspace/icefall && \
pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH /workspace/icefall:$PYTHONPATH
WORKDIR /workspace/icefall