Skip to content

Commit 464f4bb

Browse files
committed
Add support for both GPU and NONGPU Dockerfiles
1 parent 760312c commit 464f4bb

File tree

11 files changed

+144
-1
lines changed

11 files changed

+144
-1
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# OpenWakeWord
2+
/openwakeword-data
3+
4+
# Piper
5+
/piper-data
6+
7+
# Porcupine1
8+
/porcupine1-data
9+
10+
# Whisper
11+
/whisper-data
12+

openwakeword/NONGPU.Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM debian:bullseye-slim
2+
ARG TARGETARCH
3+
ARG TARGETVARIANT
4+
5+
# Install openWakeWord
6+
WORKDIR /usr/src
7+
ARG OPENWAKEWORD_LIB_VERSION='1.5.1'
8+
9+
RUN \
10+
apt-get update \
11+
&& apt-get install -y --no-install-recommends \
12+
python3 \
13+
python3-pip \
14+
\
15+
&& pip3 install --no-cache-dir -U \
16+
setuptools \
17+
wheel \
18+
&& pip3 install --no-cache-dir \
19+
"wyoming-openwakeword==${OPENWAKEWORD_LIB_VERSION}" \
20+
\
21+
&& rm -rf /var/lib/apt/lists/*
22+
23+
WORKDIR /
24+
COPY run.sh ./
25+
26+
EXPOSE 10400
27+
28+
ENTRYPOINT ["bash", "/run.sh"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN \
2828
&& rm -rf /var/lib/apt/lists/*
2929

3030
WORKDIR /
31-
COPY run.sh ./
31+
COPY run-gpu.sh ./
3232

3333
EXPOSE 10200
3434

piper/NONGPU.Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM debian:bullseye-slim
2+
ARG TARGETARCH
3+
ARG TARGETVARIANT
4+
5+
# Install Piper
6+
WORKDIR /usr/src
7+
ARG PIPER_LIB_VERSION='1.3.2'
8+
ARG PIPER_RELEASE='v1.2.0'
9+
10+
RUN \
11+
apt-get update \
12+
&& apt-get install -y --no-install-recommends \
13+
curl \
14+
python3 \
15+
python3-pip \
16+
\
17+
&& pip3 install --no-cache-dir -U \
18+
setuptools \
19+
wheel \
20+
&& pip3 install --no-cache-dir \
21+
"wyoming-piper==${PIPER_LIB_VERSION}" \
22+
\
23+
&& curl -L -s \
24+
"https://github.com/rhasspy/piper/releases/download/${PIPER_RELEASE}/piper_${TARGETARCH}${TARGETVARIANT}.tar.gz" \
25+
| tar -zxvf - -C /usr/share \
26+
\
27+
&& rm -rf /var/lib/apt/lists/*
28+
29+
WORKDIR /
30+
COPY run-nongpu.sh ./
31+
32+
EXPOSE 10200
33+
34+
ENTRYPOINT ["bash", "/run.sh"]
File renamed without changes.

piper/run-nongpu.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
python3 -m wyoming_piper \
3+
--piper '/usr/share/piper/piper' \
4+
--uri 'tcp://0.0.0.0:10200' \
5+
--data-dir /data \
6+
--download-dir /data "$@"

porcupine1/GPU.Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
2+
ARG TARGETARCH
3+
ARG TARGETVARIANT
4+
5+
# Install porcupine1
6+
WORKDIR /usr/src
7+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
8+
9+
COPY ./src/ ./
10+
11+
RUN \
12+
apt-get update \
13+
&& apt-get install -y --no-install-recommends \
14+
python3 \
15+
python3-pip \
16+
\
17+
&& pip3 install --no-cache-dir -U \
18+
setuptools \
19+
wheel \
20+
&& pip3 install --no-cache-dir \
21+
--extra-index-url https://www.piwheels.org/simple \
22+
'numpy<1.26' \
23+
-r requirements.txt \
24+
\
25+
&& rm -rf /var/lib/apt/lists/*
26+
27+
WORKDIR /
28+
COPY run.sh ./
29+
30+
EXPOSE 10400
31+
32+
ENTRYPOINT ["bash", "/run.sh"]

0 commit comments

Comments
 (0)