Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[in-progress, do-not-merge] upgrade docker build and github pipeline #4935

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ on:
- info
- warning
- debug
# pull_request: #for debugging purposes
# branches: [ "master" ]
pull_request: #for debugging purposes
#branches: [ "master" ]

jobs:
enable_build:
if: github.repository == 'kaldi-asr/kaldi'
#if: github.repository == 'kaldi-asr/kaldi'
if: if: github.repository_owner == 'jtrmal' || github.repository_owner == 'kaldi-asr'
runs-on: ubuntu-latest
outputs:
enabled: ${{ steps.set-enabled.outputs.enabled }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set enabled
Expand All @@ -38,15 +39,15 @@ jobs:
enabled=true
fi
echo "enabled: $enabled"
echo "::set-output name=enabled::${enabled}"
echo "enabled=${enabled}" >> $GITHUB_OUTPUT


docker-buildx-gpu:
needs: enable_build
if: needs.enable_build.outputs.enabled == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
if: needs.enable_build.outputs.enabled == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -94,10 +95,10 @@ jobs:
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Build and push
run: |
cd docker/debian10-cpu/
docker build --push \
cd docker/debian12-cpu/
docker build \
--tag kaldiasr/kaldi:latest \
--tag kaldiasr/kaldi:cpu-latest \
--tag kaldiasr/kaldi:cpu-debian10 \
--tag kaldiasr/kaldi:cpu-debian10-$(date +%F) .
--tag kaldiasr/kaldi:cpu-debian12 \
--tag kaldiasr/kaldi:cpu-debian12-$(date +%F) .

23 changes: 8 additions & 15 deletions docker/debian10-cpu/Dockerfile → docker/debian12-cpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM debian:10
LABEL maintainer="[email protected]"
FROM debian:12
LABEL maintainer="[email protected]"

RUN apt-get update && \
apt-get install -y --no-install-recommends \
g++ \
gfortran \
make \
automake \
autoconf \
Expand All @@ -13,29 +14,21 @@ RUN apt-get update && \
sox \
libtool \
git \
subversion \
python2.7 \
python3 \
zlib1g-dev \
ca-certificates \
gfortran \
patch \
ffmpeg \
vim && \
python-is-python3 && \
rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/bin/python3 /usr/bin/python

RUN git clone --depth 1 https://github.com/kaldi-asr/kaldi.git /opt/kaldi #EOL
RUN cd /opt/kaldi/tools && \
./extras/install_mkl.sh && \
make -j $(nproc) && \
./extras/install_openblas.sh && \
make -j 5 && \
cd /opt/kaldi/src && \
./configure --shared && \
make depend -j $(nproc) && \
make -j $(nproc) && \
find /opt/kaldi -type f \( -name "*.o" -o -name "*.la" -o -name "*.a" \) -exec rm {} \; && \
find /opt/intel -type f -name "*.a" -exec rm {} \; && \
find /opt/intel -type f -regex '.*\(_mc.?\|_mic\|_thread\|_ilp64\)\.so' -exec rm {} \; && \
rm -rf /opt/kaldi/.git
make -j 5

WORKDIR /opt/kaldi/
43 changes: 0 additions & 43 deletions docker/debian9.8-cpu/Dockerfile

This file was deleted.

44 changes: 0 additions & 44 deletions docker/ubuntu16.04-gpu/Dockerfile

This file was deleted.

44 changes: 0 additions & 44 deletions docker/ubuntu16.04-gpu/ubuntu18.04-cuda10.0

This file was deleted.

46 changes: 0 additions & 46 deletions docker/ubuntu22.04-cuda12.2.0/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,44 +1,38 @@

FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
LABEL maintainer="[email protected]"
FROM nvidia/cuda:12.6.1-cudnn-devel-ubuntu22.04
LABEL maintainer="[email protected]"

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
g++ \
make \
automake \
autoconf \
bzip2 \
unzip \
wget \
sox \
libtool \
git \
subversion \
python2.7 \
python3 \
zlib1g-dev \
gfortran \
ca-certificates \
gfortran \
patch \
ffmpeg \
vim && \
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 ln -s /usr/bin/python2.7 /usr/bin/python

RUN git clone --depth 1 https://github.com/kaldi-asr/kaldi.git /opt/kaldi && \
cd /opt/kaldi/tools && \
./extras/install_mkl.sh && \
make -j $(nproc) && \
cd /opt/kaldi/src && \
./configure --shared --use-cuda && \
make depend -j $(nproc) && \
make -j $(nproc) && \
find /opt/kaldi -type f \( -name "*.o" -o -name "*.la" -o -name "*.a" \) -exec rm {} \; && \
find /opt/intel -type f -name "*.a" -exec rm {} \; && \
find /opt/intel -type f -regex '.*\(_mc.?\|_mic\|_thread\|_ilp64\)\.so' -exec rm {} \; && \
rm -rf /opt/kaldi/.git

WORKDIR /opt/kaldi/

Loading