Skip to content

Commit

Permalink
Updated some packages
Browse files Browse the repository at this point in the history
  • Loading branch information
alumae committed Apr 11, 2022
1 parent c9364d6 commit 1f384aa
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,25 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/*

RUN \
git clone -b lookahead-1.8.0 --single-branch https://github.com/alphacep/kaldi /opt/kaldi \
git clone -b vosk --single-branch https://github.com/alphacep/kaldi /opt/kaldi \
&& cd /opt/kaldi/tools \
&& sed -i 's:status=0:exit 0:g' extras/check_dependencies.sh \
&& sed -i 's:--enable-ngram-fsts:--enable-ngram-fsts --disable-bin:g' Makefile \
&& make -j $(nproc) openfst cub \
&& if [ "x$KALDI_MKL" != "x1" ] ; then \
extras/install_openblas_clapack.sh; \
else \
extras/install_mkl.sh; \
fi \
\
&& git clone -b v0.3.13 --single-branch https://github.com/xianyi/OpenBLAS \
&& git clone -b v3.2.1 --single-branch https://github.com/alphacep/clapack \
&& make -C OpenBLAS ONLY_CBLAS=1 DYNAMIC_ARCH=1 TARGET=NEHALEM USE_LOCKING=1 USE_THREAD=0 all \
&& make -C OpenBLAS PREFIX=$(pwd)/OpenBLAS/install install \
&& mkdir -p clapack/BUILD && cd clapack/BUILD && cmake .. && make -j 10 && find . -name "*.a" | xargs cp -t ../../OpenBLAS/install/lib \
&& cd /opt/kaldi/tools \
&& git clone --single-branch https://github.com/alphacep/openfst openfst \
&& cd openfst \
&& autoreconf -i \
&& CFLAGS="-g -O3" ./configure --prefix=/opt/kaldi/tools/openfst --enable-static --enable-shared --enable-far --enable-ngram-fsts --enable-lookahead-fsts --with-pic --disable-bin \
&& make -j 10 && make install \
&& cd /opt/kaldi/src \
&& if [ "x$KALDI_MKL" != "x1" ] ; then \
./configure --mathlib=OPENBLAS_CLAPACK --shared; \
else \
./configure --mathlib=MKL --shared; \
fi \
&& ./configure --mathlib=OPENBLAS_CLAPACK --shared --use-cuda=no \
&& sed -i 's:-msse -msse2:-msse -msse2:g' kaldi.mk \
&& sed -i 's: -O1 : -O3 :g' kaldi.mk \
&& make -j $(nproc) online2 lm rnnlm
&& make -j $(nproc) online2 lm rnnlm \
&& find /opt/kaldi -name "*.o" -exec rm {} \;

ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
Expand All @@ -66,18 +65,18 @@ RUN conda --version
RUN \
git clone -b intermediate_full_results https://github.com/alumae/vosk-api /opt/vosk-api \
&& cd /opt/vosk-api/src \
&& KALDI_MKL=$KALDI_MKL KALDI_ROOT=/opt/kaldi make -j $(nproc) \
&& KALDI_ROOT=/opt/kaldi OPENFST_ROOT=/opt/kaldi/tools/openfst/ OPENBLAS_ROOT=/opt/kaldi/tools/OpenBLAS/install make -j $(nproc) \
&& cd /opt/vosk-api/python \
&& python3 ./setup.py install


RUN conda install -c conda-forge pynini=2.1.3

RUN conda install pytorch=1.8.1 torchvision torchaudio=0.8.1 cpuonly -c pytorch
RUN conda install pytorch=1.10.0 torchvision torchaudio=0.10.0 cpuonly -c pytorch

RUN pip install pytorch-lightning==1.2.5 'ray[default]' torchmetrics==0.2.0 \
tokenizers pytorch-nlp py-term matplotlib scipy \
librosa lxml audiomentations pytest
librosa==0.8.0 lxml audiomentations pytest

COPY ./models /opt/models

Expand All @@ -89,7 +88,7 @@ RUN git clone https://github.com/alumae/online_speaker_change_detector.git /opt/

RUN git clone https://github.com/alumae/et-g2p-fst.git /opt/et-g2p-fst

RUN echo '2021-12-16_13:28' >/dev/null \
RUN echo '2022-04-11_15:54' >/dev/null \
&& git clone https://github.com/alumae/kiirkirjutaja.git /opt/kiirkirjutaja \
&& cd /opt/kiirkirjutaja && ln -s ../models

Expand Down

0 comments on commit 1f384aa

Please sign in to comment.