From b2f1c34a58cae3afa1f806afc8c9366d6acbe8f7 Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Fri, 27 Nov 2026 23:36:57 +0800 Subject: [PATCH] feat(docker): refresh WasmEdge image definitions and dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Import the Docker image definitions and dependency scripts from WasmEdge snapshot `512db9f513fff9facac396ac72f31748de638797`. Relocate: - `utils/docker/` -> `.` - `utils/ffmpeg/` -> `scripts/ffmpeg/` - `utils/opencvmini/` -> `scripts/opencvmini/` - `utils/wasi-crypto/` -> `scripts/wasi-crypto/` - `utils/wasi-nn/` -> `scripts/wasi-nn/` Previous snapshot: https://github.com/WasmEdge/WasmEdge/tree/b2e483553ea7a1826be117180125c71e5d0b8958 New snapshot: https://github.com/WasmEdge/WasmEdge/tree/512db9f513fff9facac396ac72f31748de638797 Synchronize the imported Dockerfiles, Bake definitions, dependency scripts, patch, checksum, and related additions, deletions, renames, and updates through the new snapshot. Adjust Dockerfile COPY paths and Bake contexts for the relocated inputs. Source provenance follows the imported file lineages through the recorded snapshot, including introducing commits, renames, deletions, and superseded updates to those lineages. Other changes in mixed-scope commits are not imported. - https://github.com/WasmEdge/WasmEdge/commit/6213d3914389305aec38f13e3c14fec9b98f8dea 6213d391 [CI] Add dockerfile for SSVM development environment hydai , 2019-07-30 - https://github.com/WasmEdge/WasmEdge/commit/26d4d45974b40337f30e71b741dca2f2ec2a092a 26d4d459 [CI] Update Dockerfile and Docker image hydai , 2020-03-16 - https://github.com/WasmEdge/WasmEdge/commit/fec2a2df7ae6580d4105fadc4128031c768da360 fec2a2df [CI] Update llvm dependency from 8 to 9. And enable -fPIC flag hydai , 2020-03-19 - https://github.com/WasmEdge/WasmEdge/commit/e62eaf9fa87a49243ddb2f010dd6a304148de2c6 e62eaf9f [CI] Update Cmake from 3.10 to 3.17 hydai , 2020-05-15 - https://github.com/WasmEdge/WasmEdge/commit/0091f5d0eaaf50ac80b2c142e8696facd28dfbe9 0091f5d0 [CI] Update base image to Ubuntu 20.04 hydai , 2020-07-13 - https://github.com/WasmEdge/WasmEdge/commit/0181fc77ba395bc74dcba2526f8090a85d5240f5 0181fc77 [Misc] Add ninja-build on docker image Shen-Ta Hsieh , 2020-12-15 - https://github.com/WasmEdge/WasmEdge/commit/7baa8ecd53f12effdc37845951566ebb4c6e3423 7baa8ecd [Misc] Build manylinux* package Shen-Ta Hsieh , 2020-12-18 - https://github.com/WasmEdge/WasmEdge/commit/ab6906cf41941224bd212f389eca31fcd6448858 ab6906cf [Misc] Add manylinux* package on release Shen-Ta Hsieh , 2020-12-24 - https://github.com/WasmEdge/WasmEdge/commit/6359fc05212738ba2463ec794812c188bceebd4c 6359fc05 [CI] Create a CI docker env for building the remaining docker images hydai , 2021-01-19 - https://github.com/WasmEdge/WasmEdge/commit/e8b7d81777c6fe173a06669854c46f54631fca17 e8b7d817 [Misc] Rename SSVM to WasmEdge Shen-Ta Hsieh , 2021-05-03 - https://github.com/WasmEdge/WasmEdge/commit/6777e5ba92541c7467eed2fb5adac34dddb3f241 6777e5ba [Misc] Update boost to 1.76 Shen-Ta Hsieh , 2021-05-17 - https://github.com/WasmEdge/WasmEdge/commit/9b282d4193eed577b2b7fd62352c6f9aba2cc351 9b282d41 [Misc] Move environment variable to Dockerfile Shen-Ta Hsieh , 2021-05-17 - https://github.com/WasmEdge/WasmEdge/commit/e0bef8fd41913ed8cba86e2675859cffe5201edb e0bef8fd [Misc] Use helper script to build Shen-Ta Hsieh , 2021-05-17 - https://github.com/WasmEdge/WasmEdge/commit/e5041ae5f29b7bd18ea06b0f3450fb00ec448481 e5041ae5 [Deps] Bump LLVM to 12.0.0 hydai , 2021-05-24 - https://github.com/WasmEdge/WasmEdge/commit/02a27865a809e98f25371a8b74803aa990f4b794 02a27865 [Misc] Upgrade llvm to 12.0.0, zstd to 1.5.0 Shen-Ta Hsieh , 2021-05-25 - https://github.com/WasmEdge/WasmEdge/commit/76968fed47b8ecf34028218051382f948611419b 76968fed [Misc] Change all CMake global properties to target specified properties Shen-Ta Hsieh , 2021-07-05 - https://github.com/WasmEdge/WasmEdge/commit/6768753d6c52cc4e7a3d801fedd8d0df33a0c5fe 6768753d [CI] Enable ubuntu 20.04 x86_64 build hydai , 2021-07-27 - https://github.com/WasmEdge/WasmEdge/commit/37eebd41c1f366e86e469ea5215a207cf8bed04f 37eebd41 [Misc] Removed binfmt support hydai , 2021-07-27 - https://github.com/WasmEdge/WasmEdge/commit/d672511a69755f3188c82bf5bd3bf7b8cf74c405 d672511a [Misc] Install dpkg-dev to enable dpkg-shlibdeps when creating the deb release hydai , 2021-08-04 - https://github.com/WasmEdge/WasmEdge/commit/3ee592477d76714a12c257c121380074e76ff7e7 3ee59247 [Misc] Add armhf dockerfile hydai , 2021-08-03 - https://github.com/WasmEdge/WasmEdge/commit/1eb640071bf788dca90a380ca3fa1e40e423cca8 1eb64007 [Misc] Rollback the development environment from 21.04 to 20.04 LTS hydai , 2021-09-15 - https://github.com/WasmEdge/WasmEdge/commit/bee4ad9831dec02d3224b9005d69cf30e3e973f6 bee4ad98 [Misc] Add copyright text (#964) Shen-Ta Hsieh(BestSteve) , 2022-01-04 - https://github.com/WasmEdge/WasmEdge/commit/222c395e4d0dd471edd8983b7d08d5c807415585 222c395e [Misc] Update boost in manylinux build Shen-Ta Hsieh , 2022-04-29 - https://github.com/WasmEdge/WasmEdge/commit/c53bd14bc6262f764786ccdc801264e6f7002310 c53bd14b [WASI] support OpenVINO backend for WASI-NN (#1340) Jianbai Ye , 2022-03-10 - https://github.com/WasmEdge/WasmEdge/commit/7c9d83e6c5de5c63623685650bb7245e4d9abcce 7c9d83e6 [Test] Update the WASI-NN test scripts. YiYing He , 2022-06-07 - https://github.com/WasmEdge/WasmEdge/commit/b8c10b6a7f19879d42614e0e9f028bef1b97b620 b8c10b6a [WASI] Refine the cmake options for WASI-NN. YiYing He , 2022-06-27 - https://github.com/WasmEdge/WasmEdge/commit/59a058f1ae029e3fb9816af0c9b4bc43b45e2e61 59a058f1 [Utils] Move the WASI-NN build scripts into `utils/wasi-nn`. YiYing He , 2022-06-29 - https://github.com/WasmEdge/WasmEdge/commit/4b1b59981ab066af2c1081dbc59b1e48ac2df973 4b1b5998 [Docs] Fix outdated contributing page (#1618) Yukang , 2022-07-05 - https://github.com/WasmEdge/WasmEdge/commit/0122229895a82eabb22b3ab92afeb91aec1129b7 01222298 [Docker] Release DockerSlim images dm4 , 2022-07-06 - https://github.com/WasmEdge/WasmEdge/commit/50a0b727902de8a9aa3e34aa2546465131aed896 50a0b727 [Misc] Add the `PLUGIN` prefix for wasi-nn options and update the WASI-NN docs. YiYing He , 2022-07-12 - https://github.com/WasmEdge/WasmEdge/commit/fdfd61c0ab59b82ebea4f2b8a434ffb7bb97499e fdfd61c0 [Utils] Add the option to assign the build type when building manylinux. YiYing He , 2022-07-12 - https://github.com/WasmEdge/WasmEdge/commit/dac182f61f0f81c8609d7dbf8ee58637d4b685e3 dac182f6 [Utils] Separate the openVINO installation and WasmEdge building. YiYing He , 2022-07-12 - https://github.com/WasmEdge/WasmEdge/commit/ab9ebafcaa7798a3e19242efd661999ccd4b2752 ab9ebafc [WASI] wasi-crypto host functions and definitions. sonder-joker , 2022-07-13 - https://github.com/WasmEdge/WasmEdge/commit/92ac2a761c7ca177025599b6a5a5e8f508a953d2 92ac2a76 [Misc] Refactor the WASI-Crypto to plugin. YiYing He , 2022-07-14 - https://github.com/WasmEdge/WasmEdge/commit/41471fbfe5649dc3fb5e1e1ef216695ce007bcdb 41471fbf [CI] Move out the wasi-crypto testing. YiYing He , 2022-07-19 - https://github.com/WasmEdge/WasmEdge/commit/2a0e89e5d882a537a911e9ae34788a4cdae792e6 2a0e89e5 [CI] Publish docker slim image in release.yml dm4 , 2022-07-29 - https://github.com/WasmEdge/WasmEdge/commit/62d0ecc6b76b41d9a715c1d82c7c8cbb6a2fc663 62d0ecc6 [WASI] Support PyTorch Backend of WASI-NN proposal (#1654) Gustavo Ye , 2022-08-22 - https://github.com/WasmEdge/WasmEdge/commit/2cfd4bbb5a00f4345a3cdebde32bd47ebea90708 2cfd4bbb [WASI] Refine the WASI-NN pytorch scripts YiYing He , 2022-09-14 - https://github.com/WasmEdge/WasmEdge/commit/e6ca189b930d622271317d5e55b0d21177d82a9d e6ca189b [WASI] Support tensorflow lite backend for WASI-NN (#1846) Gustavo Ye , 2022-10-20 - https://github.com/WasmEdge/WasmEdge/commit/60237c0933eb776192d1f3d4f2c30de6d187c448 60237c09 [CI] Add network libs into slim images dm4 , 2022-10-28 - https://github.com/WasmEdge/WasmEdge/commit/4c571a2e12309ba534a88ff11fa0f070ee27c9ea 4c571a2e [Misc] Bump wasmedge docker image from ubuntu 20.04 to ubuntu 22.04 hydai , 2023-05-17 - https://github.com/WasmEdge/WasmEdge/commit/02ef5687a99d4180716a0a4bde4df1f6ce556fc6 02ef5687 [Docker] Update manylinux2014 to use devtoolset-11 Shen-Ta Hsieh , 2023-06-05 - https://github.com/WasmEdge/WasmEdge/commit/eacbe3887ef3455473168650182a6f3d94daabd1 eacbe388 [Misc] use std::boyer_moore_horspool_searcher instead of boost one hydai , 2023-06-11 - https://github.com/WasmEdge/WasmEdge/commit/a1059d15e3be95dfb0bd310f31f7345f081dd884 a1059d15 [WASI-NN] Updating install script for OpenVino 2023.0.0 version (#2636) Divyanshu Gupta <114072061+Mash707@users.noreply.github.com>, 2023-07-18 - https://github.com/WasmEdge/WasmEdge/commit/6a23b149b90af26e750062c6ec05140b50349b0b 6a23b149 [Utils] devtoolset-11 is not available on manylinux2014 aarch64, downgrade to devtoolset-10 hydai , 2023-07-18 - https://github.com/WasmEdge/WasmEdge/commit/1bb9d52538b91139c950fadc408a7512d0fb6d4b 1bb9d525 [CI] build static library in github actions (#2666) Jorge Prendes , 2023-07-20 - https://github.com/WasmEdge/WasmEdge/commit/586675c10c9660b7ef2e0f1e0b573cc5f9e8af57 586675c1 [Plugin] Implement OpenCV-mini (#2648) Lîm Tsú-thuàn , 2023-07-25 - https://github.com/WasmEdge/WasmEdge/commit/fa0d8a055c549afb694f00bf7b980feac55a2a8e fa0d8a05 [CI] build alpine static libraries (#2699) Jorge Prendes , 2023-07-31 - https://github.com/WasmEdge/WasmEdge/commit/f84f9fe4e95313eed108eb9d8bb28eb78f303497 f84f9fe4 [CI] Fix CI build dm4 , 2023-09-21 - https://github.com/WasmEdge/WasmEdge/commit/0d9fb0e45e2152c79e3fa13afdb1b9428e3e5a41 0d9fb0e4 [WASI-NN] Enable OpenVINO target again (#2940) hydai , 2023-10-17 - https://github.com/WasmEdge/WasmEdge/commit/d5056a106e1160b200781e8544ccb35998c8689d d5056a10 [WASI-NN] openvino: upgrade to 2.0 (#3140) vincent , 2024-01-21 - https://github.com/WasmEdge/WasmEdge/commit/614f9a6a07e9ca1f3a4eee5f973e7aa4a946ade5 614f9a6a [Misc] Update the printed messages to match the actual installed version of OpenVINO. (#3193) vincent , 2024-02-04 - https://github.com/WasmEdge/WasmEdge/commit/6ad56a4638c4cabeffd05c8d47a1905f0c24ebeb 6ad56a46 [AOT] Move LLVM-related code into separate directory Shen-Ta Hsieh , 2023-12-05 - https://github.com/WasmEdge/WasmEdge/commit/f5cf26c66e4bbb9bca00497fce5c814aac7d56fa f5cf26c6 [Docker] manylinux_2_28 (#3188) Yi Huang , 2024-02-16 - https://github.com/WasmEdge/WasmEdge/commit/0b285f7bc01cc1797997da1e537161d31d7449c1 0b285f7b [Plugin] Initial support for FFmpeg (#2885) Hrushikesh , 2024-03-12 - https://github.com/WasmEdge/WasmEdge/commit/1aac7a524c42278858f3e1433b25f62d91764143 1aac7a52 [Docker] Add zlib dependencies Yi Huang , 2024-03-13 - https://github.com/WasmEdge/WasmEdge/commit/821c821229b87c74de0dc2c8fc181c756eb524a8 821c8212 [CI] Move dependencies to docker image Yi Huang , 2024-03-15 - https://github.com/WasmEdge/WasmEdge/commit/fe88ec1c762db98890856d8d01be4f2dc38c9cb9 fe88ec1c [CI] Add aarch64 for `ci-image-base` Yi Huang , 2024-05-16 - https://github.com/WasmEdge/WasmEdge/commit/e907fe44cd172910b7470658778b16b8d0a31dcc e907fe44 [Misc] Remove dup files Yi Huang , 2024-05-22 - https://github.com/WasmEdge/WasmEdge/commit/2bf30ba4c2000fc115a0f1dd296613ddf0f8527f 2bf30ba4 [Misc] Upgrade LLVM to 17.0.6, cmake to 3.29.3 (#3278) Shen-Ta Hsieh(BestSteve) , 2024-05-30 - https://github.com/WasmEdge/WasmEdge/commit/dccfc090f621421948ebe3d30ed34df608fffba4 dccfc090 [CI] Upgraded the WASI-NN OpenVino backend to 2024.2.0 (#3494) Elmira <95964498+PrabhuUdurg@users.noreply.github.com>, 2024-06-24 - https://github.com/WasmEdge/WasmEdge/commit/30f38e2caf48ba6441f28730f6ccbc73ee2a0886 30f38e2c [Docker] Install `elfutils` for bpf Yi Huang , 2024-07-02 - https://github.com/WasmEdge/WasmEdge/commit/b47caadfbd40e79644da2f9cf78e36fc573cb4d4 b47caadf [Docker] Install gh in workflows Yi Huang , 2024-07-03 - https://github.com/WasmEdge/WasmEdge/commit/474737a239a16bfad1db266569238722deae18cf 474737a2 [Docker] Fix option for pytorch install Yi Huang , 2024-07-04 - https://github.com/WasmEdge/WasmEdge/commit/fc745a8e474e5325b71c59c1256352461946d7da fc745a8e [Docker] Add LD_LIBRARY_PATH for gcc 13 Yi Huang , 2024-07-05 - https://github.com/WasmEdge/WasmEdge/commit/6d776b1e5c97c39bb0775a8bd22e7aa4a3c1416f 6d776b1e [Docker] Fix dependency: change to dev lib Yi Huang , 2024-07-05 - https://github.com/WasmEdge/WasmEdge/commit/51c52750c1b2acebee168a635be263ab59904968 51c52750 [Misc] Fix missing .hcl file extensions Yi Huang , 2024-07-09 - https://github.com/WasmEdge/WasmEdge/commit/3eb4abd21fa99ea4fa3d52ec56f074391c6047e5 3eb4abd2 [Docker] Resolve warnings on ENV definition Yi Huang , 2024-07-11 - https://github.com/WasmEdge/WasmEdge/commit/2313fe94671601500e502c8fb58987800b1a02c6 2313fe94 [Docker] Refactor manylinux_2_28 with docker bake Yi Huang , 2024-07-09 - https://github.com/WasmEdge/WasmEdge/commit/254444cbb3d2c53ab7bc9ac6e48d5afe6bb6d311 254444cb [Misc] Append EOF via linelint hydai , 2024-07-27 - https://github.com/WasmEdge/WasmEdge/commit/957e40eb61e039a081351535a37824f9d6dba11c 957e40eb [WASI-NN] piper: fix piper dependencies (#3583) PeterD1524 <53310459+PeterD1524@users.noreply.github.com>, 2024-07-30 - https://github.com/WasmEdge/WasmEdge/commit/ff1c84875cfe9c9a48b1a5deeecac6dfa812b865 ff1c8487 [Docker] install onnxruntime in manylinux_2_28-plugins-deps for WASI-NN Piper CI (#3622) PeterD1524 <53310459+PeterD1524@users.noreply.github.com>, 2024-08-05 - https://github.com/WasmEdge/WasmEdge/commit/97dc4c851ae699aae08a87487ff5d53e3679f3ed 97dc4c85 [Misc] Update the file copyright text and lint. (#3629) Yi-Ying He , 2024-08-07 - https://github.com/WasmEdge/WasmEdge/commit/29f883cacc6b3e50b84cf6ff12091dbffb069f77 29f883ca [Docker] Refactor ubuntu images with docker bake Yi Huang , 2024-08-21 - https://github.com/WasmEdge/WasmEdge/commit/c7ca4315f0da4496ed7fe0f3b0ef44265d8d6104 c7ca4315 [Docker] Fix warnings for manylinux images Yi Huang , 2024-08-21 - https://github.com/WasmEdge/WasmEdge/commit/24a7d9d760cd3eded586ffd62087590296a0add3 24a7d9d7 [Docker] Fix Github warnings: remove MAINTAINER field Yi Huang , 2024-08-22 - https://github.com/WasmEdge/WasmEdge/commit/0cd3cd939701292ae459dcda2b067b1312f284cf 0cd3cd93 [Docker] Add ubuntu 20.04 to bake list (#3694) Yi , 2024-08-27 - https://github.com/WasmEdge/WasmEdge/commit/e4291732e0fe14a192bc70aef684cc9a1f3b0f11 e4291732 [Docker] Apply ubuntu version from bake file (#3703) Yi , 2024-08-28 - https://github.com/WasmEdge/WasmEdge/commit/6ab4830c9b23a1ec97af7649d8cb16ec31ad1898 6ab4830c [Docker] Add aarch64 for ubuntu 20.04 Yi Huang , 2024-08-29 - https://github.com/WasmEdge/WasmEdge/commit/d998543b5b50ec4cd7d3c380882f0269140ea52e d998543b [Docker] Ubuntu: Add plugin dependencies Yi Huang , 2024-09-12 - https://github.com/WasmEdge/WasmEdge/commit/cc41c247f454951858db327fa1cc5b89a8bb6d95 cc41c247 [Docker] Ubuntu: Refine for caching Yi Huang , 2024-09-12 - https://github.com/WasmEdge/WasmEdge/commit/047866429433c2ce972c7a257894e8c7a0428821 04786642 [Docker] install latest cmake from Kitware APT Repository for ubuntu 20.04 Kitware APT Repository: https://apt.kitware.com/ PeterD1524 , 2024-09-22 - https://github.com/WasmEdge/WasmEdge/commit/cf6a8787dbb1e0c4db1c3e6d244c856bbd3222c3 cf6a8787 [CI] Refactor ubuntu plugins (WASI-NN) (#3786) Yi , 2024-09-23 - https://github.com/WasmEdge/WasmEdge/commit/f128014a0854dbdb324fd08e045f04ef3195e86e f128014a [Docker] Ubuntu: Pre-install CUDA Yi Huang , 2024-09-24 - https://github.com/WasmEdge/WasmEdge/commit/5fa75ae1f1890003504a33b73e8fbe49571767c6 5fa75ae1 [Plugin] Update pytorch version (#3818) LFsWang <7088579+LFsWang@users.noreply.github.com>, 2024-10-07 - https://github.com/WasmEdge/WasmEdge/commit/a570bbb92cbe3ee6b9f645272e2983853e36a43d a570bbb9 [Docker] Ubuntu: Fix OpenVINO apt source (#3819) Yi , 2024-10-08 - https://github.com/WasmEdge/WasmEdge/commit/1e9bd63e01244023b0acd8d5cc802923f67a0a7d 1e9bd63e [Docker] Disable pytorch c++11 abi on manylinux_2_28 (#3826) LFsWang <7088579+LFsWang@users.noreply.github.com>, 2024-10-14 - https://github.com/WasmEdge/WasmEdge/commit/3b0ef781be3c7b5d7a176a5f2b875eaf3608fb27 3b0ef781 [Docker] Ubuntu: Add 24.04 Yi Huang , 2024-09-18 - https://github.com/WasmEdge/WasmEdge/commit/9da7b990ecfe1142dc4ec6ace61ba3382662abde 9da7b990 [Docker] Install FFmpeg 6.1 via apt on Ubuntu 24.04 Yi Huang , 2024-11-04 - https://github.com/WasmEdge/WasmEdge/commit/eaf8d0986d81eb57eb9a30a24208f1bf21d15dcf eaf8d098 [Docker] Ubuntu: Install deps to /usr/local instead of /root Yi Huang , 2024-11-05 - https://github.com/WasmEdge/WasmEdge/commit/bc8d616aca003a23ccd7239440c51facb86201bd bc8d616a [Plugin] Update pytorch version (#3901) LFsWang <7088579+LFsWang@users.noreply.github.com>, 2024-12-04 - https://github.com/WasmEdge/WasmEdge/commit/365699e309e8bfac97ec13efc3fa3fabfa2787ad 365699e3 [Docker] Update llvm, zstd, ninja, cmake in dockerfile (#3924) Shen-Ta Hsieh(BestSteve) , 2024-12-29 - https://github.com/WasmEdge/WasmEdge/commit/8f9208ae1a8243cc058ec385492b21a848b0d898 8f9208ae [WASI-NN] openvino: update to 2025.0.0 (#4016) LFsWang <7088579+LFsWang@users.noreply.github.com>, 2025-02-11 - https://github.com/WasmEdge/WasmEdge/commit/92e780d8c11caf3ed649e2947a4c55760e5abc95 92e780d8 [WASI-NN] add dependency installer for openvino-genai (#4032) LFsWang <7088579+LFsWang@users.noreply.github.com>, 2025-03-06 - https://github.com/WasmEdge/WasmEdge/commit/849c25d09ec7b95b47554ebe5ccba7f66e156101 849c25d0 build(docker): install ChatTTS in ubuntu-plugins-deps for WASI-NN ChatTTS CI (#4080) PeterD1524 <53310459+PeterD1524@users.noreply.github.com>, 2025-04-12 - https://github.com/WasmEdge/WasmEdge/commit/aa77d2acf23951e1f3054214f3592276aab53cd8 aa77d2ac fix: lint install-openvino-genai.sh (#4087) varunrmallya <100590632+varun-r-mallya@users.noreply.github.com>, 2025-04-18 - https://github.com/WasmEdge/WasmEdge/commit/846bd736fa1cc49d8e797bfc3719c253ba1583cf 846bd736 chore(docker): bump the llvm from 12 to 18 on ubuntu 20.04 hydai , 2025-06-04 - https://github.com/WasmEdge/WasmEdge/commit/fef49e68bcb9f9db268824bee5f68e5a2eb693f8 fef49e68 docker(ubuntu): simplify image names for plugins (#4235) Yi , 2025-07-04 - https://github.com/WasmEdge/WasmEdge/commit/05d98e9d5d9db0393dcee299f63f0ab4df3d2797 05d98e9d fix(WASI-NN/ChatTTS): fix chatTTS CI failed (#4349) Han-Wen Tsao , 2025-09-09 - https://github.com/WasmEdge/WasmEdge/commit/db0e0cb870d90aea72715615039025602a310b15 db0e0cb8 feat(plugin): bump the dependencies of wasmedge-ffmpeg, ffmpeg to 7.1 (#4327) cmd05 <63466463+cmd05@users.noreply.github.com>, 2025-10-07 - https://github.com/WasmEdge/WasmEdge/commit/0c84aba3674bc6d324309461c139c24f71528aa7 0c84aba3 feat(docker): add standalone alpine-base image build pipeline (#4466) Sankalp Jha , 2025-12-24 - https://github.com/WasmEdge/WasmEdge/commit/76114806b0eb246512b43300d9850ec3f7269c96 76114806 Upgrade Alpine base to 3.23 and restore static LLD support (#4440) Sankalp Jha , 2025-12-26 - https://github.com/WasmEdge/WasmEdge/commit/a925d18d0cd21294e83f7b19a7f56182488728bc a925d18d feat(docker): add libpiper to plugin-deps image Divyansh Khatri , 2026-01-09 - https://github.com/WasmEdge/WasmEdge/commit/f30b14c01f196dafb11507197947d13676754a8a f30b14c0 fix(utils/ffmpeg): remove duplicate directory creation check (#4484) Vishal Malyan <146833908+vishal2005025@users.noreply.github.com>, 2026-01-12 - https://github.com/WasmEdge/WasmEdge/commit/c457fe3092ce2e70ac654dd1cced0a3ebbf9dd78 c457fe30 fix(docker): build libpiper statically in install script (#4535) Divyansh Khatri <146909065+Divyansh200102@users.noreply.github.com>, 2026-01-19 - https://github.com/WasmEdge/WasmEdge/commit/92b6e44de6af9a1b68fa8bd2e5cce2335bee365b 92b6e44d fix(docker): build libpiper statically (#4565) Divyansh Khatri <146909065+Divyansh200102@users.noreply.github.com>, 2026-01-28 - https://github.com/WasmEdge/WasmEdge/commit/211aa7e804a97a5bd18e9b54e5558b1cfa768858 211aa7e8 fix(docker): manually link espeak-ng and ucd static libs for Piper backend (#4622) Divyansh Khatri <146909065+Divyansh200102@users.noreply.github.com>, 2026-02-09 - https://github.com/WasmEdge/WasmEdge/commit/96f39fa5b9a246fd4dc6be027e51a96cab3b85c9 96f39fa5 fix(wasi-nn): install espeak-ng-data for Piper backend tests in CI (#4634) Divyansh Khatri <146909065+Divyansh200102@users.noreply.github.com>, 2026-02-10 - https://github.com/WasmEdge/WasmEdge/commit/b084ef8695cecec7030247905e5415c1ad9905e5 b084ef86 chore: fix comment grammar sweep (#4850) hydai , 2026-05-08 - https://github.com/WasmEdge/WasmEdge/commit/6f2c9bc6bc84e2c38dd194306f5ff27115d781f3 6f2c9bc6 ci: remove obsolete apt-transport-https and duplicate dpkg-dev (#4646) Vishal Malyan <146833908+vishal2005025@users.noreply.github.com>, 2026-06-09 - https://github.com/WasmEdge/WasmEdge/commit/b5dc8604d9c782ac1c473a9937a8bdad8012670a b5dc8604 chore: update copyright to The WasmEdge Authors hydai , 2026-06-22 - https://github.com/WasmEdge/WasmEdge/commit/fe1cc5143d06f096fb210241d5f916b7f77ee038 fe1cc514 ci(docker): fix ChatTTS install failure on Ubuntu 24.04 plugins image (#5119) hydai , 2026-07-04 - https://github.com/WasmEdge/WasmEdge/commit/1a0fefbecabde5f46698a1cb474ca28071987e28 1a0fefbe ci: install zstd in Linux build images for consistent cache compression hydai , 2026-07-03 - https://github.com/WasmEdge/WasmEdge/commit/135576feeb832ae7ed25125f1f6ad3745464e560 135576fe ci(docker): abort install-pytorch.sh when the libtorch download fails (#5134) hydai , 2026-07-08 - https://github.com/WasmEdge/WasmEdge/commit/fbb566e13ca14ee22a0719094a3b571b6edace2e fbb566e1 chore: bump libtorch to the cxx11-abi 2.12.1 in the plugins-deps images (#5166) YiYing He , 2026-07-14 - https://github.com/WasmEdge/WasmEdge/commit/f8093c5775f22347573e89d8f283ce2cfed1990c f8093c57 ci: upgrade Debian static build to Bookworm (#5333) Shen-Ta Hsieh(BestSteve) , 2026-09-09 Additional upstream commits in the refreshed file lineage: - https://github.com/WasmEdge/WasmEdge/commit/2fc8e071fd9dda4efa1e91335d298e0349059ab8 2fc8e071 feat(WASI-NN, piper): bump libpiper to v1.8.0 hydai - https://github.com/WasmEdge/WasmEdge/commit/394a07ba7abbcae0b757237ea66cc42ffc9c0e53 394a07ba fix(WASI-NN, piper): free the synthesizer when libpiper's model load throws hydai - https://github.com/WasmEdge/WasmEdge/commit/40ba2ced9448b4430132ca6625b9aa7adb91b570 40ba2ced fix(WASI-NN, piper): fail load instead of exiting when espeak-ng has no data hydai - https://github.com/WasmEdge/WasmEdge/commit/64c6968543fe7a85975e31c53d2fc12a7a36b7e4 64c69685 fix(wasi-nn): pin and verify the onnxruntime archive for libpiper builds hydai - https://github.com/WasmEdge/WasmEdge/commit/cb5fe3bd625bc5d80cd1acd7dd89b5dfb339707d cb5fe3bd fix(docker): drop the onnxruntime 1.14.1 layer from the plugin images hydai - https://github.com/WasmEdge/WasmEdge/commit/7485c8e2ab3564a908dfbfadb8b29226182c59c7 7485c8e2 fix(docker): fetch the apt.llvm.org key over IPv4 with retries hydai - https://github.com/WasmEdge/WasmEdge/commit/a4cb45c3e1ff95b0984f5bf11ba18d65ce2c79e3 a4cb45c3 chore(docker): drop the OpenCV build from the plugins images hydai - https://github.com/WasmEdge/WasmEdge/commit/536d99fc9e1bdc8e38a8bf4b840dce70d70de73f 536d99fc chore(docker): build FFmpeg in parallel hydai - https://github.com/WasmEdge/WasmEdge/commit/e415201c203e0996355646c1d4ed48d7eb629777 e415201c ci(docker): build the Alpine base image on native runners hydai - https://github.com/WasmEdge/WasmEdge/commit/4780c8219f5cdf559306c28d0da88e9ec093f68b 4780c821 ci(docker): link a consumer against the Debian static library hydai - https://github.com/WasmEdge/WasmEdge/commit/512db9f513fff9facac396ac72f31748de638797 512db9f5 fix(wasi-nn): use NuGet source for Piper ONNX Runtime Yi Huang Signed-off-by: Yi Huang Signed-off-by: Yi Huang --- Dockerfile.debian-static | 14 +++- Dockerfile.manylinux_2_28-plugins-deps | 7 -- Dockerfile.ubuntu-base | 2 +- Dockerfile.ubuntu-plugins-deps | 9 --- docker-bake.alpine-base.hcl | 12 ++-- scripts/ffmpeg/install-ffmpeg-v7.1.1.sh | 2 +- scripts/opencvmini/install-opencvmini.sh | 19 ------ scripts/wasi-nn/install-libpiper.sh | 47 +++++++++++-- scripts/wasi-nn/install-onnxruntime.sh | 27 -------- scripts/wasi-nn/libpiper.patch | 86 +++++++++++++++++++++--- 10 files changed, 143 insertions(+), 82 deletions(-) delete mode 100644 scripts/opencvmini/install-opencvmini.sh delete mode 100644 scripts/wasi-nn/install-onnxruntime.sh diff --git a/Dockerfile.debian-static b/Dockerfile.debian-static index 68418a0..edd231a 100644 --- a/Dockerfile.debian-static +++ b/Dockerfile.debian-static @@ -11,7 +11,7 @@ COPY --from=xx / / # Install host dependencies RUN apt-get update -y && apt-get install --no-install-recommends -y \ lsb-release ca-certificates curl wget gnupg \ - cmake ninja-build git clang xz-utils + cmake ninja-build git clang xz-utils file # Set up llvm's apt repo ARG LLVM_VERSION @@ -85,6 +85,18 @@ RUN cmake -S /src -B /build -G Ninja \ -DWASMEDGE_USE_LLVM=ON RUN cmake --build /build -- install + +# Link a consumer against the installed static library +RUN /bin/bash < /smoke.c +#include +int main(void) { return WasmEdge_VersionGet() == 0; } +EOF + xx-clang /smoke.c -I/install/include -L/install/lib -lwasmedge -lstdc++ -lm -lrt -ldl -lpthread -o /smoke + xx-verify /smoke +EOT + RUN cmake --build /build -- package RUN mv /build/WasmEdge-*-Linux.tar.gz $(echo build/WasmEdge-*-Linux.tar.gz | sed 's|WasmEdge-\(.*\)-Linux.tar.gz|WasmEdge-\1-debian'$(lsb_release -sr)'_'$(xx-info march)'_static.tar.gz|') diff --git a/Dockerfile.manylinux_2_28-plugins-deps b/Dockerfile.manylinux_2_28-plugins-deps index 4ecc921..33d2e6a 100644 --- a/Dockerfile.manylinux_2_28-plugins-deps +++ b/Dockerfile.manylinux_2_28-plugins-deps @@ -27,10 +27,6 @@ RUN cd && (yum check-update || true) && \ ### deps for all ### FROM deps-${TARGETARCH} AS final -COPY scripts/opencvmini/install-opencvmini.sh . -ENV OPENCV_VERSION="4.8.0" -RUN [ "/bin/bash", "install-opencvmini.sh" ] - COPY scripts/wasi-crypto/build-openssl.sh . ENV OpenSSL_DIR="/root/openssl-1.1.1n/openssl" RUN [ "/bin/bash", "build-openssl.sh" ] @@ -43,9 +39,6 @@ ENV LD_LIBRARY_PATH=/root/FFmpeg-n7.1.1/output/lib${LD_LIBRARY_PATH:+:${LD_LIBRA ENV OPENVINO_VERSION="2025.0.0" ENV OPENVINO_YEAR="2025" -COPY scripts/wasi-nn/install-onnxruntime.sh . -RUN [ "/bin/bash", "install-onnxruntime.sh" ] - COPY scripts/wasi-nn/libpiper.patch . COPY scripts/wasi-nn/install-libpiper.sh . RUN [ "/bin/bash", "install-libpiper.sh" ] diff --git a/Dockerfile.ubuntu-base b/Dockerfile.ubuntu-base index 0fc6118..a966211 100644 --- a/Dockerfile.ubuntu-base +++ b/Dockerfile.ubuntu-base @@ -22,7 +22,7 @@ FROM base AS deps-20 RUN curl -sSf https://apt.kitware.com/kitware-archive.sh | sh RUN apt-get install -y cmake -RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ +RUN curl -4 -sSfL --retry 5 https://apt.llvm.org/llvm-snapshot.gpg.key > /etc/apt/trusted.gpg.d/apt.llvm.org.asc \ && echo "deb http://apt.llvm.org/focal llvm-toolchain-focal-18 main" | tee /etc/apt/sources.list.d/llvm.list RUN apt-get install -y \ diff --git a/Dockerfile.ubuntu-plugins-deps b/Dockerfile.ubuntu-plugins-deps index a4b843a..dbc39ff 100644 --- a/Dockerfile.ubuntu-plugins-deps +++ b/Dockerfile.ubuntu-plugins-deps @@ -47,10 +47,6 @@ FROM deps-${UBUNTU_VER} AS deps-all WORKDIR /root -COPY scripts/opencvmini/install-opencvmini.sh . -ENV OPENCV_VERSION="4.8.0" -RUN [ "/bin/bash", "install-opencvmini.sh" ] - COPY scripts/wasi-nn/install-pytorch.sh . ENV PYTORCH_VERSION="2.12.1" ENV PYTORCH_INSTALL_TO="/usr/local/libtorch" @@ -72,9 +68,6 @@ RUN [ "/bin/bash", "install-openvino-genai.sh" ] RUN [ "ls", "-al" ] RUN [ "/bin/bash", "-c", "echo \"source ./openvino_genai/setupvars.sh\" >> .bashrc" ] -COPY scripts/wasi-nn/install-onnxruntime.sh . -RUN [ "/bin/bash", "install-onnxruntime.sh" ] - COPY scripts/wasi-nn/libpiper.patch . COPY scripts/wasi-nn/install-libpiper.sh . RUN [ "/bin/bash", "install-libpiper.sh" ] @@ -86,11 +79,9 @@ RUN [ "/bin/bash", "install-chattts.sh" ] FROM deps-all AS clean-apt RUN rm -f \ - install-opencvmini.sh \ install-ffmpeg-v7.1.1.sh \ install-pytorch.sh \ install-openvino.sh \ - install-onnxruntime.sh \ install-openvino-genai.sh \ install-chattts.sh \ install-libpiper.sh diff --git a/docker-bake.alpine-base.hcl b/docker-bake.alpine-base.hcl index e64a83b..8ebd12d 100644 --- a/docker-bake.alpine-base.hcl +++ b/docker-bake.alpine-base.hcl @@ -5,8 +5,12 @@ group "default" { target "alpine-base" { dockerfile = "Dockerfile.alpine-base" context = "." - # Build for both major architectures at once - platforms = ["linux/amd64", "linux/arm64"] - # Tag it clearly so we can use it later - tags = ["wasmedge/wasmedge:alpine-base-3.23"] + + matrix = { + arch = ["amd64", "arm64"] + } + + name = "alpine-base-${arch}" + platforms = ["linux/${arch}"] + tags = ["wasmedge/wasmedge:alpine-base-3.23-${arch}"] } diff --git a/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh b/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh index 4e04994..4466a9b 100644 --- a/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh +++ b/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh @@ -8,7 +8,7 @@ unzip ffmpeg.zip mkdir -p FFmpeg-n7.1.1/output cd FFmpeg-n7.1.1 ./configure --prefix=$(pwd)/output --enable-gpl --enable-nonfree --enable-shared --disable-static -make && make install +make -j"$(nproc)" && make install cd .. rm -rf ffmpeg.zip diff --git a/scripts/opencvmini/install-opencvmini.sh b/scripts/opencvmini/install-opencvmini.sh deleted file mode 100644 index ec2da38..0000000 --- a/scripts/opencvmini/install-opencvmini.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: Copyright The WasmEdge Authors -OPENCV_VERSION=${OPENCV_VERSION:-4.8.0} - -wget -O opencv.zip https://github.com/opencv/opencv/archive/refs/tags/${OPENCV_VERSION}.zip - -unzip opencv.zip -mv opencv-${OPENCV_VERSION} opencv - -mkdir -p opencv/build && cd opencv/build -# Configure -cmake -GNinja .. -# Build -cmake --build . -# Install to system -cmake --install . - -cd - && rm -rf opencv opencv.zip diff --git a/scripts/wasi-nn/install-libpiper.sh b/scripts/wasi-nn/install-libpiper.sh index d2242fd..d2a4733 100755 --- a/scripts/wasi-nn/install-libpiper.sh +++ b/scripts/wasi-nn/install-libpiper.sh @@ -13,18 +13,53 @@ if [ ! -f "${PATCH_PATH}" ]; then fi PIPER_REPO="https://github.com/OHF-Voice/piper1-gpl.git" -PIPER_COMMIT="32b95f8c1f0dc0ce27a6acd1143de331f61af777" +PIPER_COMMIT="639388b6317fc4731e91d53da42aea68fd4166ff" PIPER_INSTALL_TO="/usr/local" +ONNXRUNTIME_VERSION="1.22.0" case "$(uname -m)" in - 'x86_64') ;; - 'aarch64') ;; + 'x86_64') + ONNXRUNTIME_ARCH="x64" + ONNXRUNTIME_RID="linux-x64" + ;; + 'aarch64') + ONNXRUNTIME_ARCH="aarch64" + ONNXRUNTIME_RID="linux-arm64" + ;; *) echo "Unsupported architecture for libpiper: $(uname -m)" >&2 exit 1 ;; esac +ONNXRUNTIME_NAME="onnxruntime-linux-${ONNXRUNTIME_ARCH}-${ONNXRUNTIME_VERSION}" +ONNXRUNTIME_PACKAGE="microsoft.ml.onnxruntime.${ONNXRUNTIME_VERSION}.nupkg" +ONNXRUNTIME_URL="https://api.nuget.org/v3-flatcontainer/microsoft.ml.onnxruntime/${ONNXRUNTIME_VERSION}/${ONNXRUNTIME_PACKAGE}" +ONNXRUNTIME_PACKAGE_SHA256="d571e63a2329baacb713f441e65ad75284de354db6e1ac435fe4bebbb417986a" + +rm -rf "${ONNXRUNTIME_NAME}" "${ONNXRUNTIME_PACKAGE}" +DOWNLOADED=0 +for _ in 1 2 3 4 5; do + if curl -fL -o "${ONNXRUNTIME_PACKAGE}" "${ONNXRUNTIME_URL}"; then + DOWNLOADED=1 + break + fi + sleep 10 +done +[ "${DOWNLOADED}" -eq 1 ] +echo "${ONNXRUNTIME_PACKAGE_SHA256} ${ONNXRUNTIME_PACKAGE}" | sha256sum -c +mkdir -p "${ONNXRUNTIME_NAME}/include" "${ONNXRUNTIME_NAME}/lib" +unzip -q "${ONNXRUNTIME_PACKAGE}" \ + "build/native/include/*" \ + "runtimes/${ONNXRUNTIME_RID}/native/libonnxruntime.so" \ + "runtimes/${ONNXRUNTIME_RID}/native/libonnxruntime_providers_shared.so" \ + -d .onnxruntime-package +cp -R .onnxruntime-package/build/native/include/. "${ONNXRUNTIME_NAME}/include/" +cp .onnxruntime-package/runtimes/${ONNXRUNTIME_RID}/native/libonnxruntime.so "${ONNXRUNTIME_NAME}/lib/" +cp .onnxruntime-package/runtimes/${ONNXRUNTIME_RID}/native/libonnxruntime_providers_shared.so "${ONNXRUNTIME_NAME}/lib/" +rm -rf .onnxruntime-package +ONNXRUNTIME_DIR="$(pwd)/${ONNXRUNTIME_NAME}" + rm -rf piper-source git clone --depth 1 "${PIPER_REPO}" piper-source cd piper-source @@ -37,9 +72,11 @@ cd libpiper cmake -Bbuild \ -DCMAKE_BUILD_TYPE=Release \ + -DPIPER_BUILD_EXE=OFF \ -DCMAKE_INSTALL_PREFIX="${PIPER_INSTALL_TO}" \ -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DONNXRUNTIME_DIR="${ONNXRUNTIME_DIR}" cmake --build build --parallel $(nproc) cmake --install build @@ -75,6 +112,6 @@ else fi cd ../.. -rm -rf piper-source +rm -rf piper-source "${ONNXRUNTIME_NAME}" "${ONNXRUNTIME_PACKAGE}" ldconfig diff --git a/scripts/wasi-nn/install-onnxruntime.sh b/scripts/wasi-nn/install-onnxruntime.sh deleted file mode 100644 index 4943833..0000000 --- a/scripts/wasi-nn/install-onnxruntime.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright The WasmEdge Authors - -set -e - -case "$(uname -m)" in - 'x86_64') ARCH='x64' ;; - 'aarch64') ARCH='aarch64' ;; - *) - echo 'Cannot determine architecture for onnxruntime' >&2 - exit 1 - ;; -esac - -: ${ONNXRUNTIME_VERSION:=1.14.1} - -ONNXRUNTIME_NAME="onnxruntime-linux-${ARCH}-${ONNXRUNTIME_VERSION}" -ONNXRUNTIME_TGZ="${ONNXRUNTIME_NAME}.tgz" - -curl -LO "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/${ONNXRUNTIME_TGZ}" -tar zxf "${ONNXRUNTIME_TGZ}" -mv "${ONNXRUNTIME_NAME}/include/"* /usr/local/include/ -mv "${ONNXRUNTIME_NAME}/lib/"* /usr/local/lib/ -rm -rf "${ONNXRUNTIME_TGZ}" "${ONNXRUNTIME_NAME}" - -ldconfig diff --git a/scripts/wasi-nn/libpiper.patch b/scripts/wasi-nn/libpiper.patch index e74cb4b..0fedba8 100644 --- a/scripts/wasi-nn/libpiper.patch +++ b/scripts/wasi-nn/libpiper.patch @@ -1,22 +1,92 @@ diff --git a/libpiper/CMakeLists.txt b/libpiper/CMakeLists.txt -index 57349c1..2e7ddd8 100644 +index d43e714..a59d625 100644 --- a/libpiper/CMakeLists.txt +++ b/libpiper/CMakeLists.txt -@@ -2,6 +2,8 @@ +@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.26) project(piper LANGUAGES C CXX) - + +option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) ++option(PIPER_BUILD_EXE "Build the piper command line tool" ON) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) - -@@ -112,7 +114,7 @@ endif() - + +@@ -141,7 +144,7 @@ endif() + include(ClangTidy.cmake) # ---- libpiper --- - + -add_library(piper SHARED +add_library(piper ${CMAKE_CURRENT_SOURCE_DIR}/src/piper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/chinese_phonemizer.cpp ) - +@@ -159,10 +162,12 @@ target_link_libraries(piper + ) + + # ---- piper exe --- +-add_subdirectory(src/main) ++if(PIPER_BUILD_EXE) ++ add_subdirectory(src/main) ++endif() + + # ---- version +-file(READ ${CMAKE_SOURCE_DIR}/../setup.py SETUP_PY_CONTENTS) ++file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../setup.py SETUP_PY_CONTENTS) + string(REGEX MATCH "version=\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _ ${SETUP_PY_CONTENTS}) + set(PIPER_VERSION ${CMAKE_MATCH_1}) + +diff --git a/libpiper/src/piper.cpp b/libpiper/src/piper.cpp +index 56b61b0..608b5be 100644 +--- a/libpiper/src/piper.cpp ++++ b/libpiper/src/piper.cpp +@@ -4,6 +4,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -22,6 +23,7 @@ + #define PIPER_VERSION "0.0.1" + #endif + ++#include + #include + + using json = nlohmann::json; +@@ -95,13 +97,19 @@ auto piper_create_with_options(const piper_create_options *options) + phoneme_type = config["phoneme_type"].get(); + } + +- if (phoneme_type == PhonemeType::Espeak && +- espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS, 0, final_espeak_data_path, +- 0) < 0) { +- return nullptr; ++ if (phoneme_type == PhonemeType::Espeak) { ++ espeak_ng_InitializePath(final_espeak_data_path); ++ espeak_ng_ERROR_CONTEXT espeak_context = nullptr; ++ espeak_ng_STATUS espeak_status = espeak_ng_Initialize(&espeak_context); ++ if (espeak_status != ENS_OK) { ++ espeak_ng_PrintStatusCodeMessage(espeak_status, stderr, espeak_context); ++ espeak_ng_ClearErrorContext(&espeak_context); ++ return nullptr; ++ } ++ espeak_ng_InitializeOutput(ENOUTPUT_MODE_SYNCHRONOUS, 0, nullptr); + } + +- auto *synth = new piper_synthesizer(); ++ std::unique_ptr synth(new piper_synthesizer()); + synth->phoneme_type = phoneme_type; + + // Load config options +@@ -280,7 +288,7 @@ auto piper_create_with_options(const piper_create_options *options) + synth->session = std::make_unique( + Ort::Session(ort_env, model_path_ort, synth->session_options)); + +- return synth; ++ return synth.release(); + } + + auto piper_create(const char *model_path, const char *config_path,