Skip to content

Commit 0d699b0

Browse files
authored
Merge pull request #16 from knawd/nn-support
feature: add nn build for wasmedge
2 parents cc5895e + a41665c commit 0d699b0

File tree

4 files changed

+39
-8
lines changed

4 files changed

+39
-8
lines changed

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,32 @@ RUN make
8484
# RUN ./crun --version
8585
RUN mv crun crun-wasmtime
8686

87+
88+
FROM docker.io/rockylinux/rockylinux:8 as rhel8_plugins
89+
RUN dnf update -y
90+
RUN dnf install -y dnf-plugins-core
91+
RUN dnf config-manager --set-enabled plus
92+
RUN dnf config-manager --set-enabled devel
93+
RUN dnf config-manager --set-enabled powertools
94+
RUN dnf clean all
95+
RUN dnf update -y
96+
RUN dnf repolist --all
97+
RUN dnf -y install epel-release
98+
99+
RUN dnf install -y git python3 which redhat-lsb-core gcc-c++ gcc
100+
ENV WASMTIME_VERSION=v5.0.0
101+
RUN curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -p /usr/local --version=0.11.2
102+
RUN dnf install -y systemd-devel yajl-devel libseccomp-devel pkg-config libgcrypt-devel \
103+
glibc-static python3-libmount libtool libcap-devel
104+
WORKDIR /
105+
RUN git clone --depth 1 -b enable_plugin --recursive https://github.com/hydai/crun
106+
WORKDIR /crun
107+
108+
RUN ./autogen.sh
109+
RUN ./configure --with-wasmedge --enable-embedded-yajl
110+
RUN make
111+
RUN mv crun crun-wasmedge
112+
87113
FROM registry.access.redhat.com/ubi9/ubi as ubi9build
88114

89115
RUN yum install -y gcc openssl-devel && \
@@ -114,6 +140,10 @@ COPY --from=ubuntu20builder /usr/local/lib64/libwasmedge.so.0 /usr/local/lib/lib
114140
WORKDIR "/vendor/ubuntu_18_04"
115141
COPY --from=ubuntu18builder /usr/local/lib/libwasmedge.so.0 /usr/local/lib/libwasmtime.so /crun/crun-wasmedge /crun/crun-wasmtime ./
116142

143+
WORKDIR "/vendor/rhel8_plugins"
144+
COPY --from=rhel8_plugins /usr/local/lib/libwasmedge.so.0 /usr/local/lib/libwasmtime.so /crun/crun-wasmedge ./
145+
146+
117147
WORKDIR "/app"
118148
COPY --from=ubi9build /app-build/target/release/manager ./
119149

charts/knawd-deployer/Chart.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ sources:
1111

1212
type: application
1313

14-
version: v1.2.0
14+
version: v1.3.0
1515

16-
appVersion: "v1.2.0"
16+
appVersion: "v1.3.0"
1717

1818
icon: https://raw.githubusercontent.com/knawd/documentation/main/icons/cookie-6116766.svg
1919

@@ -25,13 +25,13 @@ maintainers:
2525
annotations:
2626
artifacthub.io/changes: |
2727
- kind: added
28-
description: Support for arm64
28+
description: Support for nn in wasmedge
2929
links:
3030
- name: GitHub PR
31-
url: https://github.com/knawd/deployer/pull/14
31+
url: https://github.com/knawd/deployer/pull/15
3232
artifacthub.io/images: |
3333
- name: knawd-deployer
34-
image: quay.io/knawd/deployer:v1.2.0
34+
image: quay.io/knawd/deployer:v1.3.0
3535
artifacthub.io/license: MIT
3636
artifacthub.io/signKey: |
3737
fingerprint: BED079E67FD431E45301B1C9949E671B46AC8A34

charts/knawd-deployer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ If you wish to use this chart to obtain a crun enabled cluster but without knati
3939

4040
These are the values particular to the deployer service.
4141

42-
**target**: The type of kubernetes cluster to be configured. Supported versions are `ubuntu_18_04`, `ubuntu_20_04`, `microk8s` `rhel8` (default: rhel8)
42+
**target**: The type of kubernetes cluster to be configured. Supported versions are `ubuntu_18_04`, `ubuntu_20_04`, `microk8s` `rhel8` `rhel8_plugins`(default: rhel8). If rhel8_plugins is selected then ociType **must** be `crun-wasmedge`
4343

4444
**tag**: The tag in the repository where the image is located used to specifiy a custom image (default: the latest release branch)
4545

@@ -49,7 +49,7 @@ These are the values particular to the deployer service.
4949

5050
**ociType**: The type of the OCI Runtime to deploy. Currently `crun-wasmedge`, `crun-wasmtime` and `crun-wasm-nodejs` are supported (default: "crun-wasmedge")
5151

52-
**patchKnative**: Runs the patch to enable setting the runtime in a knative service definition.
52+
**patchKnative**: Runs the patch to enable setting the runtime in a knative service definition.(default: true)
5353

5454
## Uninstall
5555

charts/knawd-deployer/values.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"rhel8",
1414
"ubuntu_20_04",
1515
"ubuntu_18_04",
16-
"microk8s"
16+
"microk8s",
17+
"rhel8_plugins"
1718
],
1819
"default": "rhel8"
1920
},

0 commit comments

Comments
 (0)