Skip to content

Commit

Permalink
Merge pull request #16 from knawd/nn-support
Browse files Browse the repository at this point in the history
feature: add nn build for wasmedge
  • Loading branch information
No9 authored Sep 16, 2023
2 parents cc5895e + a41665c commit 0d699b0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ RUN make
# RUN ./crun --version
RUN mv crun crun-wasmtime


FROM docker.io/rockylinux/rockylinux:8 as rhel8_plugins
RUN dnf update -y
RUN dnf install -y dnf-plugins-core
RUN dnf config-manager --set-enabled plus
RUN dnf config-manager --set-enabled devel
RUN dnf config-manager --set-enabled powertools
RUN dnf clean all
RUN dnf update -y
RUN dnf repolist --all
RUN dnf -y install epel-release

RUN dnf install -y git python3 which redhat-lsb-core gcc-c++ gcc
ENV WASMTIME_VERSION=v5.0.0
RUN curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -p /usr/local --version=0.11.2
RUN dnf install -y systemd-devel yajl-devel libseccomp-devel pkg-config libgcrypt-devel \
glibc-static python3-libmount libtool libcap-devel
WORKDIR /
RUN git clone --depth 1 -b enable_plugin --recursive https://github.com/hydai/crun
WORKDIR /crun

RUN ./autogen.sh
RUN ./configure --with-wasmedge --enable-embedded-yajl
RUN make
RUN mv crun crun-wasmedge

FROM registry.access.redhat.com/ubi9/ubi as ubi9build

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

WORKDIR "/vendor/rhel8_plugins"
COPY --from=rhel8_plugins /usr/local/lib/libwasmedge.so.0 /usr/local/lib/libwasmtime.so /crun/crun-wasmedge ./


WORKDIR "/app"
COPY --from=ubi9build /app-build/target/release/manager ./

Expand Down
10 changes: 5 additions & 5 deletions charts/knawd-deployer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ sources:

type: application

version: v1.2.0
version: v1.3.0

appVersion: "v1.2.0"
appVersion: "v1.3.0"

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

Expand All @@ -25,13 +25,13 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: added
description: Support for arm64
description: Support for nn in wasmedge
links:
- name: GitHub PR
url: https://github.com/knawd/deployer/pull/14
url: https://github.com/knawd/deployer/pull/15
artifacthub.io/images: |
- name: knawd-deployer
image: quay.io/knawd/deployer:v1.2.0
image: quay.io/knawd/deployer:v1.3.0
artifacthub.io/license: MIT
artifacthub.io/signKey: |
fingerprint: BED079E67FD431E45301B1C9949E671B46AC8A34
Expand Down
4 changes: 2 additions & 2 deletions charts/knawd-deployer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you wish to use this chart to obtain a crun enabled cluster but without knati

These are the values particular to the deployer service.

**target**: The type of kubernetes cluster to be configured. Supported versions are `ubuntu_18_04`, `ubuntu_20_04`, `microk8s` `rhel8` (default: rhel8)
**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`

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

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

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

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

## Uninstall

Expand Down
3 changes: 2 additions & 1 deletion charts/knawd-deployer/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"rhel8",
"ubuntu_20_04",
"ubuntu_18_04",
"microk8s"
"microk8s",
"rhel8_plugins"
],
"default": "rhel8"
},
Expand Down

0 comments on commit 0d699b0

Please sign in to comment.