A jbr hook type for a Docker-based hook.
If an experiment requires a hook, then you can install this Docker-based hook as follows.
$ jbr set-hook someHook docker
output/logs/docker-stdout.txt: Logs of stdout. output/logs/docker-stderr.txt: Logs of stderr.
output/logs/docker-stdout.txt
output/logs/docker-stderr.txt
When installing this hook, your configuration file (jbr-experiment.json) will contain the following:
jbr-experiment.json
... "someHook": { "@id": "urn:jrb:bb:hookSome", "@type": "HookDocker", "dockerfile": "input/dockerfiles/Dockerfile", "resourceConstraints": { "@type": "StaticDockerResourceConstraints", "cpu_percentage": 100, }, "additionalBinds": [], "additionalBindsPrepare": [], "innerPort": 3000, "outerPort": 3000, } ...
dockerfile
resourceConstraints
additionalBinds
generated/dataset.hdt.index.v1-1:/tmp/dataset.hdt.index.v1-1
additionalBindsPrepare
input/file.js
innerPort
outerPort
jbr.js is written by Ruben Taelman.
This code is copyrighted by Ghent University – imec and released under the MIT license.
Generated using TypeDoc
JBR Hook - CLI
A jbr hook type for a Docker-based hook.
Requirements
Configure an experiment hook
If an experiment requires a hook, then you can install this Docker-based hook as follows.
Output
output/logs/docker-stdout.txt
: Logs of stdout.output/logs/docker-stderr.txt
: Logs of stderr.Configuration
When installing this hook, your configuration file (
jbr-experiment.json
) will contain the following:Configuration fields
dockerfile
: Path to the dockerfile to build and run.resourceConstraints
: Resource constraints for the Docker container.additionalBinds
: The local file bindings to the client dockerfile, e.g.generated/dataset.hdt.index.v1-1:/tmp/dataset.hdt.index.v1-1
additionalBindsPrepare
: Path to be passed to the image while building, e.g.input/file.js
innerPort
The port within the container to expose.outerPort
The port on the local machine to bind to.License
jbr.js is written by Ruben Taelman.
This code is copyrighted by Ghent University – imec and released under the MIT license.