This section will utilize the App-Pack-Gen API for building your application to generate Docker image(s) and CWL files. This process takes the code from a public Github repository (in this case, your fork of the tutorial application) and packages it into an OGC Application Package (more info at the OGC web site: OGC Standard)—a standardized container for an executable algorithm—that can be executed at scale in the Unity SPS (Science Processing Service). The OGC Application Package will be put into DockerHub and Dockstore, the Application Catalog used by Unity.
Two main things happen when app-pack-gen is run.
- An executable container is built around your code that can run across multiple platforms and has standardized interfaces.
- CWL files are being generated to describe your application and how it should be executed, including automatically generated data-input and data-output management steps.
- More details can be found in the Packaging an Algorithm Tutorial.
CWL (Common Workflow Language) is a syntax to instruct a series of execution steps to occur. Typically there is a series of steps described by workflow.cwl
. For our purposes, this file sets up the interface to the Application Package (i.e., input parameters).
- Navigate to the folder containing your cloned repository as shown in the figure below
- Open the
execute_app_pack_gen.ipynb
notebook in the unity-example-application folder by double-clicking it in the file-browser panel as shown in the figure below
- In the notebook, update the
clone_url
variable to your clone Github repository URL as shown in the figure below. If you did not make changes, or prefer to use the original demo application, you can leave theclone_url
alone.
- NOTE: The URL would be the forked Github repository from the previous section: Clone the Example Application Code.
- If you want to use the original application URL, it is in that notebook by default: https://github.com/unity-sds/unity-example-application
- Step through the Python notebook
- You “step through” by executing each cell, starting at the top. You can press the “▶” button at the top of the editor window, or press shift-enter. As a cell executes you will notice the [number] on the left turn into an asterisk [*], indicating that the cell is being executed.
- Enter your Unity username and password when prompted as shown in the figure below
- NOTE: A
response.status_code
of 200 and theresponse.content
reiterating theclone_url
will be shown if the submissions was successful as shown in the figure below. This does not necessarily mean that the Application Package Generation will be successful, only that your request was successfully submitted to the service.- If you do not see this, please contact a Unity MDPS team member for help.
At this point you have successfully submitted your code to be packaged into an OGC Application Package by the App-Pack-Gen system.