From 24fc24ca86489b5a108d5da90ff676a0a3b07ae2 Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Wed, 11 Nov 2026 15:30:07 +0800 Subject: [PATCH 1/6] feat(docker): import 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 0.18.1 at `b2e483553ea7a1826be117180125c71e5d0b8958`. Relocate: - `utils/docker/` -> `.` - `utils/ffmpeg/` -> `scripts/ffmpeg/` - `utils/opencvmini/` -> `scripts/opencvmini/` - `utils/wasi-crypto/` -> `scripts/wasi-crypto/` - `utils/wasi-nn/` -> `scripts/wasi-nn/` Snapshot: https://github.com/WasmEdge/WasmEdge/tree/b2e483553ea7a1826be117180125c71e5d0b8958 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 Signed-off-by: Yi Huang --- .dockerignore | 2 + Dockerfile.alpine-base | 62 ++++++++++ Dockerfile.alpine-static | 116 ++++++++++++++++++ Dockerfile.ci-image-base | 21 ++++ Dockerfile.debian-static | 92 ++++++++++++++ Dockerfile.manylinux_2_28-base | 4 +- Dockerfile.manylinux_2_28-plugins-deps | 25 ++-- Dockerfile.release | 13 ++ Dockerfile.ubuntu-base | 4 +- Dockerfile.ubuntu-plugins-deps | 23 ++-- Dockerfile.ubuntu2004_x86_64 | 24 ++++ Dockerfile.ubuntu2104_armv7l | 43 +++++++ SHA256SUM.manylinux_2_28 | 7 ++ build-manylinux.sh | 63 ++++++++++ docker-bake.alpine-base.hcl | 12 ++ docker-bake.alpine-static.hcl | 17 +++ docker-bake.ci-image-base.hcl | 26 ++++ docker-bake.debian-static.hcl | 17 +++ docker-bake.manylinux.hcl | 2 +- docker-bake.ubuntu.hcl | 14 +-- .../ffmpeg/download-ffmpeg-sample-video.sh | 19 +++ scripts/ffmpeg/install-ffmpeg-v7.1.1.sh | 14 +++ scripts/opencvmini/install-opencvmini.sh | 2 +- scripts/wasi-crypto/build-openssl.sh | 4 +- .../wasi-nn/build-wasinn-ubuntu-openvino.sh | 18 +++ scripts/wasi-nn/install-chattts.sh | 9 +- scripts/wasi-nn/install-libpiper.sh | 80 ++++++++++++ scripts/wasi-nn/install-onnxruntime.sh | 2 +- scripts/wasi-nn/install-openvino-genai.sh | 2 +- scripts/wasi-nn/install-openvino.sh | 2 +- scripts/wasi-nn/install-pytorch.sh | 36 +++--- scripts/wasi-nn/libpiper.patch | 22 ++++ .../wasi-nn/test-wasinn-ubuntu-openvino.sh | 10 ++ 33 files changed, 754 insertions(+), 53 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile.alpine-base create mode 100644 Dockerfile.alpine-static create mode 100644 Dockerfile.ci-image-base create mode 100644 Dockerfile.debian-static create mode 100644 Dockerfile.release create mode 100644 Dockerfile.ubuntu2004_x86_64 create mode 100644 Dockerfile.ubuntu2104_armv7l create mode 100644 SHA256SUM.manylinux_2_28 create mode 100755 build-manylinux.sh create mode 100644 docker-bake.alpine-base.hcl create mode 100644 docker-bake.alpine-static.hcl create mode 100644 docker-bake.ci-image-base.hcl create mode 100644 docker-bake.debian-static.hcl create mode 100644 scripts/ffmpeg/download-ffmpeg-sample-video.sh create mode 100644 scripts/ffmpeg/install-ffmpeg-v7.1.1.sh create mode 100755 scripts/wasi-nn/build-wasinn-ubuntu-openvino.sh create mode 100755 scripts/wasi-nn/install-libpiper.sh create mode 100644 scripts/wasi-nn/libpiper.patch create mode 100755 scripts/wasi-nn/test-wasinn-ubuntu-openvino.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4e4023c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +/build +/debug diff --git a/Dockerfile.alpine-base b/Dockerfile.alpine-base new file mode 100644 index 0000000..c1e587e --- /dev/null +++ b/Dockerfile.alpine-base @@ -0,0 +1,62 @@ +# syntax=docker/dockerfile:1.5-labs + +ARG ALPINE_VERSION=3.23 + +# ---------------------------------------------------- +# STAGE 1: Builder +# Compiles LLD from source, linking against system LLVM +# ---------------------------------------------------- +FROM alpine:${ALPINE_VERSION} AS builder + +# Use a specific tag for reproducibility +# Pinned version to match Alpine 3.23's system LLVM (v19) +ARG LLVM_VERSION=llvmorg-19.1.5 + +# Build Dependencies: +# - build-base: Compiler toolchain (gcc, g++, make, libc-dev) required for compilation. +# - cmake: The build system used by LLVM. +# - ninja: The build generator (faster than make). +# - python3: Required by LLVM build scripts and configuration utilities. +# - git: Required to clone the LLVM repository. +# - linux-headers: Ensures system header compatibility for C++ standard library builds. +# - llvm19-dev: Provides LLVM development headers for version 19. +# - llvm19-static: Provides static LLVM libraries for version 19. +# - zstd-static: Provides static zstd compression libraries. +# - zlib-static: Provides static zlib compression libraries. +RUN apk add --no-cache build-base cmake ninja python3 git linux-headers \ + llvm19-dev llvm19-static zstd-static zlib-static + + +# The system CMake files require testing libraries that are missing in the Alpine package. +# We create empty dummy archives to satisfy the dependency check. +RUN LLVM_LIB_DIR=/usr/lib/llvm19/lib && \ + for f in libLLVMTestingAnnotations.a libLLVMTestingSupport.a libllvm_gtest.a libllvm_gtest_main.a; do \ + ar rc "$LLVM_LIB_DIR/$f"; \ + done + +# Clone LLVM Project +WORKDIR /src +# Shallow clone specific tag +RUN git clone --depth 1 -b ${LLVM_VERSION} https://github.com/llvm/llvm-project.git + + +# Configure and Build LLD +# We treat LLD as a standalone project and point it to the system LLVM +WORKDIR /src/llvm-project/lld +RUN cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DLLVM_DIR=/usr/lib/llvm19/lib/cmake/llvm \ + -DLLVM_BUILD_STATIC=ON \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF && \ + cmake --build build --target lldELF lldCommon lldMachO lldCOFF lldWasm lldMinGW + +# ---------------------------------------------------- +# STAGE 2: Final Image (Contains only the compiled static libraries) +# ---------------------------------------------------- +FROM alpine:${ALPINE_VERSION} + +# Copy artifacts to a standard library path +COPY --from=builder /src/llvm-project/lld/build/lib/liblld*.a /usr/local/lib/ + diff --git a/Dockerfile.alpine-static b/Dockerfile.alpine-static new file mode 100644 index 0000000..37e144d --- /dev/null +++ b/Dockerfile.alpine-static @@ -0,0 +1,116 @@ +# syntax=docker/dockerfile:1.5-labs + +ARG XX_VERSION=1.2.1 +ARG ALPINE_VERSION=3.23 + + +# ---------------------------------------------------- +# STAGE 1: Import Pre-Built LLD Libraries +# ---------------------------------------------------- +FROM wasmedge/wasmedge:alpine-base-3.23 AS lld-artifact + +# ---------------------------------------------------- +# STAGE 2: Main WasmEdge Build +# ---------------------------------------------------- +FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx +FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS base +COPY --from=xx / / + +# Install host dependencies +RUN apk add bash cmake samurai g++ clang +SHELL [ "bash", "-c" ] + +# Make a cmake toolchain file +RUN cat <<'EOT' > /usr/bin/xx-toolchain && chmod a+x /usr/bin/xx-toolchain +#!/bin/bash +mkdir -p /etc/xx-toolchains/ +TOOLCHAIN_FILE="/etc/xx-toolchains/$(xx-clang --print-target-triple).cmake" +[ -f "$TOOLCHAIN_FILE" ] || cat < "$TOOLCHAIN_FILE" +set(CMAKE_CROSSCOMPILING ON) +set(CMAKE_SYSROOT "$(xx-info sysroot)") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR "$(xx-info march)") +set(CMAKE_C_COMPILER "$(which clang)") +set(CMAKE_CXX_COMPILER "$(which clang++)") +set(CMAKE_ASM_COMPILER "$(which clang)") +set(CMAKE_AR "$(which ar)") +set(CMAKE_RANLIB "$(which ranlib)") +set(PKG_CONFIG_EXECUTABLE "$(xx-clang --print-prog-name=pkg-config)") +set(CMAKE_C_COMPILER_TARGET "$(xx-clang --print-target-triple)") +set(CMAKE_CXX_COMPILER_TARGET "$(xx-clang --print-target-triple)") +set(CMAKE_ASM_COMPILER_TARGET "$(xx-clang --print-target-triple)") +EOF +echo "$TOOLCHAIN_FILE" +EOT + +FROM base AS config +ARG TARGETPLATFORM + +RUN apk add git llvm-dev +# We add zstd-static because the SYSTEM LLVM (installed via apk) depends on it. +RUN xx-apk add \ + g++ \ + llvm-dev llvm-static \ + lld lld-dev \ + zlib-dev zlib-static \ + zstd-static + +# Fix LLVMConfig.cmake to account for the sysroot +RUN sed -i 's|/usr/lib/llvm|${CMAKE_SYSROOT}usr/lib/llvm|' $(xx-info sysroot)usr/lib/cmake/llvm*/LLVMConfig.cmake + +# Patch: Create dummy files for missing testing libraries to satisfy CMake +RUN for d in $(xx-info sysroot)usr/lib/llvm*/lib; do \ + for f in libLLVMTestingAnnotations.a libLLVMTestingSupport.a libllvm_gtest.a libllvm_gtest_main.a; do \ + ar rc "$d/$f"; \ + done \ + done + +# Inject the Native LLD libraries from Stage 1 (The Base Image) +# Note: We changed the source path to /usr/local/lib because that's where we put them in the base image +COPY --from=lld-artifact /usr/local/lib/liblld*.a /tmp/lld-libs/ +RUN cp /tmp/lld-libs/*.a $(xx-info sysroot)usr/lib/llvm*/lib/ + +# Use the native version of llvm-config +RUN ! xx-info is-cross || cp -f /usr/lib/llvm*/bin/llvm-config $(xx-info sysroot)usr/lib/llvm*/bin/llvm-config + +RUN --mount=type=bind,target=/src,source=. \ + cmake -S /src -B /build -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_INSTALL_PREFIX="/install" \ + # For cross compiling + -DCMAKE_TOOLCHAIN_FILE="$(xx-toolchain)" \ + -DWASMEDGE_BUILD_PACKAGE="TGZ" \ + -DWASMEDGE_USE_LLVM=ON \ + # Build just what we need + -DWASMEDGE_BUILD_STATIC_LIB=ON \ + -DWASMEDGE_BUILD_TESTS=OFF \ + -DWASMEDGE_BUILD_SHARED_LIB=OFF \ + -DWASMEDGE_BUILD_TOOLS=OFF \ + -DWASMEDGE_BUILD_PLUGINS=OFF \ + -DWASMEDGE_BUILD_EXAMPLE=OFF \ + # link llvm statically + -DWASMEDGE_LINK_LLVM_STATIC=ON \ + -DWASMEDGE_LINK_TOOLS_STATIC=ON \ + # Disable extra dependencies + -DWASMEDGE_DISABLE_LIBTINFO=ON + +FROM config AS build +RUN --mount=type=bind,target=/src,source=. \ + cmake --build /build -- install package + +ARG ALPINE_VERSION +RUN --mount=type=bind,target=/src,source=. < /etc/apt/trusted.gpg.d/apt.llvm.org.asc + echo "deb http://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-${LLVM_VERSION} main" > /etc/apt/sources.list.d/llvm.list + apt-get update -y +EOT + +FROM base as deps +ARG TARGETPLATFORM LLVM_VERSION + +# Install llvm-*-dev: +RUN /bin/bash < package depends on llvm-*: and llvm-*-tools: but + # should depend on llvm-*-tools: and llvm-*:. + # Patch llvm-*-dev: to replace those dependencies. + # See: https://groups.google.com/g/linux.debian.bugs.dist/c/OrHgd5vY278 + cd $(mktemp -d) + xx-apt show llvm-${LLVM_VERSION}-dev + apt-get download llvm-${LLVM_VERSION}-dev:$(xx-info debian-arch) + ar x llvm-${LLVM_VERSION}-dev_*.deb + tar xJf control.tar.* + sed -Ei 's|(llvm-[0-9]*(-tools)?) |\1:'$(TARGETPLATFORM='' TARGETPAIR='' TARGETOS='' TARGETARCH='' TARGETVARIANT='' xx-info debian-arch)' |g' control + tar --ignore-failed-read -czf control.tar.gz {post,pre}{inst,rm} md5sums control + ar rcs llvm-dev-patched.deb debian-binary control.tar.gz data.tar.* + apt-get install --no-install-recommends -y ./llvm-dev-patched.deb +EOT + +# Install other *: dev dependencies +RUN xx-apt-get install --no-install-recommends -y \ + xx-cxx-essentials \ + liblld-${LLVM_VERSION}-dev libpolly-${LLVM_VERSION}-dev \ + libncurses-dev zlib1g-dev libzstd-dev + +# Make a cmake toolchain file +RUN cat < /toolchain.cmake + set(CMAKE_SYSTEM_NAME "Linux") + set(CMAKE_SYSTEM_VERSION 1) + set(CMAKE_SYSTEM_PROCESSOR "$(xx-info march)") + set(CMAKE_C_COMPILER "xx-clang") + set(CMAKE_CXX_COMPILER "xx-clang++") + set(CMAKE_ASM_COMPILER "xx-clang") + set(CMAKE_AR "ar") + set(DPKG_CONFIG_EXECUTABLE $(xx-clang --print-prog-name=pkg-config)) + set(DCMAKE_C_COMPILER_TARGET $(xx-clang --print-target-triple)) + set(DCMAKE_CXX_COMPILER_TARGET $(xx-clang --print-target-triple)) + set(DCMAKE_ASM_COMPILER_TARGET $(xx-clang --print-target-triple)) +EOT + +FROM deps as src +ADD . /src + +FROM src as build +RUN cmake -S /src -B /build -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE=/toolchain.cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_INSTALL_PREFIX=/install \ + -DWASMEDGE_BUILD_PACKAGE="TGZ" \ + -DWASMEDGE_BUILD_TESTS=OFF \ + -DWASMEDGE_BUILD_SHARED_LIB=OFF \ + -DWASMEDGE_BUILD_STATIC_LIB=ON \ + -DWASMEDGE_BUILD_TOOLS=OFF \ + -DWASMEDGE_BUILD_PLUGINS=OFF \ + -DWASMEDGE_BUILD_EXAMPLE=OFF \ + -DWASMEDGE_LINK_LLVM_STATIC=ON \ + -DWASMEDGE_LINK_TOOLS_STATIC=ON \ + -DWASMEDGE_USE_LLVM=ON + +RUN cmake --build /build -- install +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|') + +FROM scratch as tar +COPY --from=build /build/WasmEdge-*.tar.gz / diff --git a/Dockerfile.manylinux_2_28-base b/Dockerfile.manylinux_2_28-base index c7fee27..64d7025 100644 --- a/Dockerfile.manylinux_2_28-base +++ b/Dockerfile.manylinux_2_28-base @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors ARG BASE_IMAGE="quay.io/pypa/manylinux_2_28_x86_64" FROM ${BASE_IMAGE} -ADD scripts/SHA256SUM.manylinux_2_28 /root/ +ADD SHA256SUM.manylinux_2_28 /root/ # See /opt/rh/gcc-toolset-13/enable ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin${PATH:+:${PATH}} diff --git a/Dockerfile.manylinux_2_28-plugins-deps b/Dockerfile.manylinux_2_28-plugins-deps index 3362f32..4ecc921 100644 --- a/Dockerfile.manylinux_2_28-plugins-deps +++ b/Dockerfile.manylinux_2_28-plugins-deps @@ -6,18 +6,23 @@ WORKDIR /root ### deps for x86_64 ### FROM base AS deps-amd64 RUN cd && (yum check-update || true) && \ - yum install -y wget unzip zlib-devel zlib-static elfutils-libelf-devel + yum install -y wget unzip zlib-devel zlib-static elfutils-libelf-devel zstd COPY scripts/wasi-nn/install-pytorch.sh . -ENV PYTORCH_VERSION="2.5.1" -ENV PYTORCH_INSTALL_TO="/root" +# The pre-cxx11-abi libtorch is kept for the branches still building with the +# pre-cxx11 ABI; remove it after the 0.18.0 release. +ENV PYTORCH_INSTALL_TO="/root/libtorch" ENV Torch_DIR="/root/libtorch" RUN [ "/bin/bash", "install-pytorch.sh", "--disable-cxx11-abi" ] +ENV PYTORCH_VERSION="2.12.1" +ENV PYTORCH_INSTALL_TO="/root/libtorch-cxx11abi" +RUN [ "/bin/bash", "install-pytorch.sh" ] + ### deps for aarch64 ### FROM base AS deps-arm64 RUN cd && (yum check-update || true) && \ - yum install -y wget unzip zlib-devel zlib-static + yum install -y wget unzip zlib-devel zlib-static zstd ### deps for all ### FROM deps-${TARGETARCH} AS final @@ -30,10 +35,10 @@ COPY scripts/wasi-crypto/build-openssl.sh . ENV OpenSSL_DIR="/root/openssl-1.1.1n/openssl" RUN [ "/bin/bash", "build-openssl.sh" ] -COPY scripts/ffmpeg/install-ffmpeg-v6.0.sh . -RUN [ "/bin/bash", "install-ffmpeg-v6.0.sh" ] -ENV PKG_CONFIG_PATH=/root/FFmpeg-n6.0/output/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} -ENV LD_LIBRARY_PATH=/root/FFmpeg-n6.0/output/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +COPY scripts/ffmpeg/install-ffmpeg-v7.1.1.sh . +RUN [ "/bin/bash", "install-ffmpeg-v7.1.1.sh" ] +ENV PKG_CONFIG_PATH=/root/FFmpeg-n7.1.1/output/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} +ENV LD_LIBRARY_PATH=/root/FFmpeg-n7.1.1/output/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} ENV OPENVINO_VERSION="2025.0.0" ENV OPENVINO_YEAR="2025" @@ -41,4 +46,8 @@ 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" ] + RUN yum clean all diff --git a/Dockerfile.release b/Dockerfile.release new file mode 100644 index 0000000..ab05caf --- /dev/null +++ b/Dockerfile.release @@ -0,0 +1,13 @@ +FROM ubuntu:22.04 +ARG VERSION + +RUN apt-get update && apt-get install -y netbase +ADD WasmEdge-$VERSION-Linux.tar.gz /tmp/ +RUN cp -rf /tmp/WasmEdge-$VERSION-Linux/bin/* /usr/local/bin && \ + cp -rf /tmp/WasmEdge-$VERSION-Linux/lib64/* /usr/local/lib && \ + cp -rf /tmp/WasmEdge-$VERSION-Linux/include/* /usr/local/include && \ + ldconfig /usr/local/lib +RUN rm -rf /tmp/WasmEdge-$VERSION-Linux + +WORKDIR /app +CMD ["/usr/local/bin/wasmedge"] diff --git a/Dockerfile.ubuntu-base b/Dockerfile.ubuntu-base index 8ef2aa4..0fc6118 100644 --- a/Dockerfile.ubuntu-base +++ b/Dockerfile.ubuntu-base @@ -13,7 +13,8 @@ RUN apt-get update && \ ninja-build \ software-properties-common \ wget \ - zlib1g-dev + zlib1g-dev \ + zstd ### deps for ubuntu 20.04 ### FROM base AS deps-20 @@ -40,6 +41,7 @@ ENV CXX=/usr/bin/clang++-18 ### deps for ubuntu 22.04 ### FROM base AS deps-22 +RUN curl -sSf https://apt.kitware.com/kitware-archive.sh | sh RUN apt-get install -y cmake RUN apt-get install -y \ diff --git a/Dockerfile.ubuntu-plugins-deps b/Dockerfile.ubuntu-plugins-deps index cb745fb..a4b843a 100644 --- a/Dockerfile.ubuntu-plugins-deps +++ b/Dockerfile.ubuntu-plugins-deps @@ -30,15 +30,15 @@ RUN apt-get install -y \ libswresample-dev \ libswscale-dev -# FFmpeg 6.0 (ubuntu 20.04, 22.04) +# FFmpeg 7.1.1 (ubuntu 20.04, 22.04) FROM base AS deps-20 WORKDIR /usr/local -COPY scripts/ffmpeg/install-ffmpeg-v6.0.sh . -RUN [ "/bin/bash", "install-ffmpeg-v6.0.sh" ] -ENV PKG_CONFIG_PATH=/usr/local/FFmpeg-n6.0/output/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} -ENV LD_LIBRARY_PATH=/usr/local/FFmpeg-n6.0/output/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +COPY scripts/ffmpeg/install-ffmpeg-v7.1.1.sh . +RUN [ "/bin/bash", "install-ffmpeg-v7.1.1.sh" ] +ENV PKG_CONFIG_PATH=/usr/local/FFmpeg-n7.1.1/output/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} +ENV LD_LIBRARY_PATH=/usr/local/FFmpeg-n7.1.1/output/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} FROM deps-20 AS deps-22 @@ -52,8 +52,8 @@ ENV OPENCV_VERSION="4.8.0" RUN [ "/bin/bash", "install-opencvmini.sh" ] COPY scripts/wasi-nn/install-pytorch.sh . -ENV PYTORCH_VERSION="2.5.1" -ENV PYTORCH_INSTALL_TO="/usr/local" +ENV PYTORCH_VERSION="2.12.1" +ENV PYTORCH_INSTALL_TO="/usr/local/libtorch" ENV Torch_DIR="/usr/local/libtorch" RUN [ "/bin/bash", "install-pytorch.sh" ] @@ -75,6 +75,10 @@ RUN [ "/bin/bash", "-c", "echo \"source ./openvino_genai/setupvars.sh\" >> .bash 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" ] + COPY scripts/wasi-nn/install-chattts.sh . RUN [ "/bin/bash", "install-chattts.sh" ] @@ -83,11 +87,12 @@ FROM deps-all AS clean-apt RUN rm -f \ install-opencvmini.sh \ - install-ffmpeg-v6.0.sh \ + install-ffmpeg-v7.1.1.sh \ install-pytorch.sh \ install-openvino.sh \ install-onnxruntime.sh \ install-openvino-genai.sh \ - install-chattts.sh + install-chattts.sh \ + install-libpiper.sh RUN rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile.ubuntu2004_x86_64 b/Dockerfile.ubuntu2004_x86_64 new file mode 100644 index 0000000..f71ed3c --- /dev/null +++ b/Dockerfile.ubuntu2004_x86_64 @@ -0,0 +1,24 @@ +FROM ubuntu:20.04 + +MAINTAINER hydai hydai@secondstate.io +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt upgrade -y \ + && apt install -y \ + software-properties-common \ + wget \ + cmake \ + ninja-build \ + curl \ + git \ + dpkg-dev \ + llvm-12-dev \ + liblld-12-dev \ + gcc \ + rpm \ + g++ + +RUN rm -rf /var/lib/apt/lists/* + +ENV CC=gcc +ENV CXX=g++ diff --git a/Dockerfile.ubuntu2104_armv7l b/Dockerfile.ubuntu2104_armv7l new file mode 100644 index 0000000..e3e7b54 --- /dev/null +++ b/Dockerfile.ubuntu2104_armv7l @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors + +FROM arm32v7/ubuntu:hirsute + +MAINTAINER hydai hydai@secondstate.io +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt upgrade -y \ + && apt install -y \ + build-essential \ + cmake \ + curl \ + dpkg-dev \ + gcc \ + gcc-multilib \ + g++ \ + g++-multilib \ + git \ + llvm-12-dev \ + liblld-12-dev \ + libssl-dev \ + ninja-build \ + software-properties-common \ + python3 \ + rpm \ + wget \ + xz-utils + +# Build CMake from source to avoid compiler_id_detection failures when using QEMU user-mode emulation +# See: https://gitlab.kitware.com/cmake/cmake/-/issues/20568 + +#RUN wget https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3.tar.gz --no-check-certificate && \ +# tar zxvf cmake-3.29.3.tar.gz && \ +# cd cmake-3.29.3 && \ +# ./configure && \ +# make install -j$(nproc) && \ +# cd .. && rm -rf cmake-3.29.3 + +RUN rm -rf /var/lib/apt/lists/* + +ENV CC=gcc +ENV CXX=g++ diff --git a/SHA256SUM.manylinux_2_28 b/SHA256SUM.manylinux_2_28 new file mode 100644 index 0000000..136490f --- /dev/null +++ b/SHA256SUM.manylinux_2_28 @@ -0,0 +1,7 @@ +e7dfc8050407b5cc564c1c1afe19517255c9229cccd886dbd5bac9b652828d85 clang-19.1.5.src.tar.xz +a08ae477571fd5e929c27d3d0d28c6168d58dd00b6354c2de3266ae0d86ad44f cmake-19.1.5.src.tar.xz +997b493fb604e5e2c5b11c765a4c42b37acf00a4d6e8a14f8108d5c1051d760f libunwind-19.1.5.src.tar.xz +f71835d49461a15c283aa9030a854abfd7c651a685d711a67158644b043f6f14 lld-19.1.5.src.tar.xz +7d71635948e4da1814ce8e15ec45399e4094a5442e86d352c96ded0f2b3171b6 llvm-19.1.5.src.tar.xz +22b352c35b034a4ab3f2b852b6a2602a4da8971abe459080450d9e3462550d1d third-party-19.1.5.src.tar.xz +821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a v1.12.1.tar.gz diff --git a/build-manylinux.sh b/build-manylinux.sh new file mode 100755 index 0000000..81e672d --- /dev/null +++ b/build-manylinux.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors + +git config --global --add safe.directory $(pwd) + +CMAKE_BUILD_TYPE="Release" +IS_BUILD_TARGET=true +IS_NINJA=true +CMAKE_OPTS="" + +for i in "$@"; do + case $i in + --release|--Release) + CMAKE_BUILD_TYPE="Release" + shift + ;; + --debug|--Debug) + CMAKE_BUILD_TYPE="Debug" + shift + ;; + --not-build) + IS_BUILD_TARGET=false + shift + ;; + --not-ninja) + IS_NINJA=false + shift + ;; + *) + CMAKE_OPTS="${CMAKE_OPTS} $i" + shift + ;; + esac +done + +if $IS_NINJA; then + if ! cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DWASMEDGE_BUILD_PACKAGE="TGZ;TBZ2;TXZ;TZST;RPM" ${CMAKE_OPTS} .; then + echo === CMakeOutput.log === + cat build/CMakeFiles/CMakeOutput.log + echo === CMakeError.log === + cat build/CMakeFiles/CMakeError.log + exit 1 + fi +else + rm -rf build + mkdir build + cd build + if ! cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DWASMEDGE_BUILD_PACKAGE="TGZ;TBZ2;TXZ;TZST;RPM;DEB" ${CMAKE_OPTS} ..; then + cd .. + echo === CMakeOutput.log === + cat build/CMakeFiles/CMakeOutput.log + echo === CMakeError.log === + cat build/CMakeFiles/CMakeError.log + exit 1 + fi + cd .. +fi + +if ${IS_BUILD_TARGET}; then + cmake --build build + cmake --build build --target package +fi diff --git a/docker-bake.alpine-base.hcl b/docker-bake.alpine-base.hcl new file mode 100644 index 0000000..e64a83b --- /dev/null +++ b/docker-bake.alpine-base.hcl @@ -0,0 +1,12 @@ +group "default" { + targets = ["alpine-base"] +} + +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"] +} diff --git a/docker-bake.alpine-static.hcl b/docker-bake.alpine-static.hcl new file mode 100644 index 0000000..5e02417 --- /dev/null +++ b/docker-bake.alpine-static.hcl @@ -0,0 +1,17 @@ +group "default" { + targets = ["cross"] +} + +target "base" { + dockerfile = "./Dockerfile.alpine-static" + context = "." + output = ["build"] +} + +target "cross" { + inherits = ["base"] + platforms = [ + "linux/amd64", + "linux/arm64" + ] +} diff --git a/docker-bake.ci-image-base.hcl b/docker-bake.ci-image-base.hcl new file mode 100644 index 0000000..8512498 --- /dev/null +++ b/docker-bake.ci-image-base.hcl @@ -0,0 +1,26 @@ +group "default" { + targets = [ + "x86_64", + "aarch64" + ] +} + +target "base" { + dockerfile = "Dockerfile.ci-image-base" + context = "." +} + +target "x86_64" { + inherits = ["base"] + platforms = ["linux/amd64"] + tags = [ + "wasmedge/wasmedge:ci-image-base", + "wasmedge/wasmedge:ci-image-base_x86_64" + ] +} + +target "aarch64" { + inherits = ["base"] + platforms = ["linux/arm64"] + tags = ["wasmedge/wasmedge:ci-image-base_aarch64"] +} diff --git a/docker-bake.debian-static.hcl b/docker-bake.debian-static.hcl new file mode 100644 index 0000000..217c55c --- /dev/null +++ b/docker-bake.debian-static.hcl @@ -0,0 +1,17 @@ +group "default" { + targets = ["cross"] +} + +target "base" { + dockerfile = "./Dockerfile.debian-static" + context = "." + output = ["build"] +} + +target "cross" { + inherits = ["base"] + platforms = [ + "linux/amd64", + "linux/arm64" + ] +} diff --git a/docker-bake.manylinux.hcl b/docker-bake.manylinux.hcl index 48e0cbf..a605017 100644 --- a/docker-bake.manylinux.hcl +++ b/docker-bake.manylinux.hcl @@ -4,7 +4,7 @@ target "base" { } target "plugins-base" { - dockerfile = "Dockerfile.manylinux_2_28-plugins-deps" + dockerfile = "./Dockerfile.manylinux_2_28-plugins-deps" context = "." } diff --git a/docker-bake.ubuntu.hcl b/docker-bake.ubuntu.hcl index d856572..cb95eaf 100644 --- a/docker-bake.ubuntu.hcl +++ b/docker-bake.ubuntu.hcl @@ -1,13 +1,13 @@ group "default" { targets = [ - "latest", + "cuda", + "final" ] } group "latest" { targets = [ "base-2404-clang", - "plugins-2404-clang", ] } @@ -38,12 +38,6 @@ group "noble" { ] } -group "aarch64" { - targets = [ - "base-2004-clang-aarch64", - ] -} - function "no-dot" { params = [ubuntu] result = replace(ubuntu, ".", "") @@ -115,7 +109,7 @@ target "base" { } target "plugins" { - dockerfile = "Dockerfile.ubuntu-plugins-deps" + dockerfile = "./Dockerfile.ubuntu-plugins-deps" context = "." matrix = { @@ -133,7 +127,7 @@ target "plugins" { } } -target "all-versions" { +target "final" { matrix = { parent = ["base", "plugins"] ubuntu = ["20.04", "22.04", "24.04"] diff --git a/scripts/ffmpeg/download-ffmpeg-sample-video.sh b/scripts/ffmpeg/download-ffmpeg-sample-video.sh new file mode 100644 index 0000000..4cff55d --- /dev/null +++ b/scripts/ffmpeg/download-ffmpeg-sample-video.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors + +# The video below is sourced from an ffmpeg-libav-tutorial repository. +# Source: https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/master/LICENSE. +TODIR=$1 +SAMPLE_VIDEO=https://raw.githubusercontent.com/Hrushi20/rust-ffmpeg/master/assets/bunny.mp4 +if [[ $# -eq 0 ]]; then + TODIR=. +fi +if [ ! -d $TODIR ]; then + mkdir $TODIR +fi + +if [ ! -f $TODIR/sample_video.mp4 ]; then + curl -sL $SAMPLE_VIDEO -o $TODIR/sample_video.mp4 + cp $TODIR/sample_video.mp4 $TODIR/dummy.mp4 # Dummy file to manipulate and run tests on file. +fi diff --git a/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh b/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh new file mode 100644 index 0000000..4e04994 --- /dev/null +++ b/scripts/ffmpeg/install-ffmpeg-v7.1.1.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -e + +curl -sL https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n7.1.1.zip -o ffmpeg.zip + +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 +cd .. + +rm -rf ffmpeg.zip diff --git a/scripts/opencvmini/install-opencvmini.sh b/scripts/opencvmini/install-opencvmini.sh index 43afef9..ec2da38 100644 --- a/scripts/opencvmini/install-opencvmini.sh +++ b/scripts/opencvmini/install-opencvmini.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# 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 diff --git a/scripts/wasi-crypto/build-openssl.sh b/scripts/wasi-crypto/build-openssl.sh index 45d628b..545cc46 100755 --- a/scripts/wasi-crypto/build-openssl.sh +++ b/scripts/wasi-crypto/build-openssl.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors echo "Building OpenSSL for wasi-crypto..." # Get OpenSSL source @@ -8,7 +8,7 @@ curl -s -L -O --remote-name-all https://www.openssl.org/source/openssl-1.1.1n.ta echo "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a openssl-1.1.1n.tar.gz" | sha256sum -c tar -xf openssl-1.1.1n.tar.gz cd ./openssl-1.1.1n -# OpenSSL configure need newer perl +# Configuring OpenSSL requires newer Perl. curl -s -L -O --remote-name-all https://www.cpan.org/src/5.0/perl-5.34.0.tar.gz tar -xf perl-5.34.0.tar.gz cd perl-5.34.0 diff --git a/scripts/wasi-nn/build-wasinn-ubuntu-openvino.sh b/scripts/wasi-nn/build-wasinn-ubuntu-openvino.sh new file mode 100755 index 0000000..7bcbe37 --- /dev/null +++ b/scripts/wasi-nn/build-wasinn-ubuntu-openvino.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors + +if [[ ! -v "${CMAKE_BUILD_TYPE}" ]]; then + CMAKE_BUILD_TYPE=Release +fi + +ldconfig +git config --global --add safe.directory $(pwd) +if ! cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DWASMEDGE_BUILD_TESTS=ON -DWASMEDGE_PLUGIN_WASI_NN_BACKEND="OpenVINO" .; then + echo === CMakeOutput.log === + cat build/CMakeFiles/CMakeOutput.log + echo === CMakeError.log === + cat build/CMakeFiles/CMakeError.log + exit 1 +fi +cmake --build build diff --git a/scripts/wasi-nn/install-chattts.sh b/scripts/wasi-nn/install-chattts.sh index f406d46..82edc0f 100644 --- a/scripts/wasi-nn/install-chattts.sh +++ b/scripts/wasi-nn/install-chattts.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors set -e @@ -14,7 +14,12 @@ pip install --upgrade pip # Install PyTorch CPU version to save space pip --python /usr/bin/python3 install --break-system-packages --index-url https://download.pytorch.org/whl/cpu 'torch<=2.6.0' 'torchaudio<=2.6.0' -pip --python /usr/bin/python3 install --break-system-packages chattts==0.2.3 + +# The Debian-provided numpy has no RECORD file, so pip cannot uninstall it +# when resolving a newer version. Shadow it with a pip-managed copy instead. +pip --python /usr/bin/python3 install --break-system-packages --ignore-installed 'numpy<3.0.0' + +pip --python /usr/bin/python3 install --break-system-packages chattts==0.2.4, transformers==4.46.3 # Remove wheel cache pip --python /usr/bin/python3 cache purge diff --git a/scripts/wasi-nn/install-libpiper.sh b/scripts/wasi-nn/install-libpiper.sh new file mode 100755 index 0000000..d2242fd --- /dev/null +++ b/scripts/wasi-nn/install-libpiper.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors + +set -e + +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" +PATCH_PATH="${SCRIPT_DIR}/libpiper.patch" + +if [ ! -f "${PATCH_PATH}" ]; then + echo "Error: libpiper.patch not found at ${PATCH_PATH}" + exit 1 +fi + +PIPER_REPO="https://github.com/OHF-Voice/piper1-gpl.git" +PIPER_COMMIT="32b95f8c1f0dc0ce27a6acd1143de331f61af777" +PIPER_INSTALL_TO="/usr/local" + +case "$(uname -m)" in + 'x86_64') ;; + 'aarch64') ;; + *) + echo "Unsupported architecture for libpiper: $(uname -m)" >&2 + exit 1 + ;; +esac + +rm -rf piper-source +git clone --depth 1 "${PIPER_REPO}" piper-source +cd piper-source +git fetch --depth 1 origin "${PIPER_COMMIT}" +git checkout FETCH_HEAD + +cp "${PATCH_PATH}" . +patch -p1 < libpiper.patch +cd libpiper + +cmake -Bbuild \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${PIPER_INSTALL_TO}" \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON +cmake --build build --parallel $(nproc) +cmake --install build + +echo "Copying espeak-ng static libraries to ${PIPER_INSTALL_TO}/lib..." + +if [ -f "build/espeak_ng-install/lib/libespeak-ng.a" ]; then + cp "build/espeak_ng-install/lib/libespeak-ng.a" "${PIPER_INSTALL_TO}/lib/" +else + find build -name "libespeak-ng.a" -exec cp {} "${PIPER_INSTALL_TO}/lib/" \; -quit +fi + +find build -name "libucd.a" -exec cp {} "${PIPER_INSTALL_TO}/lib/" \; -quit + +if [ ! -f "${PIPER_INSTALL_TO}/lib/libespeak-ng.a" ]; then + echo "Error: Failed to install libespeak-ng.a" + exit 1 +fi + +if [ ! -f "${PIPER_INSTALL_TO}/lib/libucd.a" ]; then + echo "Error: Failed to install libucd.a" + exit 1 +fi + +echo "Installing espeak-ng-data to ${PIPER_INSTALL_TO}/share..." + +if [ -d "build/espeak_ng-install/share/espeak-ng-data" ]; then + mkdir -p "${PIPER_INSTALL_TO}/share" + cp -r "build/espeak_ng-install/share/espeak-ng-data" "${PIPER_INSTALL_TO}/share/" + echo "Espeak-ng-data installed successfully." +else + echo "Error: espeak-ng-data directory not found in build tree!" + exit 1 +fi + +cd ../.. +rm -rf piper-source + +ldconfig diff --git a/scripts/wasi-nn/install-onnxruntime.sh b/scripts/wasi-nn/install-onnxruntime.sh index dad1fb5..4943833 100644 --- a/scripts/wasi-nn/install-onnxruntime.sh +++ b/scripts/wasi-nn/install-onnxruntime.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors set -e diff --git a/scripts/wasi-nn/install-openvino-genai.sh b/scripts/wasi-nn/install-openvino-genai.sh index 2be3691..a926af3 100644 --- a/scripts/wasi-nn/install-openvino-genai.sh +++ b/scripts/wasi-nn/install-openvino-genai.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors set -e if [[ ! -v "${OPENVINOGEN_VERSION}" ]]; then diff --git a/scripts/wasi-nn/install-openvino.sh b/scripts/wasi-nn/install-openvino.sh index 432f1ac..d74b62c 100755 --- a/scripts/wasi-nn/install-openvino.sh +++ b/scripts/wasi-nn/install-openvino.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors set -e if [[ ! -v "${OPENVINO_VERSION}" ]]; then diff --git a/scripts/wasi-nn/install-pytorch.sh b/scripts/wasi-nn/install-pytorch.sh index 55f77ac..c3097b4 100755 --- a/scripts/wasi-nn/install-pytorch.sh +++ b/scripts/wasi-nn/install-pytorch.sh @@ -1,31 +1,39 @@ #!/usr/bin/env bash # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# SPDX-FileCopyrightText: 2019-2024 Second State INC +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors +set -e if [[ ! -n ${PYTORCH_VERSION} ]]; then - PYTORCH_VERSION="2.5.1" + PYTORCH_VERSION="2.12.1" fi -if [[ ! -n ${PYTORCH_INSTALL_TO} ]]; then - PYTORCH_INSTALL_TO=. -fi - -PYTORCH_LINK="libtorch-cxx11-abi" -PYTORCH_SHA="618ca54eef82a1dca46ff1993d5807d9c0deb0bae147da4974166a147cb562fa" +PYTORCH_DEFAULT_DIR="libtorch-cxx11abi" +PYTORCH_SHA="78b99d296e0557742c780266a3fb94824ec382e8a285f4d8edf92e033572c5d4" for i in "$@"; do case $i in --disable-cxx11-abi) - PYTORCH_LINK="libtorch" + # The pre-cxx11-abi build is only published up to torch 2.5.1. + # This mode is kept for the branches still building with the pre-cxx11 + # ABI; remove it after the 0.18.0 release. + PYTORCH_VERSION="2.5.1" + PYTORCH_DEFAULT_DIR="libtorch" PYTORCH_SHA="21d05ad61935fc70912c779443dba112bda9c9ec1c999345d724935828f81c55" shift ;; esac done -if [ ! -d ${PYTORCH_INSTALL_TO}/libtorch ]; then - curl -s -L -O --remote-name-all https://download.pytorch.org/libtorch/cpu/${PYTORCH_LINK}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip - echo "${PYTORCH_SHA} ${PYTORCH_LINK}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip" | sha256sum -c - unzip -q "${PYTORCH_LINK}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip" -d ${PYTORCH_INSTALL_TO} - rm -f "${PYTORCH_LINK}-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip" +if [[ ! -n ${PYTORCH_INSTALL_TO} ]]; then + PYTORCH_INSTALL_TO=${PYTORCH_DEFAULT_DIR} +fi + +if [ ! -d ${PYTORCH_INSTALL_TO} ]; then + curl -sSf -L -O --remote-name-all https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip + echo "${PYTORCH_SHA} libtorch-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip" | sha256sum -c + PYTORCH_UNPACK_DIR=$(mktemp -d -p $(dirname ${PYTORCH_INSTALL_TO})) + unzip -q "libtorch-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip" -d ${PYTORCH_UNPACK_DIR} + mv ${PYTORCH_UNPACK_DIR}/libtorch ${PYTORCH_INSTALL_TO} + rmdir ${PYTORCH_UNPACK_DIR} + rm -f "libtorch-shared-with-deps-${PYTORCH_VERSION}%2Bcpu.zip" fi diff --git a/scripts/wasi-nn/libpiper.patch b/scripts/wasi-nn/libpiper.patch new file mode 100644 index 0000000..e74cb4b --- /dev/null +++ b/scripts/wasi-nn/libpiper.patch @@ -0,0 +1,22 @@ +diff --git a/libpiper/CMakeLists.txt b/libpiper/CMakeLists.txt +index 57349c1..2e7ddd8 100644 +--- a/libpiper/CMakeLists.txt ++++ b/libpiper/CMakeLists.txt +@@ -2,6 +2,8 @@ + cmake_minimum_required(VERSION 3.26) + project(piper LANGUAGES C CXX) + ++option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) ++ + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + +@@ -112,7 +114,7 @@ endif() + + # ---- libpiper --- + +-add_library(piper SHARED ++add_library(piper + ${CMAKE_CURRENT_SOURCE_DIR}/src/piper.cpp + ) + diff --git a/scripts/wasi-nn/test-wasinn-ubuntu-openvino.sh b/scripts/wasi-nn/test-wasinn-ubuntu-openvino.sh new file mode 100755 index 0000000..49dd01a --- /dev/null +++ b/scripts/wasi-nn/test-wasinn-ubuntu-openvino.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The WasmEdge Authors + +ldconfig +export LD_LIBRARY_PATH="$(pwd)/build/lib/api:$LD_LIBRARY_PATH" + +cd build +ctest +cd - From 446bd1a290c2cd151455f4df5461e984a65d516e Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Wed, 11 Nov 2026 15:30:08 +0800 Subject: [PATCH 2/6] ci(docker): import WasmEdge image workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Import the consolidated Docker workflow from WasmEdge 0.18.1 at `b2e483553ea7a1826be117180125c71e5d0b8958`. Update path triggers, dependency filters, and Bake file references for the relocated definitions and scripts. Snapshot: https://github.com/WasmEdge/WasmEdge/tree/b2e483553ea7a1826be117180125c71e5d0b8958 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/5e1e158ab65b398bbc0f1d529996d4cfc311a013 5e1e158a [CI] Add GitHub Action to build SSVM docker image hydai , 2020-06-09 - 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/a90c93f44492035b0f8d40da1456029b0bcf4d8f a90c93f4 [CI] Update docker action from v1 to v2 hydai , 2020-09-16 - https://github.com/WasmEdge/WasmEdge/commit/f469b799e4a220b4c5de4688ffc7e8936f62b2e8 f469b799 [CI] Update username and password for docker action hydai , 2020-09-16 - https://github.com/WasmEdge/WasmEdge/commit/ee394d8fba08375805f814f017be493821faa33b ee394d8f [CI] Remove unsupported platform for docker action hydai , 2020-09-16 - https://github.com/WasmEdge/WasmEdge/commit/862cbd9cc102abb1e95e7db28fa252cfb3dae2ef 862cbd9c [CI] Remove redundant inputs in docker action hydai , 2020-09-16 - https://github.com/WasmEdge/WasmEdge/commit/02a1189a379eb3949587f2a55d2fae6620724d07 02a1189a [CI] Publish docker image to github docker registry hydai , 2020-10-23 - https://github.com/WasmEdge/WasmEdge/commit/0fbb437058d9a68a1a953db2a005066e4e5ada04 0fbb4370 [CI] Update github registry link hydai , 2020-10-23 - https://github.com/WasmEdge/WasmEdge/commit/b6b0223c6f390acaeb6063ac839212655db50396 b6b0223c [CI] Disable github package registry hydai , 2020-10-23 - https://github.com/WasmEdge/WasmEdge/commit/97b30d76ca7cbf62aebd7eccb87f57b79a47baca 97b30d76 [CI] Set the scheduled docker building process from every day to every month hydai , 2020-12-18 - https://github.com/WasmEdge/WasmEdge/commit/658b1a02043592096d1564b67e9878c93e64cf92 658b1a02 [CI] Disable building docker image on each master commit hydai , 2020-12-18 - https://github.com/WasmEdge/WasmEdge/commit/7baa8ecd53f12effdc37845951566ebb4c6e3423 7baa8ecd [Misc] Build manylinux* package Shen-Ta Hsieh , 2020-12-18 - https://github.com/WasmEdge/WasmEdge/commit/d8a94a7705659122a9f3499725ab54147fce745e d8a94a77 [CI] Docker image should be built when the dockerfile or workflow is changed hydai , 2020-12-23 - https://github.com/WasmEdge/WasmEdge/commit/b2d323cf9460342c191361aa64ff03949654fc4a b2d323cf [CI] Build docker image everyday hydai , 2020-12-23 - https://github.com/WasmEdge/WasmEdge/commit/cb26d8dc6ef01e53c952d5e9afcdf1b53f6c9e09 cb26d8dc [CI] Use self-hosting action runner hydai , 2020-12-31 - 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/9d3e19fda76e1854b998117abee2066445bf541a 9d3e19fd [CI] Update release workflow hydai , 2021-01-22 - https://github.com/WasmEdge/WasmEdge/commit/18cf4c3eca8b8cee5a8554c2fa5e88b3597c7059 18cf4c3e [CI] Due to the limitation of CI instance, we only build docker image every month hydai , 2021-02-04 - https://github.com/WasmEdge/WasmEdge/commit/4fc60e14f4df6372b97c48fa1d14d2a189794489 4fc60e14 [CI] Remove self-hosted ci runner hydai , 2021-02-09 - https://github.com/WasmEdge/WasmEdge/commit/21f5c28da9f8deb556e8029b304c53b63d435c3b 21f5c28d [CI] Update CI and docker image links for WasmEdge (formerly SSVM) hydai , 2021-05-04 - https://github.com/WasmEdge/WasmEdge/commit/eaf4a59920aaf337e32ccf1cf7ff1f721cd13d44 eaf4a599 [CI] Workflow should re-build the docker images when the dockerfiles are updated on the master branch hydai , 2021-05-15 - https://github.com/WasmEdge/WasmEdge/commit/d49ddfc963edce0e40f0ca478e86637f29f11766 d49ddfc9 [CI] Rebuild the docker image every 7 days hydai , 2021-05-18 - https://github.com/WasmEdge/WasmEdge/commit/1ea51e0201571b744e2c74a4e5e445645c20c484 1ea51e02 [CI] Enable Concurrency in the workflows hydai , 2021-05-24 - https://github.com/WasmEdge/WasmEdge/commit/04255c980749e9a3d0b0721c99da773a11befdc3 04255c98 [CI] Make docker image build when PR is merged into master branch hydai , 2021-06-02 - https://github.com/WasmEdge/WasmEdge/commit/c25c01f357f8a383f2cbcc2a56619954d5126b82 c25c01f3 [CI] workflow: make the concurrency group fallback to github.ref if the event is not PR hydai , 2022-08-01 - https://github.com/WasmEdge/WasmEdge/commit/e3e51254e7766425887f6e101926b060c4b84b65 e3e51254 [CI] Bump docker/setup-buildx-action from 1 to 2 (#1967) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2022-10-14 - https://github.com/WasmEdge/WasmEdge/commit/71e653f6aa3a223ac73605549c67ac17600ed2ba 71e653f6 [CI] Bump docker/build-push-action from 2 to 3 (#1968) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2022-10-14 - https://github.com/WasmEdge/WasmEdge/commit/95a475a09286c3dcefbec495d332d81d78a92b2c 95a475a0 [CI] Bump docker/login-action from 1 to 2 (#1969) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2022-10-14 - https://github.com/WasmEdge/WasmEdge/commit/ec203b1e134eebe772907e83498a3deaee37fd1d ec203b1e [CI] Bump actions/checkout from 2 to 3 (#1978) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2022-10-18 - https://github.com/WasmEdge/WasmEdge/commit/4bf59cb019f4c61326ea2c29b8e441a3726af5cb 4bf59cb0 [CI] Update docker ci workflow hydai , 2022-11-01 - https://github.com/WasmEdge/WasmEdge/commit/59dad1f7ec08a9f6382bc088ff4f17227e421899 59dad1f7 [CI] chore(deps): Bump docker/build-push-action from 3 to 4 (#2261) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2023-03-03 - https://github.com/WasmEdge/WasmEdge/commit/835b3ff864a426c4136f1fbb0e9679b84e8ec757 835b3ff8 [CI] Fix typo in docker.yml. dm4 , 2023-04-25 - https://github.com/WasmEdge/WasmEdge/commit/c2c21a32fc8b6ab131cdb2b4238f259a92c34277 c2c21a32 [CI] Use GITHUB_OUTPUT instead of set-output hydai , 2023-05-17 - https://github.com/WasmEdge/WasmEdge/commit/106cfa109bf46f8af90a07ec65534be415cbeac3 106cfa10 [CI] pre-build image with necessary dependency for extension (#2731) Lîm Tsú-thuàn , 2023-08-10 - https://github.com/WasmEdge/WasmEdge/commit/b848288a0566f0780890ad2edc6f783c219c86e1 b848288a [CI] Bump docker/login-action from 2 to 3 (#2822) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2023-09-19 - https://github.com/WasmEdge/WasmEdge/commit/4ecee1185932b832ba8b88e550d4b343fff67ae7 4ecee118 [CI] Bump docker/build-push-action from 4 to 5 (#2823) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2023-09-19 - https://github.com/WasmEdge/WasmEdge/commit/e68f9452cdaa37676e0f5fe8a96e4a554440d6fe e68f9452 [CI] Bump docker/setup-buildx-action from 2 to 3 (#2821) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2023-09-19 - https://github.com/WasmEdge/WasmEdge/commit/f5cf26c66e4bbb9bca00497fce5c814aac7d56fa f5cf26c6 [Docker] manylinux_2_28 (#3188) Yi Huang , 2024-02-16 - 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/d7b1b775afa27038ee5535b79d17d52e06a784b8 d7b1b775 [CI] Bump action/checkout from v3 to v4 hydai , 2024-01-31 - https://github.com/WasmEdge/WasmEdge/commit/f25dd459c2af136a0b663cdb1efe0162a81f1dd8 f25dd459 [CI] Refactor with matrix Yi Huang , 2024-05-10 - 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/3b02a3bf2be98514c0e6efca5001053f60722a81 3b02a3bf [CI] Build manylinux aarch64 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/d02572d2fc57e86651735cc45ad07fb89cdbda93 d02572d2 Bump docker/build-push-action from 5 to 6 dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2024-06-20 - https://github.com/WasmEdge/WasmEdge/commit/85fc2ea9639d7d3f60c3ca1024ed005f4d6f2eb1 85fc2ea9 [CI] Bump docker/bake-action from 4 to 5 (#3487) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2024-06-21 - https://github.com/WasmEdge/WasmEdge/commit/eea99730304d6a3f49e2f00c3bba497c4bf04011 eea99730 [CI] Build docker images on change Yi Huang , 2024-07-02 - https://github.com/WasmEdge/WasmEdge/commit/1e4aa4f95f9a99c6ce2cd1ced636cd27d0356b03 1e4aa4f9 [CI] Fix paths-filter for push event Yi Huang , 2024-07-04 - https://github.com/WasmEdge/WasmEdge/commit/4616a88f8c916478412896926f261c02f2275038 4616a88f [CI] Disable paths-filter except for pull_request Yi Huang , 2024-07-04 - 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/2313fe94671601500e502c8fb58987800b1a02c6 2313fe94 [Docker] Refactor manylinux_2_28 with docker bake Yi Huang , 2024-07-09 - https://github.com/WasmEdge/WasmEdge/commit/9d141a48be190df83d6d01b0f476b15edc492670 9d141a48 [CI] Misc: update paths dependencies Yi Huang , 2024-07-31 - https://github.com/WasmEdge/WasmEdge/commit/d2a7a939540851d71751549dfbbc82efff258cde d2a7a939 [CI] Fix dependency for docker.yml (#3618) Yi , 2024-08-02 - 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/8b074c9067c654db2a19884cfc162edb285a1b25 8b074c90 [CI] Docker: Set labels for images Yi Huang , 2024-08-21 - https://github.com/WasmEdge/WasmEdge/commit/cd83e349ea41c75a5e6441e850b98257d18e47ae cd83e349 [CI] Build aarch64 docker image for ubuntu 20.04 Yi Huang , 2024-08-29 - https://github.com/WasmEdge/WasmEdge/commit/b88404eb4782ceacd57794fe8e867a359cac70cd b88404eb [CI] Docker: remove `on.push.tags` (#3751) Yi , 2024-09-10 - https://github.com/WasmEdge/WasmEdge/commit/242624da4a1b5a2fb89048c33c9f0daf0fb247c2 242624da [CI] Docker: refactor with strategy matrix Yi Huang , 2024-09-10 - https://github.com/WasmEdge/WasmEdge/commit/1469797863949fdacc574be3fa1ee89de8e69bd7 14697978 [CI] Docker: remove condition that cause non-cancellable jobs Yi Huang , 2024-09-10 - 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/27df5b138592153f6c7317c54aa73a882f252f2b 27df5b13 [CI] Misc: Update paths, job names, and disable fail-fast for matrix Yi Huang , 2024-09-23 - https://github.com/WasmEdge/WasmEdge/commit/805a85601d805506957fd84762c5cacfdb507c6b 805a8560 [CI] Bump docker/bake-action from 5 to 6 (#3971) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-01-17 - https://github.com/WasmEdge/WasmEdge/commit/41674fe4b11ecd44aac63319aaa30a59d6eb034a 41674fe4 [CI] Remove `actions/checkout` before `docker/bake-action` Yi Huang , 2025-01-20 - https://github.com/WasmEdge/WasmEdge/commit/3d8e8d12de47a8e6073542cc12589d7869ac6106 3d8e8d12 ci(runner): use github hosted arm runner instead of ours hydai , 2025-06-08 - https://github.com/WasmEdge/WasmEdge/commit/e0de68d8cb9dfc183b653a72426b31afea1a70ae e0de68d8 ci(StepSecurity): apply pinned dependencies (#4187) StepSecurity Bot , 2025-06-16 - https://github.com/WasmEdge/WasmEdge/commit/577b29e18cc519d73d880b5bbead9f7a278e25ad 577b29e1 ci(StepSecurity): add step-security/harden-runner (#4190) StepSecurity Bot , 2025-06-17 - https://github.com/WasmEdge/WasmEdge/commit/894d3c321c30cf3dd0d8433d77beda351798374e 894d3c32 ci(dependabot): bump docker/setup-buildx-action from 3.10.0 to 3.11.1 in the docker group (#4203) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-07-01 - https://github.com/WasmEdge/WasmEdge/commit/b96bba585efb3f73114e79bd9927b85cc40552de b96bba58 ci(dependabot): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#4218) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-07-01 - https://github.com/WasmEdge/WasmEdge/commit/9d9a8a61d54371b1c58f4d03171f3a17eaf9b5c0 9d9a8a61 ci: apply GITHUB TOKEN permission best practice hydai , 2025-07-01 - https://github.com/WasmEdge/WasmEdge/commit/900508d3f6319b95cda2d1bfeaf0c30d29f2739f 900508d3 ci(dependabot): bump step-security/harden-runner from 2.12.2 to 2.13.0 (#4278) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-07-22 - https://github.com/WasmEdge/WasmEdge/commit/fd664d6c8c213e7f30a6bafff9e244f2c9f06f4e fd664d6c ci(dependabot): bump docker/login-action from 3.4.0 to 3.5.0 in the docker group (#4311) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-08-12 - https://github.com/WasmEdge/WasmEdge/commit/3afe8704c33a28b276845b11854dd52b19068f88 3afe8704 ci(dependabot): bump docker/bake-action from 6.8.0 to 6.9.0 in the docker group (#4330) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-08-26 - https://github.com/WasmEdge/WasmEdge/commit/202b271a8ee0cb791e8e9958baf273d46b5e2632 202b271a ci(dependabot): bump step-security/harden-runner from 2.13.0 to 2.13.1 (#4372) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-09-16 - https://github.com/WasmEdge/WasmEdge/commit/7b88ad53d7459544bee5d1f1ecb3edf9fedd79d3 7b88ad53 ci(dependabot): bump docker/login-action from 3.5.0 to 3.6.0 in the docker group (#4388) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-09-30 - https://github.com/WasmEdge/WasmEdge/commit/cfe68fda7b8cb7972935f59df1997e6a543fb6d9 cfe68fda ci(dependabot): bump step-security/harden-runner from 2.13.1 to 2.13.2 (#4414) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-11-14 - https://github.com/WasmEdge/WasmEdge/commit/dfc852f6dbf73536c26bcff3510ecb58bdc74575 dfc852f6 ci(dependabot): bump docker/bake-action from 6.9.0 to 6.10.0 in the docker group (#4431) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-12-09 - https://github.com/WasmEdge/WasmEdge/commit/73a5c4555e9df9b5b47ef31d5c4f287d1e6f8b2b 73a5c455 ci(dependabot): bump step-security/harden-runner from 2.13.2 to 2.13.3 (#4434) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-12-09 - https://github.com/WasmEdge/WasmEdge/commit/6a8612f0f86dc469d30509eeb63f12f999626944 6a8612f0 ci(dependabot): bump step-security/harden-runner from 2.13.3 to 2.14.0 (#4448) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-12-16 - https://github.com/WasmEdge/WasmEdge/commit/a0200e9e962afe0df932331ab48c901dc621d3d0 a0200e9e ci(dependabot): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 in the docker group (#4457) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2025-12-22 - 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/83509e73a6811c3d8548149f2d9c65acfc580465 83509e73 ci(dependabot): bump step-security/harden-runner from 2.14.0 to 2.14.1 (#4553) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-01-26 - https://github.com/WasmEdge/WasmEdge/commit/b2e7c33f504cdc0404b316f429acd1d485762f00 b2e7c33f ci(dependabot): bump docker/login-action from 3.6.0 to 3.7.0 in the docker group (#4605) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-02-03 - https://github.com/WasmEdge/WasmEdge/commit/273ac6ea4d9a629e0c32aea1f5560d8622088126 273ac6ea ci(dependabot): bump step-security/harden-runner from 2.14.1 to 2.14.2 (#4630) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-02-09 - https://github.com/WasmEdge/WasmEdge/commit/519293c437ed863271301925065078203cab0754 519293c4 ci(dependabot): bump step-security/harden-runner from 2.14.2 to 2.15.0 (#4691) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-03-03 - https://github.com/WasmEdge/WasmEdge/commit/6f98076e25115caa27301dcc9863724cc09d79a5 6f98076e ci(dependabot): bump the docker group with 3 updates (#4697) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-03-10 - https://github.com/WasmEdge/WasmEdge/commit/c1f9ab5a5998059c30e21bc69890bdd7a6efb8b7 c1f9ab5a ci(dependabot): bump step-security/harden-runner from 2.15.0 to 2.15.1 (#4698) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-03-10 - https://github.com/WasmEdge/WasmEdge/commit/dc12a1dc11be2e426019b0d72920e37a032f6453 dc12a1dc ci(dependabot): bump step-security/harden-runner from 2.15.1 to 2.16.0 (#4720) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-03-17 - https://github.com/WasmEdge/WasmEdge/commit/dfc3e709627107bf1ee36d5396ba3dfe6fec30c0 dfc3e709 ci(dependabot): bump dorny/paths-filter from 3.0.2 to 4.0.1 (#4718) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-03-17 - https://github.com/WasmEdge/WasmEdge/commit/eb93db5d927b9b0aba7c58e967ec3f6dcaaac4b5 eb93db5d ci(dependabot): bump step-security/harden-runner from 2.16.0 to 2.16.1 (#4761) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-04-06 - https://github.com/WasmEdge/WasmEdge/commit/116fa88947d36ab30b341ff1b6d6c91b150149bc 116fa889 ci(dependabot): bump docker/login-action from 4.0.0 to 4.1.0 in the docker group across 1 directory (#4760) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-04-07 - https://github.com/WasmEdge/WasmEdge/commit/1f9e8035931a6ee2402163d39109b4dedd977ed5 1f9e8035 ci(dependabot): bump docker/bake-action from 7.0.0 to 7.1.0 in the docker group (#4780) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-04-14 - https://github.com/WasmEdge/WasmEdge/commit/cdde948d742221423733f29d8eb8ebc0af89eaa3 cdde948d ci(dependabot): bump step-security/harden-runner from 2.16.1 to 2.17.0 (#4782) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-04-14 - https://github.com/WasmEdge/WasmEdge/commit/16d93f65f2211d59f224c75877c93446e3009fbc 16d93f65 ci(dependabot): bump step-security/harden-runner from 2.17.0 to 2.19.0 (#4805) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-04-21 - https://github.com/WasmEdge/WasmEdge/commit/2945ed74a32071b1bb00958b9b97a077579417be 2945ed74 ci(dependabot): bump step-security/harden-runner from 2.19.0 to 2.19.1 (#4844) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-05-08 - https://github.com/WasmEdge/WasmEdge/commit/7251dfd0704a68825020a3324de1db74520b2bf8 7251dfd0 ci(dependabot): bump step-security/harden-runner from 2.19.1 to 2.19.3 (#4890) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-05-19 - https://github.com/WasmEdge/WasmEdge/commit/9d431499ab32e01ac19e61738eafa310f700d31e 9d431499 ci(dependabot): bump the docker group with 3 updates (#4898) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-05-26 - https://github.com/WasmEdge/WasmEdge/commit/874c575eea013312e8c6563104d68400a6fe3250 874c575e ci(dependabot): bump step-security/harden-runner from 2.19.3 to 2.19.4 (#4899) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-05-28 - https://github.com/WasmEdge/WasmEdge/commit/52f5248cbe494f311e9a156755a920f7d77a17c4 52f5248c ci(dependabot): bump the docker group with 3 updates (#5126) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-07-06 - https://github.com/WasmEdge/WasmEdge/commit/d2f961a13f3243d93c77ed86c3b40c6a8e51cab1 d2f961a1 ci(dependabot): bump dorny/paths-filter from 4.0.1 to 4.0.2 (#5129) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-07-07 - https://github.com/WasmEdge/WasmEdge/commit/e71fbe7e7962ca94a52d4a2d99a5fe69b2d85974 e71fbe7e ci(dependabot): bump step-security/harden-runner from 2.19.4 to 2.20.0 (#5157) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-07-14 - https://github.com/WasmEdge/WasmEdge/commit/7151f85a7346e0b30fd98d48c0c8891f90f9cd80 7151f85a ci(dependabot): bump docker/login-action from 4.4.0 to 4.5.1 in the docker group (#5217) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-07-27 - https://github.com/WasmEdge/WasmEdge/commit/76e6ba496e04747f408a2ec8470149ea0022cd3f 76e6ba49 ci(dependabot): bump docker/login-action from 4.5.1 to 4.6.0 in the docker group across 1 directory (#5247) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-08-03 - https://github.com/WasmEdge/WasmEdge/commit/24de93701ca870e18bab60098bc258f33176e43e 24de9370 ci(dependabot): bump dorny/paths-filter from 4.0.2 to 4.0.3 (#5272) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-08-11 - https://github.com/WasmEdge/WasmEdge/commit/edb79b06295f8a77241e157d9e530167fef10118 edb79b06 ci(dependabot): bump step-security/harden-runner from 2.20.0 to 2.20.1 (#5275) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-08-11 - https://github.com/WasmEdge/WasmEdge/commit/5254823d137c7615ea9c8c17929a036261c1ecf1 5254823d ci(dependabot): bump step-security/harden-runner from 2.20.1 to 2.21.0 (#5290) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-08-18 - https://github.com/WasmEdge/WasmEdge/commit/0772cafac9053f42a42964fc2d2a3eaf5f43107d 0772cafa ci(dependabot): bump docker/setup-buildx-action from 4.2.0 to 4.3.0 in the docker group (#5306) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-08-25 - https://github.com/WasmEdge/WasmEdge/commit/9c57129f7466fed1e6f198a9a52e6da79d2bdbd0 9c57129f ci(dependabot): bump step-security/harden-runner from 2.21.0 to 2.21.1 (#5334) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-09-07 - https://github.com/WasmEdge/WasmEdge/commit/ea03c5d1e1300c11aa55c09432e5c4afe554c225 ea03c5d1 ci(dependabot): bump the docker group with 3 updates (#5366) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-09-22 - https://github.com/WasmEdge/WasmEdge/commit/0aa43832be79dc29aeb5f75e1331320380ee12d8 0aa43832 ci(dependabot): bump step-security/harden-runner from 2.21.1 to 2.22.1 (#5432) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-10-14 - https://github.com/WasmEdge/WasmEdge/commit/6bd4b790124fda2ed4b6296a79d96d250f0352ae 6bd4b790 ci(dependabot): bump docker/bake-action from 7.4.0 to 7.5.0 in the docker group across 1 directory (#5455) dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>, 2026-10-20 Signed-off-by: Yi Huang --- .github/workflows/docker.yml | 301 +++++++++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..c267ce5 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,301 @@ +name: docker + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - master + paths: + - '.github/workflows/docker.yml' + - 'Dockerfile.*' + - 'docker-bake.*.hcl' + - 'SHA256SUM.*' + - 'build-manylinux.sh' + - 'scripts/ffmpeg/**' + - 'scripts/opencvmini/**' + - 'scripts/wasi-crypto/**' + - 'scripts/wasi-nn/**' + pull_request: + paths: + - '.github/workflows/docker.yml' + - 'Dockerfile.*' + - 'docker-bake.*.hcl' + - 'SHA256SUM.*' + - 'build-manylinux.sh' + - 'scripts/ffmpeg/**' + - 'scripts/opencvmini/**' + - 'scripts/wasi-crypto/**' + - 'scripts/wasi-nn/**' + schedule: + - cron: "0 0 */7 * *" + +permissions: + contents: read + +jobs: + prep: + name: Prepare docker env + runs-on: ubuntu-latest + outputs: + version: ${{ steps.prep.outputs.version }} + docker_image: ${{ steps.prep.outputs.docker_image }} + created: ${{ steps.prep.outputs.created }} + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 + with: + egress-policy: audit + + - name: Prepare docker env + id: prep + run: | + DOCKER_IMAGE=wasmedge/wasmedge + VERSION=noop + if [ "${{ github.event_name }}" = "schedule" ]; then + VERSION=nightly + elif [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/} + elif [[ $GITHUB_REF == refs/heads/* ]]; then + VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') + if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then + VERSION=edge + fi + elif [[ $GITHUB_REF == refs/pull/* ]]; then + VERSION=pr-${{ github.event.number }} + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "docker_image=$DOCKER_IMAGE" >> $GITHUB_OUTPUT + echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + + paths-filter: + name: Run paths-filter + runs-on: ubuntu-latest + + permissions: + pull-requests: read + + outputs: # Set outputs to true if not pull_request + ci-image-base: ${{ github.event_name == 'pull_request' && steps.filter.outputs.ci-image-base || 'true' }} + alpine-base: ${{ github.event_name == 'pull_request' && steps.filter.outputs.alpine-base || 'true' }} + manylinux: ${{ github.event_name == 'pull_request' && steps.filter.outputs.manylinux || 'true' }} + ubuntu: ${{ github.event_name == 'pull_request' && steps.filter.outputs.ubuntu || 'true' }} + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 + with: + egress-policy: audit + + - if: ${{ github.event_name == 'pull_request' }} + id: filter + uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + with: + filters: | + ci-image-base: + - '.github/workflows/docker.yml' + - 'docker-bake.ci-image-base.hcl' + - 'Dockerfile.ci-image-base' + alpine-base: + - '.github/workflows/docker.yml' + - 'docker-bake.alpine-base.hcl' + - 'Dockerfile.alpine-base' + manylinux: + - '.github/workflows/docker.yml' + - 'docker-bake.manylinux.hcl' + - 'Dockerfile.manylinux**' + - 'scripts/ffmpeg/**' + - 'scripts/opencvmini/**' + - 'scripts/wasi-crypto/**' + - 'scripts/wasi-nn/**' + ubuntu: + - '.github/workflows/docker.yml' + - 'docker-bake.ubuntu.hcl' + - 'Dockerfile.ubuntu-**' + - 'scripts/ffmpeg/**' + - 'scripts/opencvmini/**' + - 'scripts/wasi-crypto/**' + - 'scripts/wasi-nn/**' + + bake-base-images: + needs: + - prep + - paths-filter + + name: CI image base + runs-on: ubuntu-latest + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 + with: + egress-policy: audit + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + # DO NOT skip the whole job to prevent descending jobs to be skipped + - if: ${{ needs.paths-filter.outputs.ci-image-base == 'true' }} + name: Bake and Push + uses: docker/bake-action@59cb1203cd42bcefd40a1b6d73b589e48c86040e # v7.5.0 + with: + files: docker-bake.ci-image-base.hcl + push: ${{ github.event_name != 'pull_request' }} + + build-alpine-base-images: + needs: + - prep + - paths-filter + # Only run if files changed or if it's a scheduled/merge build + if: ${{ needs.paths-filter.outputs.alpine-base == 'true' }} + + name: Alpine Base (3.23) + runs-on: ubuntu-latest + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 + with: + egress-policy: audit + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Bake and Push + uses: docker/bake-action@59cb1203cd42bcefd40a1b6d73b589e48c86040e # v7.5.0 + with: + # Point to your new HCL file here + files: docker-bake.alpine-base.hcl + push: ${{ github.event_name != 'pull_request' }} + set: | + *.labels.org.opencontainers.image.title=${{ github.event.repository.name }} + *.labels.org.opencontainers.image.description=${{ github.event.repository.description }} + *.labels.org.opencontainers.image.url=${{ github.event.repository.html_url }} + *.labels.org.opencontainers.image.source=${{ github.event.repository.clone_url }} + *.labels.org.opencontainers.image.revision=${{ github.sha }} + *.labels.org.opencontainers.image.version=${{ needs.prep.outputs.version }} + *.labels.org.opencontainers.image.created=${{ needs.prep.outputs.created }} + + build-ubuntu-images: + needs: + - prep + - paths-filter + - bake-base-images + if: ${{ needs.paths-filter.outputs.ubuntu == 'true' }} + + strategy: + fail-fast: false + matrix: + targets: + - default + - base-2004-clang-aarch64 + + name: Ubuntu + runs-on: ubuntu-latest + container: + image: wasmedge/wasmedge:ci-image-base + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 + with: + egress-policy: audit + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Bake and Push + uses: docker/bake-action@59cb1203cd42bcefd40a1b6d73b589e48c86040e # v7.5.0 + with: + files: docker-bake.ubuntu.hcl + targets: ${{ matrix.targets }} + push: ${{ github.event_name != 'pull_request' }} + set: | + *.labels.org.opencontainers.image.title=${{ github.event.repository.name }} + *.labels.org.opencontainers.image.description=${{ github.event.repository.description }} + *.labels.org.opencontainers.image.url=${{ github.event.repository.html_url }} + *.labels.org.opencontainers.image.source=${{ github.event.repository.clone_url }} + *.labels.org.opencontainers.image.revision=${{ github.sha }} + *.labels.org.opencontainers.image.version=${{ needs.prep.outputs.version }} + *.labels.org.opencontainers.image.created=${{ needs.prep.outputs.created }} + + build-manylinux-images: + needs: + - prep + - paths-filter + - bake-base-images + if: ${{ needs.paths-filter.outputs.manylinux == 'true' }} + + strategy: + fail-fast: false + matrix: + include: + - name: manylinux_2_28 x86_64 + docker_tag: manylinux_2_28_x86_64 + targets: x86_64,x86_64-plugins + host_runner: ubuntu-latest + host_container: wasmedge/wasmedge:ci-image-base + - name: manylinux_2_28 aarch64 + docker_tag: manylinux_2_28_aarch64 + targets: aarch64,aarch64-plugins + host_runner: ubuntu-24.04-arm + host_container: wasmedge/wasmedge:ci-image-base_aarch64 + + name: ${{ matrix.name }} + runs-on: ${{ matrix.host_runner }} + container: + image: ${{ matrix.host_container }} + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 + with: + egress-policy: audit + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + + - name: Bake and Push + uses: docker/bake-action@59cb1203cd42bcefd40a1b6d73b589e48c86040e # v7.5.0 + with: + files: docker-bake.manylinux.hcl + targets: ${{ matrix.targets }} + push: ${{ github.event_name != 'pull_request' }} + set: | + *.labels.org.opencontainers.image.title=${{ github.event.repository.name }} + *.labels.org.opencontainers.image.description=${{ github.event.repository.description }} + *.labels.org.opencontainers.image.url=${{ github.event.repository.html_url }} + *.labels.org.opencontainers.image.source=${{ github.event.repository.clone_url }} + *.labels.org.opencontainers.image.revision=${{ github.sha }} + *.labels.org.opencontainers.image.version=${{ needs.prep.outputs.version }} + *.labels.org.opencontainers.image.created=${{ needs.prep.outputs.created }} From 58efab59c4a1a2c05978be5f05d3e3f2f719db71 Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Wed, 11 Nov 2026 16:50:41 +0800 Subject: [PATCH 3/6] ci(docker): adapt imported workflows to this repository Use `main` for the push trigger and remove the obsolete split Ubuntu and manylinux workflows, leaving `docker.yml` as the consolidated image workflow. Signed-off-by: Yi Huang --- .github/workflows/docker-manylinux.yml | 46 -------------------------- .github/workflows/docker-ubuntu.yml | 46 -------------------------- .github/workflows/docker.yml | 2 +- 3 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 .github/workflows/docker-manylinux.yml delete mode 100644 .github/workflows/docker-ubuntu.yml diff --git a/.github/workflows/docker-manylinux.yml b/.github/workflows/docker-manylinux.yml deleted file mode 100644 index 759ebde..0000000 --- a/.github/workflows/docker-manylinux.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: manylinux - -on: - pull_request: - branches: [main] - paths: - - 'docker-bake.manylinux.hcl' - - 'Dockerfile.manylinux*' - - 'scripts/**' - -permissions: {} - -jobs: - bake: - strategy: - fail-fast: false - matrix: - include: - - arch: x86_64 - targets: x86_64,x86_64-plugins - host_runner: ubuntu-latest - - arch: aarch64 - targets: aarch64,aarch64-plugins - host_runner: ubuntu-24.04-arm - - name: manylinux_2_28 (${{ matrix.arch }}) - runs-on: ${{ matrix.host_runner }} - - steps: - - if: ${{ github.event_name != 'pull_request' }} - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Bake and Push - uses: docker/bake-action@v6 - with: - push: ${{ github.event_name != 'pull_request' }} - files: docker-bake.manylinux.hcl - targets: ${{ matrix.targets }} diff --git a/.github/workflows/docker-ubuntu.yml b/.github/workflows/docker-ubuntu.yml deleted file mode 100644 index f77898b..0000000 --- a/.github/workflows/docker-ubuntu.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: ubuntu - -on: - pull_request: - branches: [main] - paths: - - 'docker-bake.ubuntu.hcl' - - 'Dockerfile.ubuntu*' - - 'scripts/**' - -permissions: {} - -jobs: - bake: - strategy: - fail-fast: false - matrix: - include: - - arch: x86_64 - targets: focal,jammy,noble,cuda - host_runner: ubuntu-latest - - arch: aarch64 - targets: aarch64 - host_runner: ubuntu-24.04-arm - - name: Ubuntu (${{ matrix.arch }}) - runs-on: ${{ matrix.host_runner }} - - steps: - - if: ${{ github.event_name != 'pull_request' }} - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Bake and Push - uses: docker/bake-action@v6 - with: - push: ${{ github.event_name != 'pull_request' }} - files: docker-bake.ubuntu.hcl - targets: ${{ matrix.targets }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c267ce5..39bec6b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,7 +7,7 @@ concurrency: on: push: branches: - - master + - main paths: - '.github/workflows/docker.yml' - 'Dockerfile.*' From f0b3879f6f69a878a0be0968cbf141a6e2c8c1eb Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Wed, 11 Nov 2026 16:50:42 +0800 Subject: [PATCH 4/6] chore(devcontainer): configure repository development environment Configure the repository devcontainer to use `wasmedge/wasmedge:ci-image-base`. Signed-off-by: Yi Huang --- .devcontainer/devcontainer.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..384a5c7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "WasmEdge devcontainer development", + "image": "wasmedge/wasmedge:ci-image-base" +} From 019f30f186a9fcae52326f0fca3e3bfb25999d0f Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Wed, 11 Nov 2026 16:50:42 +0800 Subject: [PATCH 5/6] docs: document repository layout Signed-off-by: Yi Huang --- .gitignore | 1 + README.md | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..74d5412 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +docs/superpowers/ diff --git a/README.md b/README.md index 67c31a4..4db1b3f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,22 @@ -# devecontainer for WasmEdge +# Devcontainer for WasmEdge -This repository contains dockerfiles and workflows for all devcontainers used by WasmEdge. +> [!WARNING] +> **Work in Progress** -**NOTE**: Work In Progress +This repository owns the Dockerfiles, dependency scripts, Bake definitions, +and image-building workflow for reusable WasmEdge development environments. +The consolidated `.github/workflows/docker.yml` builds CI base, Ubuntu, +manylinux, and Alpine LLD dependency images. Static-build and legacy definitions +are retained, but CI does not build them or OpenWrt images. + +## Layout + +| Path | Contents | +| --- | --- | +| `.devcontainer/` | Development environment for `WasmEdge/devcontainer`. | +| `Dockerfile.*` | WasmEdge development, CI, plugin, static, legacy, and release image definitions. | +| `docker-bake.*.hcl` | Docker Buildx Bake definitions for CI-built image families and retained Alpine/Debian static builds. | +| `SHA256SUM.*` | Checksums used by the manylinux image definitions. | +| `build-manylinux.sh` | Legacy manylinux image build helper. | +| `scripts/` | Dockerfile-consumed dependency installers, build helpers, test data helpers, and patches, grouped by dependency family. | +| `.github/workflows/` | Consolidated image build/publication workflow (`docker.yml`) and repository lint workflow (`super-linter.yml`). | From 5af1cfb59ed010bcaf720dfd883ff92374c89d46 Mon Sep 17 00:00:00 2001 From: Yi Huang Date: Fri, 13 Nov 2026 17:56:14 +0800 Subject: [PATCH 6/6] fix(ci): resolve ShellCheck findings in workflow scripts - SC2046: Quote command substitutions and preserve command argument boundaries. - SC2086: Quote the Docker branch expansion. - SC2129: Group GitHub output writes. Signed-off-by: Yi Huang --- .github/workflows/docker.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 39bec6b..407fb47 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -59,16 +59,18 @@ jobs: elif [[ $GITHUB_REF == refs/tags/* ]]; then VERSION=${GITHUB_REF#refs/tags/} elif [[ $GITHUB_REF == refs/heads/* ]]; then - VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') + VERSION=$(printf '%s\n' "${GITHUB_REF#refs/heads/}" | sed -r 's#/+#-#g') if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then VERSION=edge fi elif [[ $GITHUB_REF == refs/pull/* ]]; then VERSION=pr-${{ github.event.number }} fi - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "docker_image=$DOCKER_IMAGE" >> $GITHUB_OUTPUT - echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + { + echo "version=$VERSION" + echo "docker_image=$DOCKER_IMAGE" + echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" + } >> "$GITHUB_OUTPUT" paths-filter: name: Run paths-filter