Skip to content

Commit bafadd6

Browse files
committed
Spladder
1 parent 6e7085f commit bafadd6

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

spladder/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Set the base image to Ubuntu
2+
FROM ubuntu:14.04
3+
4+
# File Author / Maintainer
5+
MAINTAINER John Vivian <[email protected]>
6+
7+
# Update the repository sources list
8+
RUN apt-get update && apt-get install --yes \
9+
build-essential \
10+
git \
11+
python-pip \
12+
python-dev \
13+
zlib1g-dev \
14+
python-scipy \
15+
libhdf5-serial-dev
16+
17+
RUN pip install --upgrade pip
18+
RUN pip install cython pysam h5py
19+
20+
# Download Spladder
21+
RUN mkdir /data
22+
RUN git clone https://github.com/ratschlab/spladder /opt/spladder
23+
24+
# CGL Boilerplate
25+
COPY wrapper.sh /opt/spladder/
26+
WORKDIR /data
27+
28+
ENTRYPOINT ["sh", "/opt/spladder/wrapper.sh"]

spladder/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Definitions
2+
runtime_fullpath = $(realpath runtime)
3+
build_tool = runtime-container.DONE
4+
git_commit ?= $(shell git log --pretty=oneline -n 1 -- ../spladder | cut -f1 -d " ")
5+
name = quay.io/ucsc_cgl/spladder
6+
tag = 732349f6dd0df3fb90fa9d7e6ee1e04a32e2e773--${git_commit}
7+
8+
build:
9+
docker build -t ${name}:${tag} .
10+
docker tag -f ${name}:${tag} ${name}:latest
11+
touch ${build_tool}
12+
13+
push: build
14+
# Requires ~/.dockercfg
15+
docker push ${name}:${tag}
16+
docker push ${name}:latest
17+
18+
test: build
19+
20+
clean:
21+
-rm ${build_tool}

spladder/wrapper.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# Fix ownership of output files
5+
finish() {
6+
# Fix ownership of output files
7+
user_id=$(stat -c '%u:%g' /data)
8+
chown -R ${user_id} /data
9+
}
10+
trap finish EXIT
11+
12+
# Call tool with parameters
13+
python /opt/spladder/python/spladder.py "$@"

0 commit comments

Comments
 (0)