Skip to content

Commit

Permalink
move stuff + readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzi committed Mar 17, 2023
1 parent 9bcf7ba commit be91bba
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 36 deletions.
31 changes: 0 additions & 31 deletions entrypoint.py

This file was deleted.

3 changes: 0 additions & 3 deletions entrypoint.sh

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile → tools/census-builder-workflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ENV COMMIT_SHA=${COMMIT_SHA}

RUN apt update && apt -y install python3.10-venv python3-pip awscli

ADD tools/cell_census_builder/ /tools/cell_census_builder
ADD tools/scripts/requirements.txt .
ADD cell_census_builder/ /tools/cell_census_builder
ADD scripts/requirements.txt .
ADD entrypoint.py .
ADD build-census.yaml .

Expand Down
45 changes: 45 additions & 0 deletions tools/census-builder-workflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Cell Census Builder Workflow

This subproject can be used to run a cell-census build using a Docker container and a custom workflow file.

## Instructions

### Build

To build the docker container, `cd` into the parent folder (`tools/`) and run:

```docker build --build-arg=COMMIT_SHA=$(git rev-parse --short HEAD) . -t census-builder```

This will build a Docker container named `census-builder`.

### Prepare

Before running the workflow, make sure that a `data` directory exists on the machine. This can contain any inputs for the builder (e.g. a manifest file and local `h5ad`s), and will also be used to output the built cell census. This folder will also need to contain a `build-census.yaml` file as defined in the next step.


### Create workflow file

In the `data` folder, create a `build-census.yaml` file that contain a workflow that will be executed by the builder. This should also contain all the parameters for the workflow.

Here is an example workflow that runs the builder using a manifest file:

```
census-builder:
uri:
/data/cell-census-small/
verbose:
true
commands:
build:
manifest:
/data/manifest-small.csv
test-disable-dirty-git-check:
true
```


### Run

Run the builder workflow with:

```docker run --mount type=bind,source="path/to/data",target=/data census-builder```
File renamed without changes.
3 changes: 3 additions & 0 deletions tools/census-builder-workflow/entrypoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/python3

print("Calling the builder...")

0 comments on commit be91bba

Please sign in to comment.