Skip to content

Commit fa7558b

Browse files
committed
updating to local archived copy of openfst and Debian Bookworm
1 parent 0956d2c commit fa7558b

3 files changed

Lines changed: 33 additions & 7 deletions

File tree

Dockerfile

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
1-
# Using kaldi image for pre-built OpenFST, version is 1.7.2
2-
FROM kaldiasr/kaldi:cpu-debian10-2024-07-29 as kaldi-base
1+
# Stage 1: Build OpenFST 1.7.2 from source
2+
FROM debian:bookworm as openfst-builder
33

4-
FROM debian:11
4+
ARG OPENFST_VERSION=1.7.2
5+
ARG JOBS=4
6+
7+
# Install build dependencies for OpenFST
8+
RUN apt-get update && \
9+
apt-get upgrade -y && \
10+
apt-get install -y --no-install-recommends \
11+
g++ \
12+
make \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
# Copy and build OpenFST from local tarball
16+
WORKDIR /tmp
17+
COPY ext/openfst-${OPENFST_VERSION}.tar.gz /tmp/
18+
RUN tar -xzf openfst-${OPENFST_VERSION}.tar.gz && \
19+
cd openfst-${OPENFST_VERSION} && \
20+
./configure --prefix=/opt/openfst --enable-shared --enable-static && \
21+
make -j${JOBS} && \
22+
make install && \
23+
cd .. && \
24+
rm -rf openfst-${OPENFST_VERSION} openfst-${OPENFST_VERSION}.tar.gz
25+
26+
# Stage 2: Build fstalign
27+
FROM debian:bookworm
528

6-
COPY --from=kaldi-base /opt/kaldi/tools/openfst /opt/openfst
29+
COPY --from=openfst-builder /opt/openfst /opt/openfst
730
ENV OPENFST_ROOT /opt/openfst
831

932
ARG JOBS=4
1033

34+
# Install runtime and build dependencies
1135
RUN apt-get update && \
1236
apt-get upgrade -y && \
13-
apt-get -y install \
37+
apt-get install -y --no-install-recommends \
1438
cmake \
1539
g++ \
16-
libicu-dev
40+
make \
41+
libicu-dev \
42+
&& rm -rf /var/lib/apt/lists/*
1743

1844
RUN mkdir /fstalign
1945
COPY CMakeLists.txt /fstalign/CMakeLists.txt

ext/openfst-1.7.2.tar.gz

1.21 MB
Binary file not shown.

third-party/catch2

Submodule catch2 updated 276 files

0 commit comments

Comments
 (0)