Creating Bacalhau Job Spec's
There are several public examples you can try out without needing to know anything about Docker or WASM specification jobs -> see the Bacalhau Docs. The full specification for Bacalhau jobs can be seen here.
You need to supply a Bacalhau job spec. To create a job spec, you can:
Run a Bacalhau job successfully, and then get the job spec back using bacalhau describe <job_id> --format=json
.
Generate a job spec without running anything, using bacalhau docker run --dry-run
.
Writing a job spec by hand, by using our schema as a guide.
What can I do with Bacalhau now? You can:
read from IPFS, Filecoin, or URLs
write into Estuary or IPFS
Bacalhau operates by executing jobs within containers. This means it is able to run any arbitrary Docker jobs or WASM images
Here's an example JSON job specification for a Stable Diffusion job which runs in a Docker container, requires no verification and publishes to Estuary.
Here's an example of using this JSON specification in a solidity smart contract:
Note that since we need to be able to add the user prompt input to the middle of the spec (in the Docker entrypoint), it's been split into 2 parts.
There is a full complement of example jobs you can leverage on the Bacalhau Docs Site
Try out
YOLO
OCR
Video Editing
and many, many more!