From 7f77acc0ede331ce9e2190a53cd6731939b3e232 Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Fri, 6 Nov 2026 14:09:48 +0800 Subject: [PATCH 1/4] feat: add development container --- .devcontainer/Dockerfile | 5 +++++ .devcontainer/devcontainer-lock.json | 9 +++++++++ .devcontainer/devcontainer.json | 10 ++++++++++ README.md | 14 ++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer-lock.json create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..e379ec1 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,5 @@ +FROM mcr.microsoft.com/devcontainers/cpp:2-debian-13 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends python3 ffmpeg \ + && rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json new file mode 100644 index 0000000..4c63723 --- /dev/null +++ b/.devcontainer/devcontainer-lock.json @@ -0,0 +1,9 @@ +{ + "features": { + "ghcr.io/devcontainers/features/rust:1": { + "version": "1.6.0", + "resolved": "ghcr.io/devcontainers/features/rust@sha256:846c949f52c9dea98d4f90a11957cbf152fb3f6e8a70ddd7cb83014a7d1d0c98", + "integrity": "sha256:846c949f52c9dea98d4f90a11957cbf152fb3f6e8a70ddd7cb83014a7d1d0c98" + } + } +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..cda16ce --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "clap.cpp", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/rust:1": {} + }, + "postCreateCommand": "git submodule update --init --recursive" +} diff --git a/README.md b/README.md index 55b5fa7..7caff48 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,20 @@ python3 -c 'import base64,json,sys; print(json.dumps({"input":[{"content":[{"typ -H 'Content-Type: application/json' --data-binary @- ``` +## Development container + +Open this repository in VS Code and run **Dev Containers: Reopen in Container**. +The container includes the C/C++ build tools, Rust toolchain, Python 3 and FFmpeg +needed for the default CPU build and tests. Git submodules are initialized when +the container is created. GPU SDKs and optional model-parity dependencies are not +installed. + +```sh +cmake -S . -B build -DCMAKE_BUILD_TYPE=Release +cmake --build build --parallel 4 +ctest --test-dir build --output-on-failure +``` + ## License This project is licensed under the [Apache License 2.0](LICENSE). From 47163296d3d7ba761e3b833ed349849990453ddf Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Fri, 6 Nov 2026 14:12:24 +0800 Subject: [PATCH 2/4] docs: revert README changes from devcontainer PR --- README.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/README.md b/README.md index 7caff48..55b5fa7 100644 --- a/README.md +++ b/README.md @@ -75,20 +75,6 @@ python3 -c 'import base64,json,sys; print(json.dumps({"input":[{"content":[{"typ -H 'Content-Type: application/json' --data-binary @- ``` -## Development container - -Open this repository in VS Code and run **Dev Containers: Reopen in Container**. -The container includes the C/C++ build tools, Rust toolchain, Python 3 and FFmpeg -needed for the default CPU build and tests. Git submodules are initialized when -the container is created. GPU SDKs and optional model-parity dependencies are not -installed. - -```sh -cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -cmake --build build --parallel 4 -ctest --test-dir build --output-on-failure -``` - ## License This project is licensed under the [Apache License 2.0](LICENSE). From 63646ea5c33b5b7a55cd8417957d0ef170ac6191 Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Fri, 6 Nov 2026 14:18:26 +0800 Subject: [PATCH 3/4] refactor: install development tools through container features --- .devcontainer/Dockerfile | 5 ----- .devcontainer/devcontainer-lock.json | 15 +++++++++++++++ .devcontainer/devcontainer.json | 11 +++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index e379ec1..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/cpp:2-debian-13 - -RUN apt-get update \ - && apt-get install -y --no-install-recommends python3 ffmpeg \ - && rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json index 4c63723..b0dfdb6 100644 --- a/.devcontainer/devcontainer-lock.json +++ b/.devcontainer/devcontainer-lock.json @@ -1,5 +1,20 @@ { "features": { + "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": { + "version": "1.0.17", + "resolved": "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get@sha256:735491c8e9b2236cae727d6d4904663f6a58eb131d8c4b6b18fd0eea3d8c5b71", + "integrity": "sha256:735491c8e9b2236cae727d6d4904663f6a58eb131d8c4b6b18fd0eea3d8c5b71" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "1.7.1", + "resolved": "ghcr.io/devcontainers/features/node@sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6", + "integrity": "sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6" + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "1.8.0", + "resolved": "ghcr.io/devcontainers/features/python@sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511", + "integrity": "sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511" + }, "ghcr.io/devcontainers/features/rust:1": { "version": "1.6.0", "resolved": "ghcr.io/devcontainers/features/rust@sha256:846c949f52c9dea98d4f90a11957cbf152fb3f6e8a70ddd7cb83014a7d1d0c98", diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cda16ce..b68a6da 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,13 @@ { "name": "clap.cpp", - "build": { - "dockerfile": "Dockerfile" - }, + "image": "mcr.microsoft.com/devcontainers/cpp:2-debian-13", "features": { - "ghcr.io/devcontainers/features/rust:1": {} + "ghcr.io/devcontainers/features/rust:1": {}, + "ghcr.io/devcontainers/features/python:1": {}, + "ghcr.io/devcontainers/features/node:1": { + "version": "22" + }, + "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {} }, "postCreateCommand": "git submodule update --init --recursive" } From 02eb439619671f58d5352009cecea048669b8299 Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Fri, 6 Nov 2026 14:23:37 +0800 Subject: [PATCH 4/4] refactor: install FFmpeg in development Dockerfile --- .devcontainer/Dockerfile | 5 +++++ .devcontainer/devcontainer-lock.json | 5 ----- .devcontainer/devcontainer.json | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..9aa222b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,5 @@ +FROM mcr.microsoft.com/devcontainers/cpp:2-debian-13 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ffmpeg \ + && rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json index b0dfdb6..860cafd 100644 --- a/.devcontainer/devcontainer-lock.json +++ b/.devcontainer/devcontainer-lock.json @@ -1,10 +1,5 @@ { "features": { - "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": { - "version": "1.0.17", - "resolved": "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get@sha256:735491c8e9b2236cae727d6d4904663f6a58eb131d8c4b6b18fd0eea3d8c5b71", - "integrity": "sha256:735491c8e9b2236cae727d6d4904663f6a58eb131d8c4b6b18fd0eea3d8c5b71" - }, "ghcr.io/devcontainers/features/node:1": { "version": "1.7.1", "resolved": "ghcr.io/devcontainers/features/node@sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6", diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b68a6da..f1c4a06 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,13 +1,14 @@ { "name": "clap.cpp", - "image": "mcr.microsoft.com/devcontainers/cpp:2-debian-13", + "build": { + "dockerfile": "Dockerfile" + }, "features": { "ghcr.io/devcontainers/features/rust:1": {}, "ghcr.io/devcontainers/features/python:1": {}, "ghcr.io/devcontainers/features/node:1": { "version": "22" - }, - "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {} + } }, "postCreateCommand": "git submodule update --init --recursive" }