Skip to content

Instructions

rsdmse edited this page Jul 4, 2020 · 6 revisions

Instructions for Contribution

Prerequisites

Access

  1. rivanna-docker write access on GitHub
  2. uvarc organization on Docker Hub
  3. VM for building Docker images

Utilities

The following has been set up on the VM. If you are using your own machine, please install:

  1. docker
  2. docker-pushrm - add-on to push README.md
    https://github.com/christian-korneck/docker-pushrm
  3. git

Steps

  1. Clone this repository
  2. Build and test
    1. Prepare a Dockerfile (see Tips)
      • Please provide the following labels:

        LABEL maintainer=<id>@virginia.edu
        LABEL homepage=https://...
        LABEL description=...
        LABEL moduleclass=...
        LABEL gpu=true  # Optional (default: false)

        The last four are needed for automated EasyBuild installation via container2module in apps-tools.

    2. Build with explicit tag (do not use latest): docker build -t uvarc/<app>:<tag> .
      Use the app version (and suffix if needed) as the tag
    3. Test locally: docker run --rm -it uvarc/<app>:<tag>
    4. Convert to Singularity to test on Rivanna:
      singularity build <app>-test.sif docker-daemon://uvarc/<app>:<tag>`
      scp <app>-test.sif <id>@rivanna.hpc.virginia.edu:
      
  3. Write README.md for the app
  4. Deploy
    1. Login to Docker Hub: docker login
    2. Push image to Docker Hub: docker push uvarc/<app>:<tag>
    3. Push README.md to Docker Hub (in subdirectory): docker pushrm uvarc/<app>
    4. Push to GitHub: git add . && git commit -m "your message" && git push
    5. Remember to logout: docker logout
  5. Run on Rivanna
    1. module load singularity
    2. singularity pull docker://uvarc/<app>:<tag>
    3. To run the default command specified in ENTRYPOINT:
      ./<app>_<tag>.sif
      Otherwise:
      singularity exec <app>_<tag>.sif <command> or
      singularity shell <app>_<tag>.sif
Clone this wiki locally