Skip to content

Commit

Permalink
Update to latest (1.0dev100) release of snap (resolves BD2KGenomics#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft committed Aug 31, 2017
1 parent 4190009 commit 3c71ee3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
22 changes: 12 additions & 10 deletions snap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM ubuntu:14.04
FROM ubuntu

RUN apt-get update && \
apt-get install -y python libnss3 wget
RUN apt-get update && apt-get install -y git build-essential zlib1g-dev

# Download SNAP binary
RUN mkdir /opt/SNAP
WORKDIR /opt/SNAP
RUN wget http://snap.cs.berkeley.edu/downloads/snap-beta.18-linux.tar.gz
RUN tar xzvf snap-beta.18-linux.tar.gz
RUN chmod +x snap-aligner
# clone snap
WORKDIR /opt/
RUN git clone https://github.com/amplab/snap.git
WORKDIR /opt/snap
RUN git checkout 48e7ae5d38145c094af1fe42a4b3abf1e72e1bb7

ENTRYPOINT ["/opt/SNAP/snap-aligner"]
# build snap
WORKDIR /opt/snap/
RUN make

ENTRYPOINT ["/opt/snap/snap-aligner"]
5 changes: 3 additions & 2 deletions snap/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
build_tool = runtime-container.DONE
git_commit ?= $(shell git log --pretty=oneline -n 1 -- ../snap| cut -f1 -d " ")
git_commit ?= $(shell git log --pretty=oneline -n 1 -- ../snap ../cmake | cut -f1 -d " ")
name = quay.io/ucsc_cgl/snap
tag = 1.0beta.18--${git_commit}
tag = 1.0dev.100--${git_commit}

build: ${build_tool}

${build_tool}: Dockerfile
cd ../cmake && $(MAKE) build
docker build -t ${name}:${tag} .
docker tag -f ${name}:${tag} ${name}:latest
touch ${build_tool}
Expand Down
2 changes: 1 addition & 1 deletion snap/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestSNAP(unittest.TestCase):

def test_docker_call(self):
out, err = check_docker_output('quay.io/ucsc_cgl/snap:latest')
self.assertTrue('Welcome to SNAP version 1.0beta.18.' in out)
self.assertTrue('Welcome to SNAP version 1.0dev.100.' in out)

def check_docker_output(cmd):
command = 'docker run ' + cmd
Expand Down

0 comments on commit 3c71ee3

Please sign in to comment.