Skip to content
This repository was archived by the owner on Mar 29, 2022. It is now read-only.

Commit 025d40f

Browse files
authored
Merge pull request #15 from SD2E/devel
adding some best practices to the create_app tutorial
2 parents 142977b + b19d5a9 commit 025d40f

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

docs/create_app.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ following sub-pages will go through the process:
3232
2. [Containerize your executable](create_app_02.md)
3333
3. [Build wrapper and test scripts](create_app_03.md)
3434
4. [Add your app to the SD2E tenant](create_app_04.md)
35-
5. [Next steps](create_app_05.md)
35+
5. [Best practices and next steps](create_app_05.md)
3636

3737

3838
---

docs/create_app_04.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ A successful run will return, among other files, the expected `SP1_fastqc.html`
224224
and `SP1_fastqc.zip` files.
225225

226226
---
227-
Proceed to [Next steps](create_app_05.md)
227+
Proceed to [Best practices and next steps](create_app_05.md)
228228

229229
Go back to [Create Custom Applications](create_app.md)
230230

docs/create_app_05.md

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
---
22
layout: page
33
title: Create Custom Applications
4-
tagline: Next steps
4+
tagline: Best practices and next steps
55
---
66

77
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+
931

1032
<br>
1133
#### Contribute your app to the SD2E github repo

0 commit comments

Comments
 (0)