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

Dockerfile #344

Merged
merged 3 commits into from
Sep 5, 2023
Merged
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
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @benfoley @nicklambourne @harrykeightley @aviraljain99
* @benfoley @nicklambourne @harrykeightley
48 changes: 33 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ FROM ubuntu:20.04

########################## BEGIN INSTALLATION #########################

ENV NUM_CPUS=6
ENV NUM_CPUS=1

ENV TZ=UTC

# Clean up package manager
RUN apt-get clean autoclean

RUN export DEBIAN_FRONTEND="noninteractive" && apt-get update && apt-get install -y --fix-missing \
autoconf \
automake \
Expand Down Expand Up @@ -66,6 +69,9 @@ RUN echo "===> Install pyenv Python 3.10" && \

########################## KALDI INSTALLATION #########################

# Clean up package manager
RUN apt-get clean autoclean

RUN echo "===> Install Python 2.7 for Kaldi" && \
add-apt-repository universe && \
apt-get update && apt-get install -y \
Expand All @@ -86,37 +92,39 @@ RUN echo "===> Install Kaldi dependencies" && \
apt-get update && apt-get install -y \
sox \
graphviz \
ghostscript\
ffmpeg
ghostscript \
ffmpeg \
gawk

WORKDIR /

RUN echo "===> Install Kaldi (pinned at version 5.3)" && \
git clone -b 5.3 https://github.com/kaldi-asr/kaldi
COPY deps/pa_stable_v19_20111121.tgz /kaldi/tools/pa_stable_v19_20111121.tgz
COPY deps/liblbfgs-1.10.tar.gz /kaldi/tools/liblbfgs-1.10.tar.gz
COPY deps/srilm-1.7.2.tar.gz /kaldi/tools/srilm.tgz
RUN cd /kaldi/tools && make -j$NUM_CPUS && ./install_portaudio.sh
RUN cd /kaldi/src && ./configure --mathlib=ATLAS --shared && \
sed -i '/-g # -O0 -DKALDI_PARANOID/c\-O3 -DNDEBUG' kaldi.mk && \
make depend -j$NUM_CPUS && make -j$NUM_CPUS
RUN cd /kaldi/src/online2 && make depend -j$NUM_CPUS && make -j$NUM_CPUS
RUN cd /kaldi/src/online2bin && make depend -j$NUM_CPUS && make -j$NUM_CPUS

COPY deps/srilm-1.7.2.tar.gz /kaldi/tools/srilm.tgz

WORKDIR /kaldi/tools

RUN apt-get install gawk && \
chmod +x extras/* && \
./extras/install_liblbfgs.sh && \
./extras/install_srilm.sh && \
chmod +x env.sh && \
RUN chmod +x extras/*
RUN ./extras/install_liblbfgs.sh
RUN ./extras/install_srilm.sh
RUN chmod +x env.sh && \
source ./env.sh

RUN apt-get install -y libssl-dev libsqlite3-dev libbz2-dev
RUN apt-get update && apt-get install -y libssl-dev libsqlite3-dev libbz2-dev


########################## DEV HELPERS INSTALLATION ####################

# Clean up package manager
RUN apt-get clean autoclean

WORKDIR /tmp

RUN echo "===> Install dev helpers"
Expand All @@ -130,9 +138,19 @@ RUN wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \
mv jq-linux64 /usr/local/bin/jq

# Add node 18, yarn and xml-js
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get update && \
apt-get install -y nodejs build-essential && \
npm install -g npm \
RUN set -uex; \
apt-get update; \
apt-get install -y ca-certificates curl gnupg; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
NODE_MAJOR=18; \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install nodejs -y;

RUN npm install -g npm \
hash -d npm \
npm install -g xml-js yarn

Expand Down
Binary file removed deps/liblbfgs-1.10.tar
Binary file not shown.
Binary file added deps/liblbfgs-1.10.tar.gz
Binary file not shown.
Loading