Tools

Invoke scripts for Jupyter notebooks

Every tool has an invoke script in its middleware directory, and the one the pipeline creates launches a Rappture or Linux-GUI tool. A Jupyter tool needs it replaced. This page gives the script for each of the three deployment styles, and what the arguments mean.

The shape of it

invoke_app sets up the session, and the command it is given starts the notebook server. For a Jupyter tool that command is start_jupyter:

/usr/bin/invoke_app "$@" -t TOOLNAME \
                         -C "start_jupyter -T @tool APP.ipynb" \
                         -r none \
                         -w headless \
                         -u anaconda-X
  • TOOLNAME is the tool's short name, the one you registered.
  • APP.ipynb is the notebook that runs the tool.
  • anaconda-X is the Anaconda installation your hub deploys. Ask which version, rather than copying a number out of documentation.
  • @tool stands for the installed tool's own directory, which is where -T starts looking for the notebook.

That script gives Notebook style: every code cell visible.

Arguments

invoke_app, in the flags a notebook tool uses:

Flag Meaning
-t Tool name
-C Command to run
-r Rappture version. Notebook tools pass none
-w Window manager. Notebook tools pass headless
-u Environment package to load. Repeat for more than one

start_jupyter:

Flag Meaning
-h, --help Show the help
-d Verbose output, for debugging
-t Tool style: no notebook controls
-c Copy the notebook files instead of linking them
-A App style
-T dir Start looking for the notebook in dir
--themes Enable notebook themes

App style

Code cells hidden, with an Edit App button to reveal them:

/usr/bin/invoke_app "$@" -t TOOLNAME \
                         -C "start_jupyter -A -T @tool APP.ipynb" \
                         -u anaconda-X \
                         -w headless \
                         -r none

Tool style

Code cells hidden, with no way to reveal them:

/usr/bin/invoke_app "$@" -t TOOLNAME \
                         -C "start_jupyter -A -t -T @tool APP.ipynb" \
                         -u anaconda-X \
                         -w headless \
                         -r none

Common errors

could not find a rappture installation: RAPPTURE_PATH=,

invoke_app looked for Rappture because the script did not tell it not to. Add -r none to the invoke_app call — no quotation marks — and run it again.

Rappture itself is deprecated; a Jupyter notebook is the current path for a new tool on most hubs. -r none stays necessary all the same, because invoke_app still looks for Rappture unless told otherwise.

Testing the script

Run it by hand before you flag the code as ready:

cd ~/apps/toolname/middleware
./invoke

Testing a Jupyter tool goes through what the output should say and how to open the notebook it starts.

Notebooks that dispatch work to a cluster call submit from a cell rather than from the invoke script — see Jupyter integration with submit.

Reviewed against 2.4-main @ e097e0236d on 2026-09-10.