Compare commits

..

94 Commits

Author SHA1 Message Date
LinuxServer-CI
8dc7e3a7c2
Bot Updating Package Versions 2026-03-09 09:32:22 +00:00
LinuxServer-CI
6b8695e8e0
Bot Updating Package Versions 2026-03-02 09:32:50 +00:00
LinuxServer-CI
a9f6bb71ca
Bot Updating Package Versions 2026-02-23 09:35:53 +00:00
LinuxServer-CI
4bdd3bc3dd
Bot Updating Package Versions 2026-02-16 09:39:46 +00:00
LinuxServer-CI
5e3d44e743
Bot Updating Templated Files 2026-02-16 09:35:34 +00:00
LinuxServer-CI
48c2e15394
Bot Updating Templated Files 2026-02-16 09:33:39 +00:00
LinuxServer-CI
8acf71fd4d
Bot Updating Package Versions 2026-02-09 09:40:19 +00:00
LinuxServer-CI
eb583f887b
Bot Updating Package Versions 2026-02-05 15:13:19 +00:00
LinuxServer-CI
057004850f
Bot Updating Package Versions 2026-02-02 09:30:32 +00:00
LinuxServer-CI
5f3cae9728
Bot Updating Package Versions 2026-01-30 20:58:09 +00:00
LinuxServer-CI
7766e73a9a
Bot Updating Package Versions 2026-01-30 18:03:35 +00:00
LinuxServer-CI
4a8d9dacd1
Bot Updating Package Versions 2026-01-26 09:03:48 +00:00
LinuxServer-CI
278d516ed3
Bot Updating Package Versions 2026-01-19 09:03:47 +00:00
LinuxServer-CI
5a4700fae6
Bot Updating Package Versions 2026-01-12 09:03:17 +00:00
LinuxServer-CI
98b0a07a49
Bot Updating Package Versions 2025-12-29 09:00:54 +00:00
LinuxServer-CI
3f25def220
Bot Updating Package Versions 2025-12-22 08:59:14 +00:00
LinuxServer-CI
70a9720a63
Bot Updating Package Versions 2025-12-08 08:59:28 +00:00
LinuxServer-CI
98013e97d0
Bot Updating Package Versions 2025-12-01 08:59:32 +00:00
LinuxServer-CI
05a51e48ef
Bot Updating Templated Files 2025-11-24 08:55:08 +00:00
LinuxServer-CI
421437f19c
Bot Updating Package Versions 2025-11-17 08:56:36 +00:00
LinuxServer-CI
adaf4860c9
Bot Updating Package Versions 2025-11-15 21:49:36 +00:00
LinuxServer-CI
53a9337aa7
Bot Updating Templated Files 2025-11-15 21:45:58 +00:00
LinuxServer-CI
21787b3e58
Bot Updating Templated Files 2025-11-15 21:44:22 +00:00
Adam
65fe92b29d
Merge pull request #22 from linuxserver/no-streaming 2025-11-15 21:42:47 +00:00
thespad
06b777c1fb
Fix stupid switch from streaming to no-streaming 2025-11-15 14:47:20 +00:00
LinuxServer-CI
7ef10e52c4
Bot Updating Templated Files 2025-11-08 13:13:17 +00:00
Adam
c832a31717
Merge pull request #16 from linuxserver/main-v2
Drop args that are now obsolete in v2
2025-11-08 13:11:35 +00:00
LinuxServer-CI
6f96c3948f
Bot Updating Package Versions 2025-11-07 23:40:50 +00:00
LinuxServer-CI
c39513360e
Bot Updating Package Versions 2025-10-27 08:57:01 +00:00
LinuxServer-CI
abda68fd83
Bot Updating Templated Files 2025-10-27 08:53:13 +00:00
LinuxServer-CI
ba2c31d84f
Bot Updating Package Versions 2025-10-13 08:55:57 +00:00
LinuxServer-CI
2aea9923bf
Bot Updating Package Versions 2025-10-06 08:52:44 +00:00
LinuxServer-CI
94f9e4383a
Bot Updating Package Versions 2025-09-29 08:55:16 +00:00
LinuxServer-CI
8d0825e1c0
Bot Updating Package Versions 2025-09-22 08:54:45 +00:00
LinuxServer-CI
1c9d4ba0c5
Bot Updating Package Versions 2025-09-15 08:52:35 +00:00
LinuxServer-CI
1edb0a04da
Bot Updating Package Versions 2025-08-29 21:21:45 +00:00
thespad
84f2322aa0
Drop args that are now obsolete in v2 2025-08-29 22:20:07 +01:00
Adam
4e9bcd20ed
Merge pull request #14 from linuxserver/local-mode 2025-08-29 22:17:17 +01:00
thespad
be8f28d19b
Remove obsolete version fetch 2025-08-29 16:35:46 +01:00
thespad
0c1cc0d7cf
Update upstream piper package install 2025-08-29 16:31:07 +01:00
thespad
13678b9907
Support local-only mode 2025-08-29 16:17:46 +01:00
LinuxServer-CI
66962e5d5b
Bot Updating Package Versions 2025-08-25 08:56:26 +00:00
Adam
bb12ea8dd7
Merge pull request #13 from linuxserver/streaming 2025-08-14 09:15:18 +01:00
LinuxServer-CI
004554df3b
Bot Updating Package Versions 2025-08-11 08:59:46 +00:00
thespad
d16bad35cb
Add streaming support 2025-08-10 10:56:45 +01:00
LinuxServer-CI
581eeadae9
Bot Updating Package Versions 2025-08-04 21:46:29 +00:00
LinuxServer-CI
f162819edc
Bot Updating Package Versions 2025-08-04 09:02:44 +00:00
LinuxServer-CI
4094ef62fa
Bot Updating Package Versions 2025-07-28 09:00:38 +00:00
LinuxServer-CI
835b0879a3
Bot Updating Package Versions 2025-07-21 09:01:50 +00:00
LinuxServer-CI
9eb34e60fc
Bot Updating Package Versions 2025-07-14 09:01:28 +00:00
LinuxServer-CI
6789cf2253
Bot Updating Templated Files 2025-07-07 08:57:37 +00:00
LinuxServer-CI
808608bf89
Bot Updating Templated Files 2025-07-07 08:55:49 +00:00
LinuxServer-CI
df4743eebc
Bot Updating Package Versions 2025-06-30 08:57:20 +00:00
LinuxServer-CI
954587c85c
Bot Updating Package Versions 2025-06-23 08:56:54 +00:00
LinuxServer-CI
d18cb309f9
Bot Updating Package Versions 2025-06-16 08:58:50 +00:00
LinuxServer-CI
59e2f4f9de
Bot Updating Templated Files 2025-06-16 08:55:16 +00:00
LinuxServer-CI
659ad15642
Bot Updating Package Versions 2025-06-09 08:55:52 +00:00
LinuxServer-CI
79b97c9c99
Bot Updating Package Versions 2025-06-02 08:55:11 +00:00
LinuxServer-CI
a40e984e40
Bot Updating Package Versions 2025-05-19 08:58:39 +00:00
LinuxServer-CI
2875a5012a
Bot Updating Templated Files 2025-05-19 08:55:50 +00:00
LinuxServer-CI
2a6c421bca
Bot Updating Package Versions 2025-05-14 20:40:30 +00:00
LinuxServer-CI
5546c1f427
Bot Updating Package Versions 2025-05-05 08:54:26 +00:00
LinuxServer-CI
641dd81a7c
Bot Updating Package Versions 2025-04-28 10:35:10 +00:00
LinuxServer-CI
7b9aa3d5d6
Bot Updating Package Versions 2025-04-21 08:52:39 +00:00
LinuxServer-CI
770551e1ca
Bot Updating Package Versions 2025-04-14 08:52:38 +00:00
LinuxServer-CI
dba8a27f12
Bot Updating Package Versions 2025-04-07 08:53:51 +00:00
LinuxServer-CI
dc4a80de24
Bot Updating Package Versions 2025-03-24 08:52:32 +00:00
LinuxServer-CI
8979506862
Bot Updating Package Versions 2025-03-10 08:44:11 +00:00
LinuxServer-CI
7794221c13
Bot Updating Package Versions 2025-03-03 08:49:23 +00:00
LinuxServer-CI
93d498c4c8
Bot Updating Package Versions 2025-02-24 08:49:17 +00:00
LinuxServer-CI
39dd7df739
Bot Updating Package Versions 2025-02-17 08:48:38 +00:00
LinuxServer-CI
7a739a20ed
Bot Updating Package Versions 2025-02-10 08:55:27 +00:00
LinuxServer-CI
dbe599693c
Bot Updating Templated Files 2025-02-10 08:51:02 +00:00
LinuxServer-CI
49ee953ade
Bot Updating Package Versions 2025-02-03 08:51:13 +00:00
LinuxServer-CI
fe8473afc2
Bot Updating Templated Files 2025-02-03 08:48:35 +00:00
LinuxServer-CI
ef557dc07b
Bot Updating Templated Files 2025-02-03 08:47:29 +00:00
LinuxServer-CI
54839524c5
Bot Updating Package Versions 2025-01-27 08:48:13 +00:00
LinuxServer-CI
4a6175577c
Bot Updating Package Versions 2025-01-22 17:51:24 +00:00
quietsy
3bc76a31d0
Merge pull request #9 from linuxserver/add-project-categories
Add categories to readme-vars.yml
2025-01-22 19:44:21 +02:00
quietsy
e857ddd96f Add categories to readme-vars.yml 2025-01-22 17:12:50 +02:00
thespad
1a649c4314
Missed a bit 2025-01-06 15:03:59 +00:00
thespad
d39d85ffe0
Hide GPU branch for now 2025-01-06 14:16:20 +00:00
Roxedus
9d5cc91fe7
Merge pull request #8 from linuxserver/main-gpu-readme 2024-12-25 03:02:34 +01:00
LinuxServer-CI
54b4927be5
Bot Updating Package Versions 2024-12-23 08:48:49 +00:00
thespad
75543e5ede
Add GPU tag to readme 2024-12-20 21:07:20 +00:00
LinuxServer-CI
ecf7e7af4e
Bot Updating Package Versions 2024-12-16 08:57:27 +00:00
LinuxServer-CI
a9ad54cc33
Bot Updating Templated Files 2024-12-16 08:54:22 +00:00
LinuxServer-CI
6fcdffd36b
Bot Updating Templated Files 2024-12-16 08:51:13 +00:00
LinuxServer-CI
198c39e5ae
Bot Updating Package Versions 2024-12-09 08:56:02 +00:00
LinuxServer-CI
f55c3e64b3
Bot Updating Templated Files 2024-12-09 08:53:05 +00:00
LinuxServer-CI
4e76da6674
Bot Updating Templated Files 2024-12-09 08:51:32 +00:00
LinuxServer-CI
14759d02b9
Bot Updating Templated Files 2024-12-02 08:57:17 +00:00
LinuxServer-CI
48d1865fdc
Bot Updating Templated Files 2024-12-02 08:53:57 +00:00
LinuxServer-CI
5fd500ff76
Bot Updating Templated Files 2024-12-02 08:50:36 +00:00
24 changed files with 551 additions and 213 deletions

View File

@ -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/gpu/readme-vars.yml).
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-piper/edit/main/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/gpu/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/main/root), add an entry to the changelog
```yml
changelogs:

View File

@ -4,11 +4,73 @@ description: Create a report to help us improve
title: "[BUG] <title>"
labels: [Bug]
body:
- type: markdown
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: Tell us what happens instead of the expected behavior.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: Tell us what should happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **How docker service was installed**: distro's packagemanager
value: |
# DEPRECATION NOTICE
This image is deprecated. We will not offer support for this image and it will not be updated.
The upstream project has no plans to fix GPU support
- OS:
- How docker service was installed:
render: markdown
validations:
required: false
- type: dropdown
attributes:
label: CPU architecture
options:
- x86-64
- arm64
validations:
required: true
- type: textarea
attributes:
label: Docker creation
description: |
Command used to create docker container
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
render: bash
validations:
required: true
- type: textarea
attributes:
description: |
Provide a full docker log, output of "docker logs piper"
label: Container logs
placeholder: |
Output of `docker logs piper`
render: bash
validations:
required: true

View File

@ -4,11 +4,28 @@ description: Suggest an idea for this project
title: "[FEAT] <title>"
labels: [enhancement]
body:
- type: markdown
- type: checkboxes
attributes:
value: |
# DEPRECATION NOTICE
This image is deprecated. We will not offer support for this image and it will not be updated.
The upstream project has no plans to fix GPU support
label: Is this a new feature request?
description: Please search to see if a feature request already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Wanted change
description: Tell us what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Reason for change
description: Justify your request, why do you want it, what is the benefit.
validations:
required: true
- type: textarea
attributes:
label: Proposed code change
description: Do you have a potential code change in mind?
validations:
required: false

View File

@ -1,8 +1,3 @@
# DEPRECATION NOTICE
This image is deprecated. We will not offer support for this image and it will not be updated.
The upstream project has no plans to fix GPU support
<!--- Provide a general summary of your changes in the Title above -->
[linuxserverurl]: https://linuxserver.io
@ -26,7 +21,7 @@ The upstream project has no plans to fix GPU support
------------------------------
- [ ] 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
- [ ] 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
------------------------------

View File

@ -0,0 +1,19 @@
name: Issue & PR Tracker
on:
issues:
types: [opened,reopened,labeled,unlabeled,closed]
pull_request_target:
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
pull_request_review:
types: [submitted,edited,dismissed]
permissions:
contents: read
jobs:
manage-project:
permissions:
issues: write
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
secrets: inherit

16
.github/workflows/call_issues_cron.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: '34 23 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
permissions:
issues: write
pull-requests: write
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
secrets: inherit

147
.github/workflows/external_trigger.yml vendored Normal file
View File

@ -0,0 +1,147 @@
name: External Trigger Main
on:
workflow_dispatch:
permissions:
contents: read
jobs:
external-trigger-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: External Trigger
if: github.ref == 'refs/heads/main'
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
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`piper_main_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
elif grep -q "^piper_main" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`piper_main\`; 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
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_main_${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"
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_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"
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fpiper%3Apull" \
| jq -r '.token')
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/${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}")
if [[ $(echo $image_info | jq -r '.container_config') == "null" ]]; then
image_info=$(echo $image_info | jq -r '.config')
else
image_info=$(echo $image_info | jq -r '.container_config')
fi
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
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"
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_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
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."
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 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 \
--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
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
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 \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--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_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 }}
fi
fi

View File

@ -0,0 +1,48 @@
name: External Trigger Scheduler
on:
schedule:
- cron: '30 * * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: External Trigger Scheduler
run: |
printf "# External trigger scheduler for docker-piper\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-piper/${br}/jenkins-vars.yml)
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-piper/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"ref\":\"refs/heads/${br}\"}" \
https://api.github.com/repos/linuxserver/docker-piper/actions/workflows/external_trigger.yml/dispatches
else
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
fi
else
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
fi
done

View File

@ -15,5 +15,5 @@ jobs:
- 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/gpu/.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/main/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,103 @@
name: Package Trigger Scheduler
on:
schedule:
- cron: '35 8 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Package Trigger Scheduler
env:
SKIP_PACKAGE_TRIGGER: ${{ vars.SKIP_PACKAGE_TRIGGER }}
run: |
printf "# Package trigger scheduler for docker-piper\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
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 ! 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
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} "
elif grep -q "^piper_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then
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' 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} "
else
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Triggering package trigger for branch ${br}" >> $GITHUB_STEP_SUMMARY
printf "> To disable, add \`piper_%s\` into the Github organizational variable \`SKIP_PACKAGE_TRIGGER\`.\n\n" "${br}" >> $GITHUB_STEP_SUMMARY
triggered_branches="${triggered_branches}${br} "
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
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
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"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Unable to change the Jenkins job description."
fi
sleep 20
fi
else
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
fi
done
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
if [[ -n "${triggered_branches}" ]]; then
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-piper/activity/ \n"
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
fi
if [[ -n "${skipped_branches}" ]]; then
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
fi
echo "**** Notifying Discord ****"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Package Check Build(s) for piper** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
fi

View File

@ -24,13 +24,6 @@ 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}" && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \

39
Dockerfile.aarch64 Normal file
View File

@ -0,0 +1,39 @@
# 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/ \
piper-tts \
"wyoming-piper==${PIPER_VERSION}" && \
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

162
Jenkinsfile vendored
View File

@ -28,7 +28,7 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/piper'
PR_DOCKERHUB_IMAGE = 'lspipepr/piper'
DIST_IMAGE = 'ubuntu'
MULTIARCH='false'
MULTIARCH='true'
CI='true'
CI_WEB='false'
CI_DELAY='120'
@ -75,7 +75,7 @@ pipeline {
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}:gpu 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}:latest 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' ''',
@ -92,7 +92,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
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 ./root/etc/s6-overlay/s6-rc.d/init-deprecate/run ./root/etc/s6-overlay/s6-rc.d/init-deprecate/up ./root/etc/s6-overlay/s6-rc.d/init-deprecate/type ./root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d/init-config-end ./root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d/init-deprecate ./root/etc/s6-overlay/s6-rc.d/user/contents.d/init-deprecate'
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'
}
@ -108,7 +108,7 @@ pipeline {
script{
env.LS_TAG_NUMBER = sh(
script: '''#! /bin/bash
tagsha=$(git rev-list -n 1 gpu-${LS_RELEASE} 2>/dev/null)
tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null)
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
echo ${LS_RELEASE_NUMBER}
elif [ -z "${GIT_COMMIT}" ]; then
@ -185,10 +185,10 @@ pipeline {
}
}
}
// If this is a gpu build use live docker endpoints
// If this is a main build use live docker endpoints
stage("Set ENV live build"){
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -198,13 +198,13 @@ 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-gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = 'gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.META_TAG = 'gpu-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = 'gpu-version-' + env.EXT_RELEASE_CLEAN
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = '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'
}
@ -213,7 +213,7 @@ pipeline {
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "gpu"}
not {branch "main"}
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -223,13 +223,13 @@ 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-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
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
} else {
env.CI_TAGS = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.CI_TAGS = 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 = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.EXT_RELEASE_TAG = 'gpu-version-' + env.EXT_RELEASE_CLEAN
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.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'
@ -248,13 +248,13 @@ 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-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
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
} else {
env.CI_TAGS = 'gpu-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = 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 = '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.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.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'
@ -293,7 +293,7 @@ pipeline {
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
@ -305,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 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}/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}/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 gpu --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
git clone --branch main --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 gpu
git checkout -f main
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 gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
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
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
@ -332,7 +332,6 @@ pipeline {
fi
echo "Starting Stage 2 - Delete old templates"
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml .github/workflows/package_trigger.yml"
OLD_TEMPLATES="${OLD_TEMPLATES} $(echo .github/workflows/{external_trigger,external_trigger_scheduler,package_trigger_scheduler,call_issue_pr_tracker,call_issues_cron}.yml)"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
@ -342,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 gpu
git checkout -f main
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 gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
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
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}
@ -363,20 +362,20 @@ pipeline {
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
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}:latest
ls -al ${TEMPDIR}/d2
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-gpu.d2\\")" readme-vars.yml
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-latest.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
git checkout -f main
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
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
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
@ -393,14 +392,10 @@ 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 gpu
git checkout -f main
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
mkdir -p \
${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d \
${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d \
${TEMPDIR}/repo/${LS_REPO}/root/etc/s6-overlay/s6-rc.d/user/contents.d
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cp --parents readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/ || :
cd ${TEMPDIR}/repo/${LS_REPO}/
@ -410,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 gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
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
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
@ -430,19 +425,6 @@ pipeline {
git add docs/images/docker-${CONTAINER_NAME}.md
echo "Updating docs repo"
git commit -m 'Bot Updating Documentation'
git mv docs/images/docker-${CONTAINER_NAME}.md docs/deprecated_images/docker-${CONTAINER_NAME}.md || :
if ! command -v yq || ! yq --help | grep -q 'mikefarah'; then
YQ_DL_VERSION=$(curl -fsX GET "https://api.github.com/repos/mikefarah/yq/releases/latest" | jq -r '. | .tag_name')
echo "No yq found, retrieving from upstream release version ${YQ_DL_VERSION}"
curl -fo /usr/local/bin/yq -L "https://github.com/mikefarah/yq/releases/download/${YQ_DL_VERSION}/yq_linux_amd64"
chmod +x /usr/local/bin/yq
fi
if ! yq -e '.plugins.[].redirects.redirect_maps.[] | select(. == "deprecated_images/docker-" + env(CONTAINER_NAME) + ".md")' mkdocs.yml >/dev/null 2>&1; then
echo "Updating mkdocs.yml with deprecation info"
yq -i '(.plugins.[] | select(.redirects)).redirects.redirect_maps |= . + {"images/docker-" + env(CONTAINER_NAME) + ".md" : "deprecated_images/docker-" + env(CONTAINER_NAME) + ".md"}' mkdocs.yml
git add mkdocs.yml
fi
git commit -m 'Bot Moving Deprecated Documentation' || :
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} || \
(MAXWAIT="10" && echo "Push to docs failed, trying again in ${MAXWAIT} seconds" && \
@ -464,10 +446,6 @@ pipeline {
echo "Updating Unraid template"
cd ${TEMPDIR}/unraid/templates/
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
if ! grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
echo "${CONTAINER_NAME}" >> ${TEMPDIR}/unraid/templates/unraid/ignore.list
git add unraid/ignore.list
fi
if grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then
echo "Image is on the ignore list, and already in the deprecation folder."
elif grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
@ -529,7 +507,7 @@ pipeline {
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
@ -542,10 +520,10 @@ pipeline {
}
}
}
// If this is a gpu build check the S6 service file perms
// If this is a main build check the S6 service file perms
stage("Check S6 Service file Permissions"){
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
@ -798,7 +776,7 @@ pipeline {
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
@ -821,14 +799,14 @@ pipeline {
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 gpu
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f main
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 gpu
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git gpu
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
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process"
else
@ -846,7 +824,7 @@ pipeline {
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
@ -860,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 "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
@ -914,7 +892,7 @@ pipeline {
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e RELEASE_TAG=\"gpu\" \
-e RELEASE_TAG=\"latest\" \
-e PORT=\"${CI_PORT}\" \
-e SSL=\"${CI_SSL}\" \
-e BASE=\"${DIST_IMAGE}\" \
@ -954,13 +932,12 @@ pipeline {
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} || \
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:latest -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
docker buildx imagetools create -t ${PUSHIMAGE}:gpu ghcr.io/linuxserver/jenkins-builder:empty || true
done
'''
}
@ -984,9 +961,9 @@ pipeline {
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} || \
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-latest -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} || \
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-latest -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} || \
@ -996,7 +973,8 @@ pipeline {
fi
done
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker buildx imagetools create -t ${MANIFESTIMAGE}:gpu -t ${MANIFESTIMAGE}:amd64-gpu -t ${MANIFESTIMAGE}:arm64v8-gpu ghcr.io/linuxserver/jenkins-builder:empty || true
docker buildx imagetools create -t ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest || \
{ 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} || \
@ -1013,7 +991,7 @@ pipeline {
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "gpu"
branch "main"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
@ -1029,21 +1007,21 @@ pipeline {
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"}' \
"target_commitish": "main"}' \
| 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",\
"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"
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
jq -n \
--arg tag_name "$META_TAG" \
--arg target_commitish "gpu" \
--arg target_commitish "main" \
--arg ci_url "${CI_URL:-N/A}" \
--arg ls_notes "$AUTO_RELEASE_NOTES" \
--arg remote_notes "$(cat releasebody.json)" \
@ -1053,7 +1031,7 @@ pipeline {
"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
"prerelease": false }' > 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
'''
}
@ -1061,14 +1039,14 @@ pipeline {
// Add protection to the release branch
stage('Github-Release-Branch-Protection') {
when {
branch "gpu"
branch "main"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Setting up protection for release branch gpu"
echo "Setting up protection for release branch main"
sh '''#! /bin/bash
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/gpu/protection \
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/main/protection \
-d $(jq -c . << EOF
{
"required_status_checks": null,
@ -1171,26 +1149,6 @@ EOF
}
}
stage('Deprecate/Disable Future Builds') {
when {
branch "gpu"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''#! /bin/bash
TEMPDIR=$(mktemp -d)
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
git rm Jenkinsfile
git commit -m 'Disabling future builds'
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
rm -Rf ${TEMPDIR}'''
}
}
}
/* ######################
Send status to Discord

View File

@ -1,5 +1,5 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read https://github.com/linuxserver/docker-piper/blob/gpu/.github/CONTRIBUTING.md -->
<!-- Please read https://github.com/linuxserver/docker-piper/blob/main/.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!")
@ -24,11 +24,6 @@ Find us at:
* [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
# DEPRECATION NOTICE
This image is deprecated. We will not offer support for this image and it will not be updated.
The upstream project has no plans to fix GPU support
# [linuxserver/piper](https://github.com/linuxserver/docker-piper)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fpiper?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh)
@ -39,8 +34,8 @@ The upstream project has no plans to fix GPU support
[![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%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)
[![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)
[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.
@ -50,30 +45,19 @@ The upstream project has no plans to fix GPU support
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:gpu` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
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.
The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| 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) |
| arm64 | ✅ | arm64v8-\<version tag\> |
## 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."
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
@ -93,7 +77,7 @@ To help you get started creating a container from this image you can either use
---
services:
piper:
image: lscr.io/linuxserver/piper:gpu
image: lscr.io/linuxserver/piper:latest
container_name: piper
environment:
- PUID=1000
@ -131,7 +115,7 @@ docker run -d \
-p 10200:10200 \
-v /path/to/piper/data:/config \
--restart unless-stopped \
lscr.io/linuxserver/piper:gpu
lscr.io/linuxserver/piper:latest
```
## Parameters
@ -218,7 +202,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:gpu
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/piper:latest
```
## Updating Info
@ -266,7 +250,7 @@ Below are the instructions for updating containers:
* Update the image:
```bash
docker pull lscr.io/linuxserver/piper:gpu
docker pull lscr.io/linuxserver/piper:latest
```
* Stop the running container:
@ -303,7 +287,7 @@ cd docker-piper
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/piper:gpu .
-t lscr.io/linuxserver/piper:latest .
```
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
@ -316,8 +300,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **12.03.26:** - Deprecate GPU branch due to lack of upstream support.
* **15.11.25:** - Add streaming support & support for local only mode.
* **26.11.24:** - Add GPU branch.
* **29.08.25:** - Add support for local only mode.
* **10.08.25:** - Add streaming support.
* **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: prerelease
release_tag: gpu
ls_branch: gpu
release_type: stable
release_tag: latest
ls_branch: main
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='false'
- MULTIARCH='true'
- CI='true'
- CI_WEB='false'
- CI_DELAY='120'

View File

@ -133,15 +133,7 @@ ncurses-bin 6.4+20240113-1ubuntu2 deb
netbase 6.4 deb
netcat-openbsd 1.226-1ubuntu2 deb
numpy 2.4.3 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.20.0.48 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.24.3 python
onnxruntime-gpu 1.24.3 python
openssl 3.0.13-0ubuntu3.7 deb
packaging 26.0 python
passwd 1:4.13+dfsg1-4ubuntu3.2 deb

View File

@ -6,12 +6,12 @@ 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 }}"
project_deprecation_status: true
project_deprecation_message: "The upstream project has no plans to fix GPU support"
project_categories: "Machine Learning"
# supported architectures
available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
development_versions: true
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
development_versions: false
development_versions_items:
- {tag: "latest", desc: "Stable releases"}
- {tag: "gpu", desc: "Releases with Nvidia GPU support (amd64 only)"}
@ -42,12 +42,10 @@ 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."
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": {
"piper:latest": {
docker-mods
base {
fix-attr +\nlegacy cont-init
@ -66,7 +64,6 @@ init_diagram: |
init-piper-config -> init-config-end
init-config -> init-crontab-config
init-mods-end -> init-custom-files
init-config-end -> init-deprecate
init-adduser -> init-device-perms
base -> init-envfile
base -> init-migrations
@ -78,7 +75,6 @@ init_diagram: |
init-envfile -> init-os-end
init-config -> init-piper-config
init-custom-files -> init-services
init-deprecate -> init-services
init-services -> svc-cron
svc-cron -> legacy-services
init-services -> svc-piper
@ -87,11 +83,10 @@ init_diagram: |
Base Images: {
"baseimage-ubuntu:noble"
}
"piper:gpu" <- Base Images
"piper:latest" <- Base Images
# changelog
changelogs:
- {date: "12.03.26:", desc: "Deprecate GPU branch due to lack of upstream support."}
- {date: "15.11.25:", desc: "Add streaming support & support for local only mode."}
- {date: "26.11.24:", desc: "Add GPU branch."}
- {date: "29.08.25:", desc: "Add support for local only mode."}
- {date: "10.08.25:", desc: "Add streaming support."}
- {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."}
- {date: "25.11.23:", desc: "Initial Release."}

View File

@ -1,17 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
echo '
╔════════════════════════════════════════════════════╗
╠════════════════════════════════════════════════════╣
║ ║
║ This image is deprecated. ║
║ We will not offer support for this image ║
║ and it will not be updated. ║
║ ║
╠════════════════════════════════════════════════════╣
╚════════════════════════════════════════════════════╝
The upstream project has no plans to fix GPU support
══════════════════════════════════════════════════════'

View File

@ -1 +0,0 @@
oneshot

View File

@ -1,22 +1,12 @@
#!/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 \
@ -28,6 +18,5 @@ exec \
--voice "${PIPER_VOICE}" \
--data-dir /config \
--download-dir /config \
--use-cuda \
${UPDATE_MODELS:+--update-voices} \
${NO_STREAMING:+--no-streaming}