From 760312ca3c0ca2e87953d7e1fa91781895574c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Re=C3=B1=C3=A9=20Claramunt?= Date: Thu, 24 Aug 2023 23:47:38 +0200 Subject: [PATCH] Add initial GPU support --- openwakeword/Dockerfile | 2 +- piper/Dockerfile | 3 ++- piper/run.sh | 1 + whisper/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/openwakeword/Dockerfile b/openwakeword/Dockerfile index 9020a62..3e956e3 100644 --- a/openwakeword/Dockerfile +++ b/openwakeword/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 ARG TARGETARCH ARG TARGETVARIANT diff --git a/piper/Dockerfile b/piper/Dockerfile index 00a2407..2c46d26 100644 --- a/piper/Dockerfile +++ b/piper/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 ARG TARGETARCH ARG TARGETVARIANT @@ -17,6 +17,7 @@ RUN \ && pip3 install --no-cache-dir -U \ setuptools \ wheel \ + onnxruntime-gpu \ && pip3 install --no-cache-dir \ "wyoming-piper==${PIPER_LIB_VERSION}" \ \ diff --git a/piper/run.sh b/piper/run.sh index 83c2382..bcdfac8 100755 --- a/piper/run.sh +++ b/piper/run.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash python3 -m wyoming_piper \ --piper '/usr/share/piper/piper' \ + --cuda \ --uri 'tcp://0.0.0.0:10200' \ --data-dir /data \ --download-dir /data "$@" diff --git a/whisper/Dockerfile b/whisper/Dockerfile index 67f9213..14fbf0a 100644 --- a/whisper/Dockerfile +++ b/whisper/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu20.04 # Install Whisper WORKDIR /usr/src