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

Fix builder image #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
kaldi
openfst*
openfst*
clapack-wasm
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MAKEFILE_ROOT := $(realpath $(dir $(firstword $(MAKEFILE_LIST))))
ENV :=
BUILDER_TAG ?= 0.0.6
BUILDER_TAG ?= 0.0.7
REPOSITORY = ghcr.io/ccoreilly/

ifdef DEBUG
Expand All @@ -9,10 +9,13 @@ endif

.PHONY: builder
builder:
docker build --progress=plain -f builder/Dockerfile -t ${REPOSITORY}vosk-wasm-builder:${BUILDER_TAG} builder
docker build --progress=plain -f builder/Dockerfile \
--cache-from ${REPOSITORY}vosk-wasm-builder:latest \
-t ${REPOSITORY}vosk-wasm-builder:${BUILDER_TAG} \
-t ${REPOSITORY}vosk-wasm-builder:latest builder

push-builder: builder
docker push ${REPOSITORY}vosk-wasm-builder:${BUILDER_TAG}
docker push --all-tags ${REPOSITORY}vosk-wasm-builder

.PHONY: binary
binary:
Expand Down
5 changes: 3 additions & 2 deletions builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update \

WORKDIR /opt/kaldi
RUN git clone -b vosk --single-branch https://github.com/alphacep/kaldi . && \
git checkout 6417ac1dece94783e80dfbac0148604685d27579
git checkout 173438905ccd96195982ccdc0195dc03e66cb1da
ADD kaldi.patch /tmp
RUN git apply -v /tmp/kaldi.patch

Expand All @@ -22,7 +22,8 @@ RUN emmake make -j $(nproc) CXXFLAGS="-O3 -r" LDFLAGS=-O3 OPENFST_CONFIGURE="--e
RUN find . -type f -path '*/.libs/*.a' -exec sh -xc 'mv {} $(dirname {})/..' \;

WORKDIR /opt/kaldi/tools/clapack-wasm
RUN git clone https://gitlab.inria.fr/kaldi.web/clapack-wasm.git .
RUN git clone -b master --single-branch https://github.com/ccoreilly/clapack-wasm . && \
git checkout a24a1c96415b1f39053be724012512d02bef904d
ADD clapack-wasm.patch /tmp
RUN git apply -v /tmp/clapack-wasm.patch
RUN make
Expand Down
9 changes: 5 additions & 4 deletions builder/kaldi.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ index 69aebdb26..bd66c91eb 100644

# Reset the default goal, so that the all target will become default
.DEFAULT_GOAL :=
.PHONY: all mklibdir rmlibdir checkversion
-all: $(SUBDIRS) matrix/test
+all: $(SUBDIRS) #matrix/test
-echo Done
@echo Done

mklibdir:
diff --git a/src/configure b/src/configure
Expand Down Expand Up @@ -227,9 +228,9 @@ index 000000000..3d016dc28
+--- a/configure.ac
++++ b/configure.ac
+@@ -149,40 +149,6 @@ AC_ARG_WITH([libfstdir],
+
+
+ AC_SUBST([libfstdir], $with_libfstdir)
+
+
+-# Flags may be changed after configuring, so this is checked again by
+-# weight_test.cc. The check here is to save time in the common case,
+-# or when someone does not run `make check`.
Expand Down Expand Up @@ -266,4 +267,4 @@ index 000000000..3d016dc28
+-
+ AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl])
+ AC_SUBST([DL_LIBS])
+
+
2 changes: 1 addition & 1 deletion lib/src/vosk-wasm.js

Large diffs are not rendered by default.