JSPM

@jbr-hook/docker

6.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q36012F
  • License MIT

Docker-based hook handler for JBR

Package Exports

  • @jbr-hook/docker
  • @jbr-hook/docker/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jbr-hook/docker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JBR Hook - CLI

Build status Coverage Status npm version

A jbr hook type for a Docker-based hook.

Requirements

  • Node.js (1.12 or higher)
  • An existing jbr experiment that requires a hook.

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.