Skip to content

Commit

Permalink
Updates to use the ghcr built container
Browse files Browse the repository at this point in the history
  • Loading branch information
bherr2 committed May 18, 2023
1 parent 19c6bd0 commit aeaaa9d
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ All that's required for execution using our Docker-based setup is `Docker` with

## Building the Docker container

If you are not using a pre-built container run:
If you want to use a pre-built container run:

`docker pull ghcr.io/hubmapconsortium/hra-do-processor:main`

if you are not using a pre-built container run:

`docker build . -t hra-do-processor`

## Running the Docker container

To run the container, use the following command:
To run using a pre-built container, use the following command:

`docker run --mount type=bind,source=./digital-objects,target=/digital-objects --mount type=bind,source=./dist,target=/dist -t ghcr.io/hubmapconsortium/hra-do-processor:main help`

`docker run --mount type=bind,source=./digital-objects,target=/digital-objects --mount type=bind,source=./dist,target=/dist -t hra-do-processor:latest help`
If you are using a locally built container, replace `ghcr.io/hubmapconsortium/hra-do-processor:main` with `hra-do-processor:latest`.

Replace `./digital-objects` and `./dist` with paths to your own `digital-objects` and `dist` folders if not the same.

Expand All @@ -36,7 +42,13 @@ You will need to install a Python 3 and Docker (or other container system suppor

## Running the DO Processor with CWL

`cwl-runner hra-do-processor.cwl example-cwl-job.yaml`
For running with a pre-built container (no git checkout required), use this command:

`cwl-runner https://raw.githubusercontent.com/hubmapconsortium/hra-do-processor/main/do-processor.cwl example-cwl-job.yaml`

For running with a local container, use this command:

`cwl-runner do-processor.local.cwl example-cwl-job.yaml`

# Running Locally

Expand Down
44 changes: 44 additions & 0 deletions do-processor.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool

requirements:
DockerRequirement:
dockerPull: ghcr.io/hubmapconsortium/hra-do-processor:main
dockerOutputDirectory: /output
EnvVarRequirement:
envDef:
DO_HOME: /output/digital-objects
DEPLOY_HOME: /output/dist
InitialWorkDirRequirement:
listing:
- entryname: digital-objects
writable: true
entry: $(inputs.do_home)
- entryname: dist
writable: true
entry: $(inputs.deploy_home)

inputs:
do_home:
type: Directory
deploy_home:
type: Directory
arguments:
type: string[]
inputBinding:
position: 1

outputs:
do_home:
type: Directory
outputBinding:
glob: digital-objects
deploy_home:
type: Directory
outputBinding:
glob: dist
output:
type: stdout
stdout: output.txt
File renamed without changes.
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
version: '3.9'
services:
do-processor:
image: hra-do-processor:latest
# image: ghcr.io/hubmapconsortium/hra-do-processor:main # uncomment if using the pre-built container
# image: hra-do-processor # uncomment if using a locally built container
build: . # uncomment to build locally on the fly
volumes:
- type: bind
source: ./digital-objects
Expand Down

0 comments on commit aeaaa9d

Please sign in to comment.