|
1 | 1 | ---
|
2 | 2 | layout: page
|
3 | 3 | title: Create Custom Applications
|
4 |
| -tagline: Next steps |
| 4 | +tagline: Best practices and next steps |
5 | 5 | ---
|
6 | 6 |
|
7 | 7 | Congratulations! You built and deployed your own Agave app on the SD2E tenant.
|
8 |
| -Consider sharing your work with others in the following ways: |
| 8 | +Consider the following best practices when building app bundles, and share your |
| 9 | +work with others in the following ways: |
| 10 | + |
| 11 | + |
| 12 | +<br> |
| 13 | +#### Best practices for developing containerized app bundles |
| 14 | + |
| 15 | +The app development approach demonstrated here is meant to be *flexible*, in that |
| 16 | +it can adapt to many different scientific applications and data sets, and |
| 17 | +*scalable*, in that it can run efficiently on TACC peta-scale systems. Some |
| 18 | +tips for the app developer in building new apps: |
| 19 | + |
| 20 | +1. Write a clean Dockerfile so there is no question of source code / version provenance. Minimize image size where possible by removing, e.g. source code tarballs and installation directories. |
| 21 | +2. Design a robust, but small and portable test case to package with the app bundle. Make liberal use of error checking in `tester.sh` and `runner_template.sh`. |
| 22 | +3. Use only command line arguments when calling the containerized executable (with the `container_exec` function). If the executable requires a configuration file, use a wrapper script inside the container to parse inputs from the command line and generate the appropriate configuration file. |
| 23 | +4. Explicitly declare all inputs, and explicitly write all outputs. This includes file name and full path. |
| 24 | +5. Package and curate outputs into a user-friendly format. Some use cases may benefit from a tarball of all output files; some use cases may benefit from individual files. |
| 25 | +6. Make output file names deterministic and predictable to facilitate scripting and job chaining. |
| 26 | +7. Document all expected outputs in the `tester.sh` and `runner-template.sh` wrapper scripts. Where appropriate, validate output and provide helpful error messaging. |
| 27 | +8. Share your Docker images and app bundles with the SD2E community to benefit others and elicit feedback. |
| 28 | + |
| 29 | +*Best practices were adapted from the [Computational Genomics Lab](https://toil.readthedocs.io/en/3.12.0/developingWorkflows/developing.html#best-practices-for-dockerizing-toil-workflows).* |
| 30 | + |
9 | 31 |
|
10 | 32 | <br>
|
11 | 33 | #### Contribute your app to the SD2E github repo
|
|
0 commit comments