Binary Manifest
Description of a binary manifest for bin-json-runner
If you'd like to run your own custom binaries in a task, the bin-json-runner
's got your back.
First, you'll need to create a manifest. This tells Computes where to find your binary archive for each platform. (IPFS-only at the moment). The following example is a simple binary that echos the input.
Example Binary Manifest
{
"darwin-amd64": {
"file": {
"/": "QmYYScH89Jwif7cpsE7SLb77oQF8Xue1o5HyDKBQeaYoYk"
},
"executable": "bin-echo",
"format": "zip"
},
"freebsd-amd64": {
"file": {
"/": "QmbjDW5omoHRJSwDw3rB7nBcHrLhWBSr1UNBFmQhtXRB55"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-amd64": {
"file": {
"/": "QmQqnijZGXY6bNHMk159327oQKJy4Ziw7ugUmwWw9w1tDJ"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-386": {
"file": {
"/": "QmYxEnsPCEVsgAMQL9Ny4aMHEGZ9rBhNyBHX5SkND27Ns3"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-arm64": {
"file": {
"/": "QmdenYMRQQrRA7yGucMLQtMYTFydF2ALmtFMB6TBfkBkhR"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-armv6": {
"file": {
"/": "QmYr3Uvn4v4Q5HuNtSoVYnzv9H9HrP98LVrmESMuKh5RkN"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-armv7": {
"file": {
"/": "QmRFGEu31iYmkwG73Df9htRkmaYG9syk4ChsLCZvvWixEE"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-ppc64le": {
"file": {
"/": "QmVwXJ21TXUeJpNqiXyji1yruwgYpbHVK7m2rYt1incvYN"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"linux-s390x": {
"file": {
"/": "QmdaUbeK8iqVq73PQbpSMKnqAFongf51CH3Vss8sEnhk7d"
},
"executable": "bin-echo",
"format": "tar.gz"
},
"windows-386": {
"file": {
"/": "QmZT9t2xpyHhDMAe479t5VbFX9bv9oFshdZ8dCnLdDbQCm"
},
"executable": "bin-echo.exe",
"format": "zip"
},
"windows-amd64": {
"file": {
"/": "Qmao7w4wmQYD7qHHR23HGNnPY5gWB7vcHMoZ1tqYAwPCSR"
},
"executable": "bin-echo.exe",
"format": "zip"
}
}
Add to IPFS
cat manifest.json | ipfs dag put > manifest.hash
> zdpuAxW3FpQGz4zmGHiopN8u6fPDChgqfevZV8RsC2TQbzFPE
Example Task
{
"input": {
"dataset": 2
},
"taskDefinition": {
"runner": {
"type": "bin-json-runner",
"manifest": {
"/": "zdpuAxW3FpQGz4zmGHiopN8u6fPDChgqfevZV8RsC2TQbzFPE"
}
},
"result": {
"action": "set",
"destination": {
"dataset": { "/": "zdpuB11j1GMhYUcBauitZD27W8Jb59dt6pd7rEaELFDtwzTgS" },
"path": "echo/results"
}
}
},
"status": {
"/": "zdpuAmf43QTZc8Ejy63ebJUHrKece6C9M26ssRzqXmeW3f57Y"
}
}
Updated about 6 years ago