Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGustafsson committed Jan 10, 2025
1 parent 21f9966 commit e78b5e7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.github
.gitignore
tests
.projectile
pylintrc
Dockerfile
*.md
*.in
*.ini
*.cfg
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM python:3 AS builder

WORKDIR /src

COPY . .

RUN ./script/setup && ./script/package

FROM python:3

ARG PIPER_VERSION=v1.2.0
ARG PIPER_ARCH=amd64
RUN curl -L -s "https://github.com/rhasspy/piper/releases/download/$PIPER_VERSION/piper_$PIPER_ARCH.tar.gz" | tar -zxvf - -C /usr/share

RUN --mount=type=bind,from=builder,target=/mnt/builder pip3 install /mnt/builder/src/dist/*.whl

WORKDIR /src
COPY docker-entrypoint.sh .

EXPOSE 10300/tcp
VOLUME /data
LABEL org.opencontainers.image.source=https://github.com/rhasspy/wyoming-piper

ENTRYPOINT ["./docker-entrypoint.sh"]
6 changes: 6 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
python3 -m wyoming_piper \
--piper '/usr/share/piper/piper' \
--uri 'tcp://0.0.0.0:10200' \
--data-dir /data \
--download-dir /data "$@"

0 comments on commit e78b5e7

Please sign in to comment.