@jbr-hook/docker
v5.4.0
Published
Docker-based hook handler for JBR
Downloads
151
Readme
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.
$ jbr set-hook someHook docker
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:
...
"someHook": {
"@id": "urn:jrb:bb:hookSome",
"@type": "HookDocker",
"dockerfile": "input/dockerfiles/Dockerfile",
"resourceConstraints": {
"@type": "StaticDockerResourceConstraints",
"cpu_percentage": 100,
},
"additionalBinds": [],
"additionalBindsPrepare": [],
"innerPort": 3000,
"outerPort": 3000,
}
...
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.