Properties for notebooks syntax

With the introduction of configurable notebooks, users have a lot of flexibility in defining their tools, especially around special networking needs. Below is an explanation of all of the parameters that can be defined for an interactive notebook.

Format of a notebook definition:

  title: "My Notebook" // (1)
  init: [ '/opt/mynb/', '--verbose' ] // (2)
  start: [ '/opt/mynb/', '--port', '8080' ] // (3)
  httpProxy: // (4)
    port: 8080
    internalPath: "/some/path/{{runId}}/{{pathToOpen}}"
    rewrite: false
supportedFileExtensions: [ ".ipynb" ] // (13)
networkingConfig: // (5)
autoBoundPorts: // (6)
- 8080
- 8081
verbatimBoundPorts: // (7)
- environmentVariableName: "MYNB_JMX_PORT" // (8) assignPortFromRange: // (9) from: 9000 to: 9999 allowedVerbatimPortsRange: // (10) from: 9000 to: 9999 executorHostnameMapping: // (11) targetIp: "" customHostnameMappings: // (12) - hostname: "" targetIp: ""

(1) title: Notebook title, this string will be shown in the "Notebooks" drop-down. Optional, if omitted, the notebook name will be used. If the title matches one of a hardcoded notebook, it will replace it in the drop-down.

(2) init command. An optional command to run during the run setup, before launching the notebook software. Will be executed as root. Represented as an array of strings, the first string is the command, and the rest are the command line arguments.

(3) start command. This command will be used as the run command. Represented as an array.

(4) httpProxy: Optional configuration for proxying the notebook web app. Optional. Defaults to proxying port 8088, path "/", with rewrite.
- port : internal (container) port to proxy (mandatory)
- internalPath: root path on which the notebook webapp is running. E.g.: if the notebook is available at http://<host>:<port>/cool-software/app/, the value for internalPath would be /coolsoftware/app/. The string can be a Handlebars template. 
- rewrite: whether to use URL rewriting in nginx.

(5) networkingConfig: Optional configuration for container ports. Defaults to exposing port 8088 as a sole auto-bound port.

(6) autoBoundPorts: List of container ports that need to be exposed. Docker will map these ports to random host ports. (optional)

(7) verbatimBoundPorts: List of ports that need to be mapped "verbatim" — i.e. the port on the container must match the port on the host. It's not possible to know the exact port numbers before starting the run. When starting the run, Domino will find a free port on the host (e.g.: 30123), and map container port 30123 to host port 30123. Allowed range for verbatim ports could be defined either for all ports (10), or for each port individually (9). Then the port number will be assigned to the environment variable inside the run, the name of the variable is set in environmentVariableName (8)

(11) executorHostnameMapping Optional additional mapping for the executor's hostname, will result in an line in /etc/hosts file inside the run which will map the hostname of the executor to the targetIp.

(12) customHostnameMappings Optional additional mappings that will result in /etc/hosts lines.'

(13) supportedFileExtensions: List of file extensions that this notebook can open. Currently works only in Jupyter, which can open .ipynb files.

Was this article helpful?
0 out of 0 found this helpful