Skip to content

Commit

Permalink
Adding quinine container (resolves #149)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft committed Jul 22, 2016
1 parent 5c374dd commit e8cf820
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 0 deletions.
34 changes: 34 additions & 0 deletions quinine/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Definitions
build_path = build
runtime_path = runtime
build_output = ${runtime_path}/adam
runtime_fullpath = $(realpath ${runtime_path})
build_tool = runtime-container.DONE
build_number ?= none
git_commit ?= $(shell git rev-parse HEAD)
name = quay.io/ucsc_cgl/quinine
tag = 3e5f19bf1399e1447a42a2359c01be54d75b183d--${git_commit}

# Steps
build: ${build_output} ${build_tool}

${build_output}: ${build_path}/Dockerfile
cd ${build_path} && docker build -t ${name}-build:${tag} .
echo ${runtime_fullpath}
docker run -v ${runtime_fullpath}:/data ${name}-build:${tag} cp -r /home/quinine /data/quinine

${build_tool}: ${build_output} ${runtime_path}/Dockerfile
cd ${runtime_path} && docker build -t ${name}:${tag} .
touch ${build_tool}

test: build
python test.py

clean:
rm -rf runtime/quinine ${build_tool}
docker rmi -f ${name}-build:${tag} ${name}:${tag}

push: build
# Requires ~/.dockercfg
docker push ${name}:${tag}
docker push ${name}:latest
29 changes: 29 additions & 0 deletions quinine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This directory contains the docker images for
[Quinine](https://github.com/bigdatagenomics/quinine), which is a genomics
quality control tool built on top of
[ADAM](https://github.com/bigdatagenomics/adam). These containers build
the Quinine codebase from HEAD, and then run the quinine-submit scripts that submit
the code/command to a running Spark cluster.

Running
===

When the runtime container is run, a port should be opened for the ADAM driver
to communicate with the [Spark master](../apache-spark-master/README.md). The
number of this port should be passed to Quinine as the Spark option
`--conf spark.driver.port <portnumber>`. If run without additional configuration
flags, Quinine will run in [Spark's local
mode](http://spark.apache.org/docs/latest/#running-the-examples-and-shell).

An example command is:

```
docker run \
--net=host \
-p 9999:9999 \
quay.io/ucsc_cgl/adam:latest \
--master spark://<spark_master_ip>:7077 \
--conf spark.driver.port=9999 -- \
flagstat hdfs://<hdfs_master_ip>:8020/mouse_chrM.bam
```

14 changes: 14 additions & 0 deletions quinine/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM quay.io/ucsc_cgl/spark-and-maven:1.5.2.3.3.9

MAINTAINER Frank Austin Nothaft, [email protected]

WORKDIR /home

# clone adam
RUN git clone https:/bigdatagenomics/quinine.git

# build adam
WORKDIR /home/quinine
RUN git checkout 3e5f19bf1399e1447a42a2359c01be54d75b183d

RUN /opt/apache-maven-3.3.9/bin/mvn package -DskipTests
1 change: 1 addition & 0 deletions quinine/runtime/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quinine
8 changes: 8 additions & 0 deletions quinine/runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM quay.io/ucsc_cgl/adam:962-ehf--be13567d00cd4c586edf8ae47d991815c8c72a49

MAINTAINER Frank Austin Nothaft, [email protected]

# copy jar
COPY quinine /opt/cgl-docker-lib/quinine

ENTRYPOINT ["/opt/cgl-docker-lib/quinine/bin/quinine-submit"]

0 comments on commit e8cf820

Please sign in to comment.