Compare commits

...

91 Commits

Author SHA1 Message Date
LinuxServer-CI
2cff42c787
Bot Updating Package Versions 2026-02-05 15:20:07 +00:00
LinuxServer-CI
2e0dfec0fc
Bot Updating Package Versions 2026-02-02 09:35:24 +00:00
LinuxServer-CI
3cad6bd563
Bot Updating Package Versions 2026-01-30 21:04:53 +00:00
LinuxServer-CI
0da33ce54d
Bot Updating Package Versions 2026-01-30 18:10:27 +00:00
LinuxServer-CI
307cf5cea2
Bot Updating Package Versions 2026-01-26 09:08:41 +00:00
LinuxServer-CI
e2750685b6
Bot Updating Package Versions 2026-01-19 09:08:33 +00:00
LinuxServer-CI
0eae962026
Bot Updating Package Versions 2026-01-12 09:07:56 +00:00
LinuxServer-CI
3974bc948a
Bot Updating Package Versions 2025-12-29 09:05:34 +00:00
LinuxServer-CI
253406081b
Bot Updating Package Versions 2025-12-22 09:03:50 +00:00
LinuxServer-CI
c8766c166d
Bot Updating Package Versions 2025-12-08 09:04:21 +00:00
LinuxServer-CI
9b40470edd
Bot Updating Package Versions 2025-12-01 09:03:58 +00:00
LinuxServer-CI
1f36c3c912
Bot Updating Package Versions 2025-11-24 18:18:07 +00:00
LinuxServer-CI
2d0b7a9a86
Bot Updating Templated Files 2025-11-24 18:07:51 +00:00
LinuxServer-CI
104e92c663
Bot Updating Templated Files 2025-11-24 18:06:16 +00:00
Adam
af03959202
Merge pull request #15 from linuxserver/gpu-streaming-local 2025-11-24 18:04:47 +00:00
LinuxServer-CI
1fe6921c01
Bot Updating Templated Files 2025-11-18 17:43:17 +00:00
thespad
9c7cbf984e
Fix stupid streaming switch to no-streaming 2025-11-15 14:51:53 +00:00
thespad
f7af9920f0
Fix version detection 2025-11-08 14:12:11 +00:00
thespad
c8d48122c9
Enable basic CI 2025-11-08 14:09:22 +00:00
thespad
723a492818
Bring in line with main 2025-11-08 14:07:19 +00:00
thespad
ca064adc26
Run builder 2025-11-08 13:51:21 +00:00
thespad
66c8acf5a5
Merge branch 'gpu' into gpu-streaming-local 2025-11-08 13:50:30 +00:00
LinuxServer-CI
7d25e0ba6b
Bot Updating Package Versions 2025-11-03 09:02:20 +00:00
LinuxServer-CI
02171be4e0
Bot Updating Package Versions 2025-10-27 09:04:09 +00:00
LinuxServer-CI
952ee8203c
Bot Updating Templated Files 2025-10-27 08:52:21 +00:00
LinuxServer-CI
c2ced3b377
Bot Updating Package Versions 2025-10-13 09:02:05 +00:00
LinuxServer-CI
4931044daa
Bot Updating Package Versions 2025-10-06 08:58:53 +00:00
LinuxServer-CI
49ab1cfd8f
Bot Updating Package Versions 2025-09-29 09:01:23 +00:00
LinuxServer-CI
6456de8997
Bot Updating Package Versions 2025-09-22 09:00:52 +00:00
LinuxServer-CI
fcecff484b
Bot Updating Package Versions 2025-09-15 08:58:50 +00:00
LinuxServer-CI
05ec62af53
Bot Updating Package Versions 2025-09-08 09:03:22 +00:00
thespad
229fa339a0
Actually update jenkins version check 2025-08-29 21:16:58 +01:00
thespad
ec7746f332
No idea if it'll actually work 2025-08-29 16:55:35 +01:00
thespad
b9b803ef75
Run builder 2025-08-29 16:37:08 +01:00
thespad
4d9c0054c1
Support streaming & local mode, install piper from pypi 2025-08-29 16:35:18 +01:00
LinuxServer-CI
e7a2c97bb2
Bot Updating Package Versions 2025-08-25 09:02:34 +00:00
LinuxServer-CI
735881d767
Bot Updating Package Versions 2025-08-18 09:04:43 +00:00
LinuxServer-CI
9108162922
Bot Updating Package Versions 2025-08-11 09:05:59 +00:00
LinuxServer-CI
41fe0263e0
Bot Updating Package Versions 2025-08-04 21:54:09 +00:00
LinuxServer-CI
df167c4eac
Bot Updating Package Versions 2025-08-04 09:07:34 +00:00
LinuxServer-CI
d3cac6640a
Bot Updating Package Versions 2025-07-28 09:06:43 +00:00
LinuxServer-CI
09b6077538
Bot Updating Package Versions 2025-07-21 09:09:52 +00:00
LinuxServer-CI
db85c1d81f
Bot Updating Package Versions 2025-07-14 09:07:52 +00:00
LinuxServer-CI
d3ae266e97
Bot Updating Templated Files 2025-07-07 08:56:20 +00:00
LinuxServer-CI
b21ff9466a
Bot Updating Templated Files 2025-07-07 08:54:56 +00:00
LinuxServer-CI
ff3f73ed2d
Bot Updating Package Versions 2025-06-30 09:03:53 +00:00
LinuxServer-CI
af5dafb5ba
Bot Updating Package Versions 2025-06-23 09:03:21 +00:00
LinuxServer-CI
2f377ea0d2
Bot Updating Package Versions 2025-06-16 09:07:02 +00:00
LinuxServer-CI
5f3003cae1
Bot Updating Templated Files 2025-06-16 08:54:26 +00:00
LinuxServer-CI
a4edf313df
Bot Updating Package Versions 2025-06-09 09:02:13 +00:00
LinuxServer-CI
4c7c4b1303
Bot Updating Package Versions 2025-06-02 09:01:04 +00:00
LinuxServer-CI
9ec3fddc39
Bot Updating Package Versions 2025-05-19 09:14:38 +00:00
LinuxServer-CI
f9b016e80b
Bot Updating Templated Files 2025-05-19 08:53:33 +00:00
LinuxServer-CI
8df33136fe
Bot Updating Package Versions 2025-05-14 20:46:45 +00:00
LinuxServer-CI
8e9ab74431
Bot Updating Package Versions 2025-05-12 08:58:05 +00:00
LinuxServer-CI
ba55cd45c3
Bot Updating Package Versions 2025-05-05 08:58:48 +00:00
LinuxServer-CI
47e3721360
Bot Updating Package Versions 2025-04-28 10:39:02 +00:00
LinuxServer-CI
a49272dbdb
Bot Updating Package Versions 2025-04-21 08:56:41 +00:00
LinuxServer-CI
9e62f6118f
Bot Updating Package Versions 2025-04-14 09:03:01 +00:00
LinuxServer-CI
fc03888b97
Bot Updating Package Versions 2025-04-07 08:57:58 +00:00
LinuxServer-CI
e71ef951ab
Bot Updating Package Versions 2025-03-31 08:55:40 +00:00
LinuxServer-CI
e358cd9799
Bot Updating Package Versions 2025-03-24 08:55:22 +00:00
LinuxServer-CI
1e9d87a6d7
Bot Updating Package Versions 2025-03-17 09:01:16 +00:00
LinuxServer-CI
de52055928
Bot Updating Package Versions 2025-03-10 08:49:56 +00:00
LinuxServer-CI
68a1d81dfc
Bot Updating Package Versions 2025-03-03 09:00:43 +00:00
LinuxServer-CI
bdfd81e766
Bot Updating Package Versions 2025-02-24 08:53:23 +00:00
LinuxServer-CI
1e08698cc7
Bot Updating Package Versions 2025-02-17 08:55:01 +00:00
LinuxServer-CI
fa36cf385a
Bot Updating Package Versions 2025-02-10 08:59:08 +00:00
LinuxServer-CI
e552469b44
Bot Updating Templated Files 2025-02-10 08:49:50 +00:00
LinuxServer-CI
756a178628
Bot Updating Package Versions 2025-02-03 08:55:43 +00:00
LinuxServer-CI
77998fab3e
Bot Updating Templated Files 2025-02-03 08:46:31 +00:00
LinuxServer-CI
bb4c6febac
Bot Updating Templated Files 2025-02-03 08:45:41 +00:00
LinuxServer-CI
55da880819
Bot Updating Package Versions 2025-01-27 09:11:09 +00:00
LinuxServer-CI
ec3619e5ed
Bot Updating Package Versions 2025-01-20 08:52:12 +00:00
LinuxServer-CI
52154d351e
Bot Updating Package Versions 2025-01-13 08:55:20 +00:00
LinuxServer-CI
5aeea8937d
Bot Updating Package Versions 2024-12-30 08:53:37 +00:00
LinuxServer-CI
4bc36f339a
Bot Updating Package Versions 2024-12-23 09:12:05 +00:00
LinuxServer-CI
6145fcb052
Bot Updating Templated Files 2024-12-16 08:51:53 +00:00
LinuxServer-CI
6cab3b88a0
Bot Updating Templated Files 2024-12-16 08:50:34 +00:00
LinuxServer-CI
bafa4828c4
Bot Updating Package Versions 2024-12-13 15:44:19 +00:00
LinuxServer-CI
8f21e8c277
Bot Updating Templated Files 2024-12-13 15:35:59 +00:00
LinuxServer-CI
c66f8d48c2
Bot Updating Templated Files 2024-12-13 15:34:49 +00:00
LinuxServer-CI
8f75ce00c2
Bot Updating Templated Files 2024-12-13 15:33:37 +00:00
Adam
79d0c4f0c3
Merge pull request #6 from linuxserver/gpu-initial 2024-12-13 15:31:28 +00:00
thespad
ae4853dde4
Patch files at build time 2024-12-03 09:58:24 +00:00
thespad
f5b09b1d2d
Add all the other nvidia libs needed for onnx GPU support 2024-11-27 18:24:27 +00:00
thespad
d9a09878f4
Build piper from source for cuda support 2024-11-27 17:41:19 +00:00
thespad
77eb5f2342
FIx patch path 2024-11-26 16:38:06 +00:00
thespad
5ce7d5cb75
Patch cuda support into wyoming wrapper, ref https://github.com/rhasspy/wyoming-piper/pull/5 2024-11-26 16:32:05 +00:00
thespad
220a224ee6
Not multi-arch 2024-11-26 15:03:17 +00:00
thespad
69d3d769e8
Initial GPU support 2024-11-26 15:01:36 +00:00
20 changed files with 665 additions and 397 deletions

0
.editorconfig Executable file → Normal file
View File

View File

@ -6,7 +6,7 @@
* Read, and fill the Pull Request template
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord)
## Common files
@ -24,7 +24,7 @@
## Readme
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-piper/edit/main/readme-vars.yml).
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-piper/edit/gpu/readme-vars.yml).
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-piper)
@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Update the changelog
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-piper/tree/main/root), add an entry to the changelog
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-piper/tree/gpu/root), add an entry to the changelog
```yml
changelogs:

View File

@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Discord chat support
url: https://discord.gg/YWrKVTn
url: https://linuxserver.io/discord
about: Realtime support / chat with the community and the team.
- name: Discourse discussion forum

View File

@ -52,7 +52,6 @@ body:
label: CPU architecture
options:
- x86-64
- arm64
validations:
required: true
- type: textarea

View File

@ -21,7 +21,7 @@
------------------------------
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-piper/blob/main/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-piper/blob/gpu/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
------------------------------

View File

@ -8,6 +8,9 @@ on:
pull_request_review:
types: [submitted,edited,dismissed]
permissions:
contents: read
jobs:
manage-project:
permissions:

View File

@ -4,6 +4,9 @@ on:
- cron: '34 23 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
permissions:

View File

@ -3,56 +3,86 @@ name: External Trigger Main
on:
workflow_dispatch:
permissions:
contents: read
jobs:
external-trigger-main:
external-trigger-gpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: External Trigger
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/gpu'
env:
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
run: |
printf "# External trigger for docker-piper\n\n" >> $GITHUB_STEP_SUMMARY
if grep -q "^piper_main" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
if grep -q "^piper_gpu_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`piper_gpu_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
elif grep -q "^piper_gpu" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`piper_main\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`piper_gpu\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of main branch. To disable this trigger, add \`piper_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of gpu branch. To disable this trigger, add \`piper_gpu\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL "https://pypi.python.org/pypi/wyoming-piper/json" |jq -r '. | .info.version')
echo "Type is \`pip_version\`" >> $GITHUB_STEP_SUMMARY
if grep -q "^piper_gpu_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve external version for piper branch main"
FAILURE_REASON="Can't retrieve external version for piper branch gpu"
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-piper/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
image="linuxserver/piper"
tag="latest"
tag="gpu"
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fpiper%3Apull" \
| jq -r '.token')
multidigest=$(curl -s \
multidigest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Accept: application/vnd.oci.image.index.v1+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}")
if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then
# If there's a layer element it's a single-arch manifest so just get that digest
digest=$(jq -r '.config.digest' <<< "${multidigest}")
else
# Otherwise it's multi-arch or has manifest annotations
if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then
# Check for manifest annotations and delete if found
multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}")
fi
if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then
# If there's still more than one digest, it's multi-arch
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
else
# Otherwise it's single arch
multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}")
fi
if digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}" \
| jq -r 'first(.manifests[].digest)')
digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
| jq -r '.config.digest')
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
digest=$(jq -r '.config.digest' <<< "${digest}");
fi
fi
image_info=$(curl -sL \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/blobs/${digest}")
@ -66,35 +96,35 @@ jobs:
if [ -z "${IMAGE_VERSION}" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve last pushed version for piper tag latest"
FAILURE_REASON="Can't retrieve last pushed version for piper tag gpu"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/gpu/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
exit 0
else
if [[ "${artifacts_found}" == "false" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="New version ${EXT_RELEASE} for piper tag latest is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
FAILURE_REASON="New version ${EXT_RELEASE} for piper tag gpu is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
else
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
if "${artifacts_found}" == "true" ]]; then
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
if [[ "${artifacts_found}" == "true" ]]; then
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
fi
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/main/buildWithParameters?PACKAGE_CHECK=false \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/gpu/buildWithParameters?PACKAGE_CHECK=false \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
@ -109,7 +139,7 @@ jobs:
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"
echo "**** Notifying Discord ****"
TRIGGER_REASON="A version change was detected for piper tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
TRIGGER_REASON="A version change was detected for piper tag gpu. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

View File

@ -5,6 +5,9 @@ on:
- cron: '30 * * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest

View File

@ -2,12 +2,18 @@ name: Greetings
on: [pull_request_target, issues]
permissions:
contents: read
jobs:
greeting:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-piper/blob/main/.github/PULL_REQUEST_TEMPLATE.md)!'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-piper/blob/gpu/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -5,6 +5,9 @@ on:
- cron: '35 8 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
@ -27,9 +30,18 @@ jobs:
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-piper/${br}/jenkins-vars.yml)
if [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-piper/${br}/Jenkinsfile >/dev/null 2>&1; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
if [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-piper/${br}/readme-vars.yml)
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
@ -37,7 +49,7 @@ jobs:
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`piper_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/${br}/lastBuild/api/json | jq -r '.building') == "true" ]; then
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
skipped_branches="${skipped_branches}${br} "
@ -49,6 +61,11 @@ jobs:
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
if [[ -z "${response}" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Jenkins build could not be triggered. Skipping branch."
continue
fi
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
@ -56,11 +73,14 @@ jobs:
buildurl="${buildurl%$'\r'}"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
if ! curl -ifX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"
--data-urlencode "Submit=Submit"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Unable to change the Jenkins job description."
fi
sleep 20
fi
else

View File

@ -24,17 +24,15 @@ RUN \
pip \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \
nvidia-cublas-cu12 \
nvidia-cuda-nvrtc-cu12 \
nvidia-cuda-runtime-cu12 \
"nvidia-cudnn-cu12>=9.0,<10.0" \
nvidia-cufft-cu12 \
nvidia-curand-cu12 \
onnxruntime-gpu \
piper-tts \
"wyoming-piper==${PIPER_VERSION}" && \
if [ -z ${PIPER_BIN_VERSION+x} ]; then \
PIPER_BIN_VERSION=$(curl -sL "https://api.github.com/repos/rhasspy/piper/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -sL -o \
/tmp/piper.tar.gz -L \
"https://github.com/rhasspy/piper/releases/download/${PIPER_BIN_VERSION}/piper_linux_x86_64.tar.gz" && \
tar xzf \
/tmp/piper.tar.gz -C \
/usr/share && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \

View File

@ -1,48 +0,0 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
# set version label
ARG BUILD_DATE
ARG VERSION
ARG PIPER_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad"
ENV DEBIAN_FRONTEND="noninteractive" \
TMPDIR="/run/piper-temp"
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
python3-venv && \
if [ -z ${PIPER_VERSION+x} ]; then \
PIPER_VERSION=$(curl -sL https://pypi.python.org/pypi/wyoming-piper/json |jq -r '. | .info.version'); \
fi && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir \
pip \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \
"wyoming-piper==${PIPER_VERSION}" && \
if [ -z ${PIPER_BIN_VERSION+x} ]; then \
PIPER_BIN_VERSION=$(curl -sL "https://api.github.com/repos/rhasspy/piper/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -sL -o \
/tmp/piper.tar.gz -L \
"https://github.com/rhasspy/piper/releases/download/${PIPER_BIN_VERSION}/piper_linux_aarch64.tar.gz" && \
tar xzf \
/tmp/piper.tar.gz -C \
/usr/share && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/*
COPY root /
VOLUME /config
EXPOSE 10200

490
Jenkinsfile vendored
View File

@ -8,7 +8,7 @@ pipeline {
}
// Input to determine if this is a package check
parameters {
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
}
// Configuration for the variables used for this specific repo
environment {
@ -28,7 +28,7 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/piper'
PR_DOCKERHUB_IMAGE = 'lspipepr/piper'
DIST_IMAGE = 'ubuntu'
MULTIARCH='true'
MULTIARCH='false'
CI='true'
CI_WEB='false'
CI_DELAY='120'
@ -55,15 +55,27 @@ pipeline {
steps{
echo "Running on node: ${NODE_NAME}"
sh '''#! /bin/bash
containers=$(docker ps -aq)
echo "Pruning builder"
docker builder prune -f --builder container || :
containers=$(docker ps -q)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
for container in ${containers}; do
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
echo "skipping buildx container in docker stop"
else
echo "Stopping container ${container}"
docker stop ${container}
fi
done
fi
docker system prune -af --volumes || : '''
docker system prune -f --volumes || :
docker image prune -af || :
'''
script{
env.EXIT_STATUS = ''
env.LS_RELEASE = sh(
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:gpu 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
@ -81,7 +93,11 @@ pipeline {
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml'
if ( env.SYFT_IMAGE_TAG == null ) {
env.SYFT_IMAGE_TAG = 'latest'
}
}
echo "Using syft image tag ${SYFT_IMAGE_TAG}"
sh '''#! /bin/bash
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
script{
@ -92,7 +108,7 @@ pipeline {
script{
env.LS_TAG_NUMBER = sh(
script: '''#! /bin/bash
tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null)
tagsha=$(git rev-list -n 1 gpu-${LS_RELEASE} 2>/dev/null)
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
echo ${LS_RELEASE_NUMBER}
elif [ -z "${GIT_COMMIT}" ]; then
@ -169,10 +185,10 @@ pipeline {
}
}
}
// If this is a main build use live docker endpoints
// If this is a gpu build use live docker endpoints
stage("Set ENV live build"){
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -182,20 +198,22 @@ pipeline {
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = 'amd64-gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = 'gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.META_TAG = 'gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = 'gpu-version-' + env.EXT_RELEASE_CLEAN
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
env.CITEST_IMAGETAG = 'latest'
}
}
}
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "main"}
not {branch "gpu"}
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -205,14 +223,16 @@ pipeline {
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.CI_TAGS = 'amd64-gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.CI_TAGS = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
}
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.META_TAG = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.EXT_RELEASE_TAG = 'gpu-version-' + env.EXT_RELEASE_CLEAN
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
env.CITEST_IMAGETAG = 'develop'
}
}
}
@ -228,15 +248,17 @@ pipeline {
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = 'amd64-gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
}
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.META_TAG = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.EXT_RELEASE_TAG = 'gpu-version-' + env.EXT_RELEASE_CLEAN
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
env.CITEST_IMAGETAG = 'develop'
}
}
}
@ -259,7 +281,7 @@ pipeline {
-v ${WORKSPACE}:/mnt \
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
ghcr.io/linuxserver/baseimage-alpine:3 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
apk add --no-cache python3 && \
python3 -m venv /lsiopy && \
pip install --no-cache-dir -U pip && \
@ -271,7 +293,7 @@ pipeline {
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
@ -283,24 +305,24 @@ pipeline {
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
# Cloned repo paths for templating:
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch main of ${LS_USER}/${LS_REPO} for running the jenkins builder on
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch main of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch gpu of ${LS_USER}/${LS_REPO} for running the jenkins builder on
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch gpu of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
git clone --branch main --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
git clone --branch gpu --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
echo "Starting Stage 1 - Jenkinsfile update"
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f main
git checkout -f gpu
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
git add Jenkinsfile
git commit -m 'Bot Updating Templated Files'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
@ -319,13 +341,13 @@ pipeline {
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f main
git checkout -f gpu
for i in ${TEMPLATES_TO_DELETE}; do
git rm "${i}"
done
git commit -m 'Bot Updating Templated Files'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
@ -333,6 +355,35 @@ pipeline {
else
echo "No templates to delete"
fi
echo "Starting Stage 2.5 - Update init diagram"
if ! grep -q 'init_diagram:' readme-vars.yml; then
echo "Adding the key 'init_diagram' to readme-vars.yml"
sed -i '\\|^#.*changelog.*$|d' readme-vars.yml
sed -i 's|^changelogs:|# init diagram\\ninit_diagram:\\n\\n# changelog\\nchangelogs:|' readme-vars.yml
fi
mkdir -p ${TEMPDIR}/d2
docker run --rm -v ${TEMPDIR}/d2:/output -e PUID=$(id -u) -e PGID=$(id -g) -e RAW="true" ghcr.io/linuxserver/d2-builder:latest ${CONTAINER_NAME}:gpu
ls -al ${TEMPDIR}/d2
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-gpu.d2\\")" readme-vars.yml
if [[ $(md5sum readme-vars.yml | cut -c1-8) != $(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/readme-vars.yml | cut -c1-8) ]]; then
echo "'init_diagram' has been updated. Updating repo and exiting build, new one will trigger based on commit."
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f gpu
cp ${WORKSPACE}/readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/readme-vars.yml
git add readme-vars.yml
git commit -m 'Bot Updating Templated Files'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Init diagram is unchanged"
fi
echo "Starting Stage 3 - Update templates"
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
@ -341,7 +392,7 @@ pipeline {
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f main
git checkout -f gpu
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
@ -354,8 +405,8 @@ pipeline {
fi
git add readme-vars.yml ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
@ -456,7 +507,7 @@ pipeline {
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
@ -469,10 +520,10 @@ pipeline {
}
}
}
// If this is a main build check the S6 service file perms
// If this is a gpu build check the S6 service file perms
stage("Check S6 Service file Permissions"){
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
@ -539,10 +590,47 @@ pipeline {
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Piper\" \
--label \"org.opencontainers.image.description=[Piper](https://github.com/rhasspy/piper/) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.\" \
--label \"org.opencontainers.image.description=[Piper](https://github.com/rhasspy/wyoming-piper) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.\" \
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--provenance=true --sbom=true --builder=container --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
docker tag ${IMAGE}:${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
done
'''
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
declare -A pids
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
pids[$!]="$i"
done
for p in "${!pids[@]}"; do
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
done
fi
'''
}
}
}
}
// Build MultiArch Docker containers for push to LS Repo
@ -571,10 +659,47 @@ pipeline {
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Piper\" \
--label \"org.opencontainers.image.description=[Piper](https://github.com/rhasspy/piper/) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.\" \
--label \"org.opencontainers.image.description=[Piper](https://github.com/rhasspy/wyoming-piper) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.\" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--provenance=true --sbom=true --builder=container --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh '''#! /bin/bash
set -e
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
docker tag ${IMAGE}:amd64-${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
done
'''
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
declare -A pids
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
pids[$!]="$i"
done
for p in "${!pids[@]}"; do
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
done
fi
'''
}
}
}
}
stage('Build ARM64') {
@ -583,10 +708,6 @@ pipeline {
}
steps {
echo "Running on node: ${NODE_NAME}"
echo 'Logging into Github'
sh '''#! /bin/bash
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
'''
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
sh "docker buildx build \
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
@ -600,20 +721,54 @@ pipeline {
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Piper\" \
--label \"org.opencontainers.image.description=[Piper](https://github.com/rhasspy/piper/) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.\" \
--label \"org.opencontainers.image.description=[Piper](https://github.com/rhasspy/wyoming-piper) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.\" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
--provenance=false --sbom=false \
--provenance=true --sbom=true --builder=container --load \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
retry_backoff(5,5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
sh '''#! /bin/bash
set -e
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
docker tag ${IMAGE}:arm64v8-${META_TAG} ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
done
'''
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
declare -A pids
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} &
pids[$!]="$i"
done
for p in "${!pids[@]}"; do
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
done
fi
'''
}
}
sh '''#! /bin/bash
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
fi
docker system prune -af --volumes || : '''
docker system prune -f --volumes || :
docker image prune -af || :
'''
}
}
}
@ -621,7 +776,7 @@ pipeline {
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
@ -638,20 +793,20 @@ pipeline {
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v ${TEMPDIR}:/tmp \
ghcr.io/anchore/syft:latest \
ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f main
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f gpu
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
wait
git add package_versions.txt
git commit -m 'Bot Updating Package Versions'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git main
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process"
else
@ -669,7 +824,7 @@ pipeline {
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
@ -683,7 +838,7 @@ pipeline {
// Exit the build if this is just a package check and there are no changes to push
stage('PACKAGECHECK-exit') {
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
@ -725,7 +880,7 @@ pipeline {
CI_DOCKERENV="LSIO_FIRST_PARTY=true"
fi
fi
docker pull ghcr.io/linuxserver/ci:latest
docker pull ghcr.io/linuxserver/ci:${CITEST_IMAGETAG}
if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
@ -737,7 +892,7 @@ pipeline {
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e RELEASE_TAG=\"latest\" \
-e RELEASE_TAG=\"gpu\" \
-e PORT=\"${CI_PORT}\" \
-e SSL=\"${CI_SSL}\" \
-e BASE=\"${DIST_IMAGE}\" \
@ -748,7 +903,10 @@ pipeline {
-e WEB_AUTH=\"${CI_AUTH}\" \
-e WEB_PATH=\"${CI_WEBPATH}\" \
-e NODE_NAME=\"${NODE_NAME}\" \
-t ghcr.io/linuxserver/ci:latest \
-e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \
-e COMMIT_SHA=\"${COMMIT_SHA}\" \
-e BUILD_NUMBER=\"${BUILD_NUMBER}\" \
-t ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} \
python3 test_build.py'''
}
}
@ -763,37 +921,25 @@ pipeline {
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
fi
docker push ${PUSHIMAGE}:latest
docker push ${PUSHIMAGE}:${META_TAG}
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${PUSHIMAGE}:${SEMVER}
fi
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
for PUSHIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
[[ ${PUSHIMAGE%%/*} =~ \\. ]] && PUSHIMAGEPLUS="${PUSHIMAGE}" || PUSHIMAGEPLUS="docker.io/${PUSHIMAGE}"
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
if [[ "${PUSHIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
CACHEIMAGE=${i}
fi
done
'''
}
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:gpu -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
if [ -n "${SEMVER}" ]; then
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
fi
done
'''
}
}
}
@ -804,64 +950,48 @@ pipeline {
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [ "${CI}" == "false" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
[[ ${MANIFESTIMAGE%%/*} =~ \\. ]] && MANIFESTIMAGEPLUS="${MANIFESTIMAGE}" || MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}"
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
for i in "${CACHE[@]}"; do
if [[ "${MANIFESTIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
CACHEIMAGE=${i}
fi
done
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-gpu -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-gpu -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
if [ -n "${SEMVER}" ]; then
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
fi
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:amd64-latest
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-latest
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
done
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker buildx imagetools create -t ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
done
'''
}
done
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker buildx imagetools create -t ${MANIFESTIMAGE}:gpu ${MANIFESTIMAGE}:amd64-gpu ${MANIFESTIMAGE}:arm64v8-gpu || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
if [ -n "${SEMVER}" ]; then
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} || \
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
fi
done
'''
}
}
}
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "main"
branch "gpu"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
@ -869,36 +999,54 @@ pipeline {
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Pushing New tag for current commit ${META_TAG}"
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${META_TAG}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
"type": "commit",\
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Auto-generating release notes"
if [ "$(git tag --points-at HEAD)" != "" ]; then
echo "Existing tag points to current commit, suggesting no new LS changes"
AUTO_RELEASE_NOTES="No changes"
else
AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
-d '{"tag_name":"'${META_TAG}'",\
"target_commitish": "gpu"}' \
| jq -r '.body' | sed 's|## What.s Changed||')
fi
echo "Pushing New tag for current commit ${META_TAG}"
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${META_TAG}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to gpu",\
"type": "commit",\
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
echo "Pushing New release for Tag"
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "main",\
"name": "'${META_TAG}'",\
"body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**PIP Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": false}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
jq -n \
--arg tag_name "$META_TAG" \
--arg target_commitish "gpu" \
--arg ci_url "${CI_URL:-N/A}" \
--arg ls_notes "$AUTO_RELEASE_NOTES" \
--arg remote_notes "$(cat releasebody.json)" \
'{
"tag_name": $tag_name,
"target_commitish": $target_commitish,
"name": $tag_name,
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
"draft": false,
"prerelease": true }' > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
'''
}
}
// Add protection to the release branch
stage('Github-Release-Branch-Protection') {
when {
branch "main"
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Setting up protection for release branch main"
echo "Setting up protection for release branch gpu"
sh '''#! /bin/bash
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/main/protection \
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/gpu/protection \
-d $(jq -c . << EOF
{
"required_status_checks": null,
@ -1060,12 +1208,22 @@ EOF
}
cleanup {
sh '''#! /bin/bash
echo "Performing docker system prune!!"
containers=$(docker ps -aq)
echo "Pruning builder!!"
docker builder prune -f --builder container || :
containers=$(docker ps -q)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
for container in ${containers}; do
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
echo "skipping buildx container in docker stop"
else
echo "Stopping container ${container}"
docker stop ${container}
fi
done
fi
docker system prune -af --volumes || :
docker system prune -f --volumes || :
docker image prune -af || :
'''
cleanWs()
}

0
LICENSE Executable file → Normal file
View File

View File

@ -1,11 +1,10 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read https://github.com/linuxserver/docker-piper/blob/main/.github/CONTRIBUTING.md -->
<!-- Please read https://github.com/linuxserver/docker-piper/blob/gpu/.github/CONTRIBUTING.md -->
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://linuxserver.io/discord "realtime support / chat with the community and the team.")
[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.")
[![Fleet](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.")
[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
@ -20,9 +19,8 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container r
Find us at:
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team.
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
@ -36,34 +34,43 @@ Find us at:
[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/piper)
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/piper.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/piper)
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/piper.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/piper)
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-piper%2Fjob%2Fmain%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/main/)
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fpiper%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/piper/latest/index.html)
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-piper%2Fjob%2Fgpu%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-piper/job/gpu/)
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fpiper%2Fgpu%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/piper/gpu/index.html)
[Piper](https://github.com/rhasspy/piper/) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.
[Piper](https://github.com/rhasspy/wyoming-piper) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper.
[![piper](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/piper-logo.png)](https://github.com/rhasspy/piper/)
[![piper](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/piper-logo.png)](https://github.com/rhasspy/wyoming-piper)
## Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `lscr.io/linuxserver/piper:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
Simply pulling `lscr.io/linuxserver/piper:gpu` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| armhf | ❌ | |
| arm64 | ❌ | |
## Version Tags
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
| Tag | Available | Description |
| :----: | :----: |--- |
| latest | ✅ | Stable releases |
| gpu | ✅ | Releases with Nvidia GPU support (amd64 only) |
## Application Setup
For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), add the Wyoming integration and supply the hostname/IP and port that piper is running add-on."
For more information see the [piper docs](https://github.com/rhasspy/piper/),
When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details.
For more information see the [wyoming piper docs](https://github.com/rhasspy/wyoming-piper),
## Read-Only Operation
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
@ -72,24 +79,28 @@ This image can be run with a read-only container filesystem. For details please
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
>[!NOTE]
>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
```yaml
---
services:
piper:
image: lscr.io/linuxserver/piper:latest
image: lscr.io/linuxserver/piper:gpu
container_name: piper
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- PIPER_VOICE=en_US-lessac-medium
- LOCAL_ONLY= #optional
- PIPER_LENGTH=1.0 #optional
- PIPER_NOISE=0.667 #optional
- PIPER_NOISEW=0.333 #optional
- PIPER_SPEAKER=0 #optional
- PIPER_PROCS=1 #optional
- NO_STREAMING= #optional
volumes:
- /path/to/piper/data:/config
ports:
@ -106,15 +117,16 @@ docker run -d \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e PIPER_VOICE=en_US-lessac-medium \
-e LOCAL_ONLY= `#optional` \
-e PIPER_LENGTH=1.0 `#optional` \
-e PIPER_NOISE=0.667 `#optional` \
-e PIPER_NOISEW=0.333 `#optional` \
-e PIPER_SPEAKER=0 `#optional` \
-e PIPER_PROCS=1 `#optional` \
-e NO_STREAMING= `#optional` \
-p 10200:10200 \
-v /path/to/piper/data:/config \
--restart unless-stopped \
lscr.io/linuxserver/piper:latest
lscr.io/linuxserver/piper:gpu
```
## Parameters
@ -123,16 +135,17 @@ Containers are configured using parameters passed at runtime (such as those abov
| Parameter | Function |
| :----: | --- |
| `-p 10200` | Wyoming connection port. |
| `-p 10200:10200` | Wyoming connection port. |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e PIPER_VOICE=en_US-lessac-medium` | The [Piper voice](https://huggingface.co/rhasspy/piper-voices/tree/main) to use, in the format `<language>-<name>-<quality>` |
| `-e LOCAL_ONLY=` | If set to `true`, or any other value, the container will not attempt to download models from HuggingFace and will only use locally-provided models. |
| `-e PIPER_LENGTH=1.0` | Voice speaking rate, 1.0 is default with < 1.0 being faster and > 1.0 being slower. |
| `-e PIPER_NOISE=0.667` | Controls the variability of the voice by adding noise. Values above 1 will start to degrade audio. |
| `-e PIPER_NOISEW=0.333` | Controls the variability of speaking cadence. Values above 1 produce extreme stutters and pauses. |
| `-e PIPER_SPEAKER=0` | Speaker number to use if the voice supports multiple speakers. |
| `-e PIPER_PROCS=1` | Number of Piper processes to run simultaneously. |
| `-e NO_STREAMING=` | Setting to `true`, or any other value, will disable support for streaming audio on sentence boundaries. |
| `-v /config` | Local path for piper config files. |
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
@ -200,7 +213,7 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
* Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/piper:latest
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/piper:gpu
```
## Updating Info
@ -248,7 +261,7 @@ Below are the instructions for updating containers:
* Update the image:
```bash
docker pull lscr.io/linuxserver/piper:latest
docker pull lscr.io/linuxserver/piper:gpu
```
* Stop the running container:
@ -285,7 +298,7 @@ cd docker-piper
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/piper:latest .
-t lscr.io/linuxserver/piper:gpu .
```
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
@ -298,5 +311,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **15.11.25:** - Add streaming support & support for local only mode.
* **26.11.24:** - Add GPU branch.
* **18.07.24:** - Rebase to Ubuntu Noble.
* **25.11.23:** - Initial Release.

View File

@ -3,9 +3,9 @@
# jenkins variables
project_name: docker-piper
external_type: pip_version
release_type: stable
release_tag: latest
ls_branch: main
release_type: prerelease
release_tag: gpu
ls_branch: gpu
repo_vars:
- EXT_PIP = 'wyoming-piper'
- BUILD_VERSION_ARG = 'PIPER_VERSION'
@ -16,7 +16,7 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/piper'
- PR_DOCKERHUB_IMAGE = 'lspipepr/piper'
- DIST_IMAGE = 'ubuntu'
- MULTIARCH='true'
- MULTIARCH='false'
- CI='true'
- CI_WEB='false'
- CI_DELAY='120'

View File

@ -1,160 +1,181 @@
NAME VERSION TYPE
Simple Launcher 1.1.0.14 dotnet (+5 duplicates)
Simple Launcher 1.1.0.14 binary (+5 duplicates)
adduser 3.137ubuntu1 deb
apt 2.7.14build2 deb
apt-utils 2.7.14build2 deb
base-files 13ubuntu10.1 deb
apt 2.8.3 deb
apt-utils 2.8.3 deb
base-files 13ubuntu10.3 deb
base-passwd 3.6.3build1 deb
bash 5.2.21-2ubuntu4 deb
bsdutils 1:2.39.3-9ubuntu6.1 deb
bsdutils 1:2.39.3-9ubuntu6.4 deb
ca-certificates 20240203 deb
catatonit 0.1.7-1 deb
coreutils 9.4-3ubuntu6 deb
coloredlogs 15.0.1 python
coreutils 9.4-3ubuntu6.1 deb
cron 3.0pl1-184ubuntu2 deb
cron-daemon-common 3.0pl1-184ubuntu2 deb
curl 8.5.0-2ubuntu10.4 deb
curl 8.5.0-2ubuntu10.6 deb
dash 0.5.12-6ubuntu5 deb
debconf 1.5.86ubuntu1 deb
debianutils 5.17build1 deb
diffutils 1:3.10-1build1 deb
dirmngr 2.4.4-2ubuntu17 deb
dpkg 1.22.6ubuntu6.1 deb
dirmngr 2.4.4-2ubuntu17.4 deb
dpkg 1.22.6ubuntu6.5 deb
e2fsprogs 1.47.0-2.4~exp1ubuntu4.1 deb
findutils 4.9.0-5build1 deb
flatbuffers 25.12.19 python
gcc-14-base 14.2.0-4ubuntu2~24.04 deb
gnupg 2.4.4-2ubuntu17 deb
gnupg-l10n 2.4.4-2ubuntu17 deb
gnupg-utils 2.4.4-2ubuntu17 deb
gpg 2.4.4-2ubuntu17 deb
gpg-agent 2.4.4-2ubuntu17 deb
gpg-wks-client 2.4.4-2ubuntu17 deb
gpgconf 2.4.4-2ubuntu17 deb
gpgsm 2.4.4-2ubuntu17 deb
gpgv 2.4.4-2ubuntu17 deb
gnupg 2.4.4-2ubuntu17.4 deb
gnupg-l10n 2.4.4-2ubuntu17.4 deb
gnupg-utils 2.4.4-2ubuntu17.4 deb
gpg 2.4.4-2ubuntu17.4 deb
gpg-agent 2.4.4-2ubuntu17.4 deb
gpg-wks-client 2.4.4-2ubuntu17.4 deb
gpgconf 2.4.4-2ubuntu17.4 deb
gpgsm 2.4.4-2ubuntu17.4 deb
gpgv 2.4.4-2ubuntu17.4 deb
grep 3.11-4build1 deb
gzip 1.12-1ubuntu3 deb
gzip 1.12-1ubuntu3.1 deb
hostname 3.23+nmu2ubuntu2 deb
humanfriendly 10.0 python
init-system-helpers 1.66ubuntu1 deb
jq 1.7.1-3build1 deb
keyboxd 2.4.4-2ubuntu17 deb
krb5-locales 1.20.1-6ubuntu2.1 deb
libacl1 2.3.2-1build1 deb
libapt-pkg6.0t64 2.7.14build2 deb
jq 1.7.1-3ubuntu0.24.04.1 deb
keyboxd 2.4.4-2ubuntu17.4 deb
krb5-locales 1.20.1-6ubuntu2.6 deb
libacl1 2.3.2-1build1.1 deb
libapt-pkg6.0t64 2.8.3 deb
libassuan0 2.5.6-1build1 deb
libattr1 1:2.5.2-1build1 deb
libaudit-common 1:3.1.2-2.1build1 deb
libaudit1 1:3.1.2-2.1build1 deb
libblkid1 2.39.3-9ubuntu6.1 deb
libattr1 1:2.5.2-1build1.1 deb
libaudit-common 1:3.1.2-2.1build1.1 deb
libaudit1 1:3.1.2-2.1build1.1 deb
libblkid1 2.39.3-9ubuntu6.4 deb
libbrotli1 1.1.0-2build2 deb
libbsd0 0.12.1-1build1 deb
libbsd0 0.12.1-1build1.1 deb
libbz2-1.0 1.0.8-5.1build0.1 deb
libc-bin 2.39-0ubuntu8.3 deb
libc6 2.39-0ubuntu8.3 deb
libc-bin 2.39-0ubuntu8.7 deb
libc6 2.39-0ubuntu8.7 deb
libcap-ng0 0.8.4-2build2 deb
libcap2 1:2.66-5ubuntu2 deb
libcap2 1:2.66-5ubuntu2.2 deb
libcom-err2 1.47.0-2.4~exp1ubuntu4.1 deb
libcrypt1 1:4.4.36-4build1 deb
libcurl4t64 8.5.0-2ubuntu10.4 deb
libcurl4t64 8.5.0-2ubuntu10.6 deb
libdb5.3t64 5.3.28+dfsg2-7 deb
libdebconfclient0 0.271ubuntu3 deb
libexpat1 2.6.1-2ubuntu0.1 deb
libexpat1 2.6.1-2ubuntu0.3 deb
libext2fs2t64 1.47.0-2.4~exp1ubuntu4.1 deb
libffi8 3.4.6-1build1 deb
libgcc-s1 14.2.0-4ubuntu2~24.04 deb
libgcrypt20 1.10.3-2build1 deb
libgmp10 2:6.3.0+dfsg-2ubuntu6 deb
libgnutls30t64 3.8.3-1.1ubuntu3.2 deb
libgpg-error0 1.47-3build2 deb
libgssapi-krb5-2 1.20.1-6ubuntu2.1 deb
libgmp10 2:6.3.0+dfsg-2ubuntu6.1 deb
libgnutls30t64 3.8.3-1.1ubuntu3.4 deb
libgpg-error0 1.47-3build2.1 deb
libgssapi-krb5-2 1.20.1-6ubuntu2.6 deb
libhogweed6t64 3.9.1-2.2build1.1 deb
libidn2-0 2.3.7-2build1 deb
libjq1 1.7.1-3build1 deb
libk5crypto3 1.20.1-6ubuntu2.1 deb
libidn2-0 2.3.7-2build1.1 deb
libjq1 1.7.1-3ubuntu0.24.04.1 deb
libk5crypto3 1.20.1-6ubuntu2.6 deb
libkeyutils1 1.6.3-3build1 deb
libkrb5-3 1.20.1-6ubuntu2.1 deb
libkrb5support0 1.20.1-6ubuntu2.1 deb
libkrb5-3 1.20.1-6ubuntu2.6 deb
libkrb5support0 1.20.1-6ubuntu2.6 deb
libksba8 1.6.6-1build1 deb
libldap-common 2.6.7+dfsg-1~exp1ubuntu8 deb
libldap2 2.6.7+dfsg-1~exp1ubuntu8 deb
libldap-common 2.6.10+dfsg-0ubuntu0.24.04.1 deb
libldap2 2.6.10+dfsg-0ubuntu0.24.04.1 deb
liblz4-1 1.9.4-1build1.1 deb
liblzma5 5.6.1+really5.4.5-1build0.1 deb
libmd0 1.1.0-2build1 deb
libmount1 2.39.3-9ubuntu6.1 deb
liblzma5 5.6.1+really5.4.5-1ubuntu0.2 deb
libmd0 1.1.0-2build1.1 deb
libmount1 2.39.3-9ubuntu6.4 deb
libncursesw6 6.4+20240113-1ubuntu2 deb
libnettle8t64 3.9.1-2.2build1.1 deb
libnghttp2-14 1.59.0-1ubuntu0.1 deb
libnghttp2-14 1.59.0-1ubuntu0.2 deb
libnpth0t64 1.6-3.1build1 deb
libonig5 6.9.9-1build1 deb
libp11-kit0 0.25.3-4ubuntu2.1 deb
libpam-modules 1.5.3-5ubuntu5.1 deb
libpam-modules-bin 1.5.3-5ubuntu5.1 deb
libpam-runtime 1.5.3-5ubuntu5.1 deb
libpam0g 1.5.3-5ubuntu5.1 deb
libpcre2-8-0 10.42-4ubuntu2 deb
libpam-modules 1.5.3-5ubuntu5.5 deb
libpam-modules-bin 1.5.3-5ubuntu5.5 deb
libpam-runtime 1.5.3-5ubuntu5.5 deb
libpam0g 1.5.3-5ubuntu5.5 deb
libpcre2-8-0 10.42-4ubuntu2.1 deb
libproc2-0 2:4.0.4-4ubuntu3.2 deb
libpsl5t64 0.21.2-1.1build1 deb
libpython3-stdlib 3.12.3-0ubuntu2 deb
libpython3.12-minimal 3.12.3-1ubuntu0.3 deb
libpython3.12-stdlib 3.12.3-1ubuntu0.3 deb
libpython3-stdlib 3.12.3-0ubuntu2.1 deb
libpython3.12-minimal 3.12.3-1ubuntu0.10 deb
libpython3.12-stdlib 3.12.3-1ubuntu0.10 deb
libreadline8t64 8.2-4build1 deb
librtmp1 2.4+20151223.gitfa8646d.1-2build7 deb
libsasl2-2 2.1.28+dfsg1-5ubuntu3.1 deb
libsasl2-modules 2.1.28+dfsg1-5ubuntu3.1 deb
libsasl2-modules-db 2.1.28+dfsg1-5ubuntu3.1 deb
libseccomp2 2.5.5-1ubuntu3.1 deb
libselinux1 3.5-2ubuntu2 deb
libselinux1 3.5-2ubuntu2.1 deb
libsemanage-common 3.5-1build5 deb
libsemanage2 3.5-1build5 deb
libsepol2 3.5-2build1 deb
libsmartcols1 2.39.3-9ubuntu6.1 deb
libsqlite3-0 3.45.1-1ubuntu2 deb
libsmartcols1 2.39.3-9ubuntu6.4 deb
libsqlite3-0 3.45.1-1ubuntu2.5 deb
libss2 1.47.0-2.4~exp1ubuntu4.1 deb
libssh-4 0.10.6-2build2 deb
libssl3t64 3.0.13-0ubuntu3.4 deb
libssh-4 0.10.6-2ubuntu0.2 deb
libssl3t64 3.0.13-0ubuntu3.7 deb
libstdc++6 14.2.0-4ubuntu2~24.04 deb
libsystemd0 255.4-1ubuntu8.4 deb
libtasn1-6 4.19.0-3build1 deb
libsystemd0 255.4-1ubuntu8.12 deb
libtasn1-6 4.19.0-3ubuntu0.24.04.2 deb
libtinfo6 6.4+20240113-1ubuntu2 deb
libudev1 255.4-1ubuntu8.4 deb
libunistring5 1.1-2build1 deb
libuuid1 2.39.3-9ubuntu6.1 deb
libudev1 255.4-1ubuntu8.12 deb
libunistring5 1.1-2build1.1 deb
libuuid1 2.39.3-9ubuntu6.4 deb
libxxhash0 0.8.2-2build1 deb
libzstd1 1.5.5+dfsg2-2build1.1 deb
locales 2.39-0ubuntu8.3 deb
locales 2.39-0ubuntu8.7 deb
login 1:4.13+dfsg1-4ubuntu3.2 deb
logsave 1.47.0-2.4~exp1ubuntu4.1 deb
mawk 1.3.4.20240123-1build1 deb
media-types 10.1.0 deb
mount 2.39.3-9ubuntu6.1 deb
mount 2.39.3-9ubuntu6.4 deb
mpmath 1.3.0 python
ncurses-base 6.4+20240113-1ubuntu2 deb
ncurses-bin 6.4+20240113-1ubuntu2 deb
netbase 6.4 deb
netcat-openbsd 1.226-1ubuntu2 deb
openssl 3.0.13-0ubuntu3.4 deb
numpy 2.4.2 python
nvidia-cublas-cu12 12.9.1.4 python
nvidia-cuda-nvrtc-cu12 12.9.86 python
nvidia-cuda-runtime-cu12 12.9.79 python
nvidia-cudnn-cu12 9.19.0.56 python
nvidia-cufft-cu12 11.4.1.4 python
nvidia-curand-cu12 10.3.10.19 python
nvidia-nvjitlink-cu12 12.9.86 python
onnxruntime 1.23.2 python
onnxruntime-gpu 1.23.2 python
openssl 3.0.13-0ubuntu3.7 deb
packaging 26.0 python
passwd 1:4.13+dfsg1-4ubuntu3.2 deb
perl-base 5.38.2-3.2build2 deb
perl-base 5.38.2-3.2ubuntu0.2 deb
pinentry-curses 1.2.1-3ubuntu5 deb
pip 24.3.1 python
pip 26.0.1 python
piper-tts 1.4.1 python
procps 2:4.0.4-4ubuntu3.2 deb
protobuf 6.33.5 python
publicsuffix 20231001.0357-0.1 deb
python3 3.12.3-0ubuntu2 deb
python3-minimal 3.12.3-0ubuntu2 deb
python3-pip-whl 24.0+dfsg-1ubuntu1.1 deb
python3-setuptools-whl 68.1.2-2ubuntu1.1 deb
python3-venv 3.12.3-0ubuntu2 deb
python3.12 3.12.3-1ubuntu0.3 deb
python3.12-minimal 3.12.3-1ubuntu0.3 deb
python3.12-venv 3.12.3-1ubuntu0.3 deb
python3 3.12.3-0ubuntu2.1 deb
python3-minimal 3.12.3-0ubuntu2.1 deb
python3-pip-whl 24.0+dfsg-1ubuntu1.3 deb
python3-setuptools-whl 68.1.2-2ubuntu1.2 deb
python3-venv 3.12.3-0ubuntu2.1 deb
python3.12 3.12.3-1ubuntu0.10 deb
python3.12-minimal 3.12.3-1ubuntu0.10 deb
python3.12-venv 3.12.3-1ubuntu0.10 deb
readline-common 8.2-4build1 deb
regex 2026.1.15 python
sed 4.9-2build1 deb
sensible-utils 0.0.22 deb
systemd-standalone-sysusers 255.4-1ubuntu8.4 deb
sentence-stream 1.3.0 python
sympy 1.14.0 python
systemd-standalone-sysusers 255.4-1ubuntu8.12 deb
sysvinit-utils 3.08-6ubuntu3 deb
tar 1.35+dfsg-3build1 deb
tzdata 2024a-3ubuntu1.1 deb
tzdata 2025b-0ubuntu0.24.04.1 deb
ubuntu-keyring 2023.11.28.1 deb
util-linux 2.39.3-9ubuntu6.1 deb
wheel 0.45.1 python
wyoming 1.1.0 python
wyoming-piper 1.4.0 python
unminimize 0.2.1 deb
util-linux 2.39.3-9ubuntu6.4 deb
wheel 0.46.3 python
wyoming 1.8.0 python
wyoming-piper 2.2.2 python
zlib1g 1:1.3.dfsg-3.1ubuntu2.1 deb

View File

@ -2,48 +2,91 @@
# project information
project_name: piper
project_url: "https://github.com/rhasspy/piper/"
project_url: "https://github.com/rhasspy/wyoming-piper"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/piper-logo.png"
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4. This container provides a Wyoming protocol server for Piper."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
development_versions: true
development_versions_items:
- {tag: "latest", desc: "Stable releases"}
- {tag: "gpu", desc: "Releases with Nvidia GPU support (amd64 only)"}
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_env: true
param_env_vars:
- { env_var: "PIPER_VOICE", env_value: "en_US-lessac-medium", desc: "The [Piper voice](https://huggingface.co/rhasspy/piper-voices/tree/main) to use, in the format `<language>-<name>-<quality>`" }
- {env_var: "PIPER_VOICE", env_value: "en_US-lessac-medium", desc: "The [Piper voice](https://huggingface.co/rhasspy/piper-voices/tree/main) to use, in the format `<language>-<name>-<quality>`"}
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for piper config files." }
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Local path for piper config files."}
param_usage_include_ports: true
param_ports:
- { external_port: "10200", internal_port: "10200", port_desc: "Wyoming connection port." }
- {external_port: "10200", internal_port: "10200", port_desc: "Wyoming connection port."}
# optional container parameters
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "PIPER_LENGTH", env_value: "1.0", desc: "Voice speaking rate, 1.0 is default with < 1.0 being faster and > 1.0 being slower." }
- { env_var: "PIPER_NOISE", env_value: "0.667", desc: "Controls the variability of the voice by adding noise. Values above 1 will start to degrade audio." }
- { env_var: "PIPER_NOISEW", env_value: "0.333", desc: "Controls the variability of speaking cadence. Values above 1 produce extreme stutters and pauses." }
- { env_var: "PIPER_SPEAKER", env_value: "0", desc: "Speaker number to use if the voice supports multiple speakers." }
- { env_var: "PIPER_PROCS", env_value: "1", desc: "Number of Piper processes to run simultaneously." }
- {env_var: "LOCAL_ONLY", env_value: "", desc: "If set to `true`, or any other value, the container will not attempt to download models from HuggingFace and will only use locally-provided models."}
- {env_var: "PIPER_LENGTH", env_value: "1.0", desc: "Voice speaking rate, 1.0 is default with < 1.0 being faster and > 1.0 being slower."}
- {env_var: "PIPER_NOISE", env_value: "0.667", desc: "Controls the variability of the voice by adding noise. Values above 1 will start to degrade audio."}
- {env_var: "PIPER_NOISEW", env_value: "0.333", desc: "Controls the variability of speaking cadence. Values above 1 produce extreme stutters and pauses."}
- {env_var: "PIPER_SPEAKER", env_value: "0", desc: "Speaker number to use if the voice supports multiple speakers."}
- {env_var: "NO_STREAMING", env_value: "", desc: "Setting to `true`, or any other value, will disable support for streaming audio on sentence boundaries."}
readonly_supported: true
# application setup block
app_setup_block_enabled: true
app_setup_block: |
For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control/voice_remote_local_assistant/), add the Wyoming integration and supply the hostname/IP and port that piper is running add-on."
For more information see the [piper docs](https://github.com/rhasspy/piper/),
When using the `gpu` tag with Nvidia GPUs, make sure you set the container to use the `nvidia` runtime and that you have the [Nvidia Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) installed on the host and that you run the container with the correct GPU(s) exposed. See the [Nvidia Container Toolkit docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) for more details.
For more information see the [wyoming piper docs](https://github.com/rhasspy/wyoming-piper),
# init diagram
init_diagram: |
"piper:gpu": {
docker-mods
base {
fix-attr +\nlegacy cont-init
}
docker-mods -> base
legacy-services
custom services
init-services -> legacy-services
init-services -> custom services
custom services -> legacy-services
legacy-services -> ci-service-check
init-migrations -> init-adduser
init-os-end -> init-config
init-config -> init-config-end
init-crontab-config -> init-config-end
init-piper-config -> init-config-end
init-config -> init-crontab-config
init-mods-end -> init-custom-files
init-adduser -> init-device-perms
base -> init-envfile
base -> init-migrations
init-config-end -> init-mods
init-mods-package-install -> init-mods-end
init-mods -> init-mods-package-install
init-adduser -> init-os-end
init-device-perms -> init-os-end
init-envfile -> init-os-end
init-config -> init-piper-config
init-custom-files -> init-services
init-services -> svc-cron
svc-cron -> legacy-services
init-services -> svc-piper
svc-piper -> legacy-services
}
Base Images: {
"baseimage-ubuntu:noble"
}
"piper:gpu" <- Base Images
# changelog
changelogs:
- { date: "18.07.24:", desc: "Rebase to Ubuntu Noble." }
- { date: "25.11.23:", desc: "Initial Release." }
- {date: "15.11.25:", desc: "Add streaming support & support for local only mode."}
- {date: "26.11.24:", desc: "Add GPU branch."}
- {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."}
- {date: "25.11.23:", desc: "Initial Release."}

View File

@ -1,16 +1,33 @@
#!/command/with-contenv bash
# shellcheck shell=bash
NVIDIA_PACKAGE_DIR="/lsiopy/lib/python3.12/site-packages/nvidia"
for dir in "${NVIDIA_PACKAGE_DIR}"/*; do
if [ -d "$dir/lib" ]; then
export LD_LIBRARY_PATH="$dir/lib:$LD_LIBRARY_PATH"
fi
done
unset UPDATE_MODELS
if [[ -z ${LOCAL_ONLY} ]]; then
UPDATE_MODELS=true
fi
LD_LIBRARY_PATH="/lsiopy/lib/python3.12/site-packages/onnxruntime-gpu/capi:$LD_LIBRARY_PATH"
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 10200" \
s6-setuidgid abc python3 -m wyoming_piper \
--piper '/usr/share/piper/piper' \
--uri 'tcp://0.0.0.0:10200' \
--length-scale "${PIPER_LENGTH:-1.0}" \
--noise-scale "${PIPER_NOISE:-0.667}" \
--noise-w "${PIPER_NOISEW:-0.333}" \
--speaker "${PIPER_SPEAKER:-0}" \
--voice "${PIPER_VOICE}" \
--max-piper-procs "${PIPER_PROCS:-1}" \
--data-dir /config \
--download-dir /config --update-voices
--download-dir /config \
--use-cuda \
${UPDATE_MODELS:+--update-voices} \
${NO_STREAMING:+--no-streaming}