Skip to content

Commit

Permalink
lib vosk integration
Browse files Browse the repository at this point in the history
  • Loading branch information
e154 committed Aug 25, 2024
1 parent 983f0d2 commit f5cf88e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ jobs:

- name: trying to build
id: build-linux
run: make build_linux_amd64 build_structure build_common_structure build_archive docker_image
run: make build_linux_amd64 build_structure build_common_structure build_archive docker_image_linux_amd64
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: get_deps fmt
.DEFAULT_GOAL := build
tests: lint test
all: build_public build_linux_amd64 build_structure build_common_structure build_archive docker_image
all: build_public build_linux_amd64 build_structure build_common_structure build_archive docker_image_linux_amd64
deploy: docker_image_upload

EXEC=server
Expand Down Expand Up @@ -168,6 +168,7 @@ build_structure:
cd ${SERVER_DIR}
cp -r ${ROOT}/conf ${SERVER_DIR}
cp -r ${ROOT}/data ${SERVER_DIR}
cp ${HOME}/.vosk/libvosk/libvosk* ${SERVER_DIR}
cp ${ROOT}/LICENSE ${SERVER_DIR}
cp ${ROOT}/README* ${SERVER_DIR}
cp ${ROOT}/CONTRIBUTING.md ${SERVER_DIR}
Expand Down Expand Up @@ -231,9 +232,9 @@ docs_deploy:
git push -q upstream HEAD:gh-pages
echo -e "Done documentation deploy.\n"

docker_image:
docker_image_linux_amd64:
echo ${HOME}
cd ${SERVER_DIR} && ls -ll && docker build --build-arg libvosk=${HOME}/.vosk/libvosk/ -f ${ROOT}/bin/docker/Dockerfile -t ${DOCKER_ACCOUNT}/${IMAGE} .
cd ${SERVER_DIR} && ls -ll && docker build --build-arg app=${EXEC}-linux-amd64 -f ${ROOT}/bin/docker/Dockerfile -t ${DOCKER_ACCOUNT}/${IMAGE} .

docker_image_upload:
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
Expand All @@ -248,6 +249,7 @@ clean:
rm -rf ${SERVER_DIR}
rm -f ${ROOT}/${EXEC}-*
rm -f ${ROOT}/${CLI}-*
rm -f ${ROOT}/libvosk*
rm -f ${HOME}/${ARCHIVE}

front_client:
Expand Down
13 changes: 7 additions & 6 deletions bin/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM postgres:15 as postgres
MAINTAINER Filippov Alex <support@e154.ru>
ARG libvosk

FROM debian:12-slim
ARG app
RUN apt-get update \
&& apt-get install -y --no-install-recommends libpq5 ca-certificates iputils-ping
RUN update-ca-certificates
COPY --from=postgres /usr/lib/postgresql/15/bin/pg_dump /usr/local/bin
COPY --from=postgres /usr/lib/postgresql/15/bin/pg_restore /usr/local/bin
ENTRYPOINT ["/server-linux-amd64"]
USER nobody
RUN echo "app\n$app"
ADD conf /
ADD data /
ADD snapshots /
#ADD server-linux-amd64 /
ADD ${libvosk} /
ADD $app /
ADD libvosk* /

EXPOSE 3000
EXPOSE 3001
Expand Down Expand Up @@ -71,6 +72,6 @@ ENV GATE_PROXY_TIMEOUT="5"
ENV GATE_PROXY_IDLE_TIMEOUT="10"
ENV GATE_PROXY_SECRET_KEY=""

VOLUME $APP_DIR/snapshots
VOLUME $APP_DIR/data
VOLUME $APP_DIR/conf
VOLUME /snapshots
VOLUME /data
VOLUME /conf

0 comments on commit f5cf88e

Please sign in to comment.