-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from slackr31337/dev
First push from dev
- Loading branch information
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag wyoming-piper-gpu:$(date +%s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM nvidia/cuda:11.7.1-base-ubuntu22.04 | ||
|
||
# Install Piper | ||
WORKDIR /usr/src | ||
|
||
ARG TARGETARCH=amd64 | ||
ARG TARGETVARIANT= | ||
ARG PIPER_LIB_VERSION=1.4.0 | ||
ARG PIPER_RELEASE=v1.2.0 | ||
|
||
RUN \ | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl \ | ||
python3 \ | ||
python3-pip \ | ||
\ | ||
&& pip3 install --no-cache-dir -U \ | ||
setuptools \ | ||
wheel \ | ||
\ | ||
&& pip3 install --no-cache-dir torch \ | ||
\ | ||
&& pip3 install --no-cache-dir \ | ||
onnxruntime-gpu \ | ||
\ | ||
&& pip3 install --no-cache-dir \ | ||
"wyoming-piper==${PIPER_LIB_VERSION}" \ | ||
\ | ||
&& curl -L -s \ | ||
"https://github.com/rhasspy/piper/releases/download/${PIPER_RELEASE}/piper_${TARGETARCH}${TARGETVARIANT}.tar.gz"|tar -zxvf - -C /usr/share \ | ||
\ | ||
&& rm -rf /var/lib/apt/lists/* # buildkit | ||
|
||
|
||
WORKDIR / | ||
COPY run.sh ./ | ||
|
||
EXPOSE 10200 | ||
|
||
ENTRYPOINT ["bash", "/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker build --network=host --tag=wyoming-piper-gpu . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.10/dist-packages/nvidia/cudnn/lib/ | ||
# python3 -m wyoming_piper \ | ||
# --piper '/usr/share/piper/piper' \ | ||
# --uri 'tcp://0.0.0.0:10200' \ | ||
# --length-scale "$(bashio::config 'length_scale')" \ | ||
# --noise-scale "$(bashio::config 'noise_scale')" \ | ||
# --noise-w "$(bashio::config 'noise_w')" \ | ||
# --speaker "$(bashio::config 'speaker')" \ | ||
# --voice "$(bashio::config 'voice')" \ | ||
# --max-piper-procs "$(bashio::config 'max_piper_procs')" \ | ||
# --data-dir /data \ | ||
# --data-dir /share/piper \ | ||
# --download-dir /data "$@" | ||
python3 -m wyoming_piper \ | ||
--piper '/usr/share/piper/piper' \ | ||
--uri 'tcp://0.0.0.0:10200' \ | ||
--data-dir /data \ | ||
--data-dir /share/piper \ | ||
--download-dir /data "$@" |