esmf-org / esmf-profiler

ESMF Profiler application converts binary traces into a web based, dynamic report.
0 stars 2 forks source link

Create Docker container and implement in GitHub Action #29

Closed rsdunlapiv closed 2 years ago

rsdunlapiv commented 2 years ago

We envision three different ways that people can run the esmf-profiler, from most work to least:

  1. Local installation
  2. Docker container
  3. "No Install" - Traces are processed automatically on a GitHub.io repo

For option 1, the user would install and run the esmf-profiler locally or on an HPC machine. The install_dependencies.sh script and install.sh scripts can be used to build the dependencies and install a Python virtual environment containing the esmf-profiler Python package. Then the user runs the profiler via the CLI, e.g.,

esmf-profiler -t /path/to/trace -n mytrace -o out --push git@github.com:esmf-org/app-profiles.git

For option 2, we would provide a Docker container that the user can pull from DockerHub that contains the profiler and all dependent software installed. The user would issues a docker run command with arguments to execute profiler.

For option 3, the same container create in option 2 would be installed as a GitHub Action on a GitHub.io site, such as app-profiles. To generate a profile the user would:

1. clone the repo
2. create a new empty branch and add a `trace.tar.gz` file containing the application trace
3. commit and push the branch
4. the GitHub action would extract the trace, run the Docker container containing the esmf-profiler, and push the static site to the local repo
5. the pushed branch would be deleted (to reduce repo size)

One question is where do we get the command line parameters above, such as "-n mytrace"? An appealing option here is to use the commit message as a way for the user to provide command line options to the profiler, e.g.:

   git commit -a -m "name=mytrace, another_option=this, third_option=that"

The commit message can be parsed by the GitHub action and the parameter extracted and passed into the esmf-profiler.

To facilitate individual users and organizations in creating their own GitHub.io site to host their own profiles, we should create a GitHub template repository with the Action already set up.

rsdunlapiv commented 2 years ago

@ryanlong1004 let's make sure that a plain "Docker run" works first (by running the container locally) before tying to the GitHub Action