Skip to content

Commit

Permalink
add cuda11 build
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrmal committed Sep 13, 2024
1 parent 8334900 commit bb6b72e
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,46 @@ jobs:
cd docker/ubuntu22.04-cuda12
docker build --tag kaldiasr/kaldi:gpu-latest --tag kaldiasr/kaldi:gpu-ubuntu22.04-cuda12 --tag kaldiasr/kaldi:gpu-ubuntu22.04-cuda12-$(date +%F) .
docker-buildx-gpu-cuda11:
needs: enable_build
if: needs.enable_build.outputs.enabled == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: AdityaGarg8/[email protected]
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
remove-swapfile: 'false'
verbose: 'true'
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Build and push
run: |
cd docker/ubuntu20.04-cuda11
docker build --tag kaldiasr/kaldi:gpu-ubuntu20.04-cuda11 --tag kaldiasr/kaldi:gpu-ubuntu20.04-cuda11-$(date +%F) .
docker-buildx-cpu:
needs: enable_build
if: needs.enable_build.outputs.enabled == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
Expand Down
40 changes: 40 additions & 0 deletions docker/ubuntu20.04-cuda11/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
LABEL maintainer="[email protected]"

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -yqq --no-install-recommends \
build-essential \
g++ \
make \
automake \
bzip2 \
unzip \
wget \
libtool \
git \
python3 \
zlib1g-dev \
ca-certificates \
gfortran \
patch \
sox \
software-properties-common && \
apt-add-repository multiverse && \
apt-get update && \
yes | DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends\
intel-mkl && \
rm -rf /var/lib/apt/lists/*


RUN git clone --depth 1 https://github.com/kaldi-asr/kaldi.git /opt/kaldi && \
cd /opt/kaldi/tools && \
make -j $(nproc) && \
cd /opt/kaldi/src && \
./configure --shared --use-cuda=yes && \
make depend -j $(nproc) && \
make -j $(nproc) && \
find /opt/kaldi -type f \( -name "*.o" -o -name "*.la" -o -name "*.a" \) -exec rm {} \; && \
rm -rf /opt/kaldi/.git

WORKDIR /opt/kaldi/

0 comments on commit bb6b72e

Please sign in to comment.