diff --git a/Dockerfile b/Dockerfile index 38cd4e5..1d1a412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:noble # set version label ARG BUILD_DATE @@ -9,6 +9,9 @@ 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 \ @@ -32,6 +35,8 @@ RUN \ 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/* diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index bec2ec5..0853039 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble # set version label ARG BUILD_DATE @@ -9,6 +9,9 @@ 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 \ @@ -32,6 +35,8 @@ RUN \ 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/* diff --git a/Jenkinsfile b/Jenkinsfile index dec3de4..4a6237c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,8 +30,8 @@ pipeline { CI='true' CI_WEB='false' CI_DELAY='120' - CI_DOCKERENV='TZ=Europe/London|PIPER_VOICE=en_US-lessac-medium' - CI_AUTH='user:password' + CI_DOCKERENV='PIPER_VOICE=en_US-lessac-medium' + CI_AUTH='' CI_WEBPATH='' } stages { diff --git a/README.md b/README.md index 9e99618..cfb4a2c 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,11 @@ For use with Home Assistant [Assist](https://www.home-assistant.io/voice_control For more information see the [piper docs](https://github.com/rhasspy/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/). + + ## Usage To help you get started creating a container from this image you can either use docker-compose or the docker cli. @@ -86,7 +91,7 @@ services: - PIPER_SPEAKER=0 #optional - PIPER_PROCS=1 #optional volumes: - - /path/to/data:/config + - /path/to/piper/data:/config ports: - 10200:10200 restart: unless-stopped @@ -107,7 +112,7 @@ docker run -d \ -e PIPER_SPEAKER=0 `#optional` \ -e PIPER_PROCS=1 `#optional` \ -p 10200:10200 \ - -v /path/to/data:/config \ + -v /path/to/piper/data:/config \ --restart unless-stopped \ lscr.io/linuxserver/piper:latest ``` @@ -129,6 +134,7 @@ Containers are configured using parameters passed at runtime (such as those abov | `-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. | | `-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/). | ## Environment variables from files (Docker secrets) @@ -291,4 +297,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **18.07.24:** - Rebase to Ubuntu Noble. * **25.11.23:** - Initial Release. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index bdbb138..30d1aa2 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -20,6 +20,6 @@ repo_vars: - CI='true' - CI_WEB='false' - CI_DELAY='120' - - CI_DOCKERENV='TZ=Europe/London|PIPER_VOICE=en_US-lessac-medium' - - CI_AUTH='user:password' + - CI_DOCKERENV='PIPER_VOICE=en_US-lessac-medium' + - CI_AUTH='' - CI_WEBPATH='' diff --git a/readme-vars.yml b/readme-vars.yml index b43e877..23cfe6e 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -6,16 +6,12 @@ project_url: "https://github.com/rhasspy/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_blurb_optional_extras_enabled: false # supported architectures available_architectures: - { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} -# development version -development_versions: false - # container parameters common_param_env_vars_enabled: true param_container_name: "{{ project_name }}" @@ -24,7 +20,7 @@ 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 `--`" } param_usage_include_vols: true param_volumes: - - { vol_path: "/config", vol_host_path: "/path/to/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." } @@ -38,6 +34,8 @@ opt_param_env_vars: - { 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." } +readonly_supported: true + # application setup block app_setup_block_enabled: true app_setup_block: | @@ -47,4 +45,5 @@ app_setup_block: | # changelog changelogs: + - { date: "18.07.24:", desc: "Rebase to Ubuntu Noble." } - { date: "25.11.23:", desc: "Initial Release." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-piper-config/run b/root/etc/s6-overlay/s6-rc.d/init-piper-config/run index efea851..190762a 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-piper-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-piper-config/run @@ -1,6 +1,9 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash +mkdir -p /run/piper-temp + # permissions lsiown -R abc:abc \ - /config + /config \ + /run/piper-temp