Assuming Obelisk and just are installed. Launch Obelisk with Rust components downloaded from an OCI registry.
just serve-rs-ociCompute fibo(10) sequentially 100 times:
obelisk execution submit -f .../fibow.fiboa -- 10 100Compute fibo(10) in parallel 200 times:
obelisk execution submit -f .../fibow.fiboa-concurrent -- 10 200Launch Obelisk with native JS activity and workflow (no compilation required):
just serve-js-nativeThe activity/js-native/fibo.js and workflow/js-native/ files are loaded directly by Obelisk's built-in JS runtime.
If direnv and Nix are available:
cp .envrc-example .envrc
direnv allowOtherwise install the following versions of dependencies used for development as described in dev-deps.txt.
Build all components:
just buildThen run Obelisk with one of the provided TOML files. List all available targets:
just --list
just serve-???In order to run this activity, the fibo binary must be first built and FIBO_EXE_PATH must be set:
just build-fibo-binary
export FIBO_EXE_PATH="$(pwd)/target/x86_64-unknown-linux-musl/release_bin/fibo"sudo dnf update -y
sudo dnf install -y docker git
sudo systemctl start docker
sudo usermod -aG docker $USER
git clone https://github.com/obeli-sk/benchmark-fibo.git
cd benchmark-fibo
# If testing the `fiboa-rs-spawn` activity, the `fibo` native binary must be built.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo build -p fibo --profile=release_bin --target x86_64-unknown-linux-musl
export FIBO_DIR=/home/ec2-user/benchmark-fibo/target/x86_64-unknown-linux-musl/release_bin
export FIBO_EXE_PATH=$FIBO_DIR/fibo # only needed if running Obelisk directly without Docker
# Run Obelisk server
docker run --net=host --rm -it \
-u $(id -u):$(id -g) \
-v $(pwd):/config \
-e 'OBELISK__WASM__CACHE_DIRECTORY=/cache/obelisk/wasm' \
-v ~/.cache/obelisk/wasm:/cache/obelisk/wasm \
-v $FIBO_DIR:/fibodir \
-e 'FIBO_EXE_PATH=/fibodir/fibo' \
getobelisk/obelisk \
server run -c /config/obelisk-rs-oci.toml
# From within the container (docker exec..) run fibo(10) with a single iteration
obelisk execution submit -f .../fibow.fiboa -- 10 1