-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
executable file
·47 lines (36 loc) · 1007 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM kaldiasr/kaldi:latest
# build latest cmake
WORKDIR /root
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
libssl-dev \
cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz && \
tar -xvf cmake-3.17.3.tar.gz
WORKDIR /root/cmake-3.17.3
# using an older cmake to build a newer cmake (>=3.13)
RUN cmake . && \
make -j$(nproc) && \
make install
# install c++ std & boost libs
RUN apt-get update && \
apt-get install -y \
g++ \
make \
automake \
libc++-dev \
libboost-all-dev
WORKDIR /root/kaldi-serve
COPY . .
# build libkaldiserve.so
RUN cd build/ && \
cmake .. -DBUILD_SHARED_LIBS=ON -DBUILD_PYTHON_MODULE=OFF && \
make -j$(nproc) VERBOSE=1 && \
cd /root/kaldi-serve
# KALDISERVE HEADERS & LIB
RUN cp build/src/libkaldiserve.so* /usr/local/lib/
RUN cp -r include/kaldiserve /usr/include/
WORKDIR /root
# cleanup
RUN rm -rf kaldi-serve cmake-*