git clone https://github.com/WasmEdge/WasmEdge.git cd WasmEdge
For the developers who don't want to use docker, they can setup the environment on Ubuntu Manually.
| import * as React from 'react'; | |
| import ReactDOMServer from 'react-dom/server'; | |
| import * as std from 'std'; | |
| import * as http from 'wasi_http'; | |
| import * as net from 'wasi_net'; | |
| import App from '../src/App.js'; | |
| async function handle_client(cs) { | |
| print('open:', cs.peer()); | |
| let buffer = new http.Buffer(); | |
| while (true) { |
| const {babel} = require('@rollup/plugin-babel'); | |
| const nodeResolve = require('@rollup/plugin-node-resolve'); | |
| const commonjs = require('@rollup/plugin-commonjs'); | |
| const replace = require('@rollup/plugin-replace'); | |
| const globals = require('rollup-plugin-node-globals'); | |
| const builtins = require('rollup-plugin-node-builtins'); | |
| const plugin_async = require('rollup-plugin-async'); | |
| const css = require("rollup-plugin-import-css"); | |
| const svg = require('rollup-plugin-svg'); |
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: wasmedge
handler: wasmedge
---
apiVersion: batch/v1
kind: Job
metadata:
| Gender | Age | Salary | Purchase Iphone | |
|---|---|---|---|---|
| Male | 19 | 19000 | 0 | |
| Male | 35 | 20000 | 0 | |
| Female | 26 | 43000 | 0 | |
| Female | 27 | 57000 | 0 | |
| Male | 19 | 76000 | 0 | |
| Male | 27 | 58000 | 0 | |
| Female | 27 | 84000 | 0 | |
| Female | 32 | 150000 | 1 | |
| Male | 25 | 33000 | 0 |
| # --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1: This flag specifies the Docker image to use as the base image for the cluster nodes. In this case, the image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 is being used. This image contains the necessary components for running WebAssembly workloads using containerd and k3d. | |
| # --agents 2: This flag specifies the number of worker nodes or agents to create in the cluster. In this case, it creates two agents to distribute the workload across multiple nodes. | |
| ``` | |
| k3d cluster create wasm-cluster1 \ | |
| --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 \ | |
| -p "8081:80@loadbalancer" --agents 2 | |
| ``` |
KCD Bengaluru Docker + WASM workloads running side by side
You’ll complete the following steps: