xcengine provides tools to convert a Jupyter notebook into one of several parameterized, headlessly runnable forms:
- A Python script
- A Docker container image
- An OGC Earth Observation Application Package
xcengine uses the same convention as
papermill
for defining parameters in a notebook. All parameters should be set as
Python variables in the same notebook code cell, and that cell should be
designated as the parameter cell by giving it the tag parameters
. In
JupyterLab, you can do this using the property inspector (⚙⚙ icon in the
right sidebar). See the papermill
documentation
for more details.
During conversion, xcetool
will detect any variables that are set in the
parameters cell and make them available as command-line parameters for the
output script and container, and as workflow parameters for the application
package.
xcengine provides a command-line tool called xcetool
, which has several
subcommands for different functions. Use the --help
option with these
subcommands to get more details on usage.
Convert a Jupyter notebook to a non-interactive Python script.
Convert a Jupyter notebook to a Docker container image. This subcommand can additionally produce a Common Workflow Language (CWL) file defining an OGC Earth Observation Application Package which uses the container image.
Run a Docker container using an image converted from a Jupyter notebook.