Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Commit

Permalink
TAG and VERSION env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Nov 16, 2017
1 parent d395d77 commit ede29be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,18 @@ WORKDIR /usr/local/src

# Install CellProfiler
RUN git clone https://github.com/CellProfiler/CellProfiler.git

WORKDIR /usr/local/src/CellProfiler
ARG VERSION=tags/v3.0.0
RUN git checkout $VERSION

ARG version=3.0.0

RUN git checkout tags/v$version

RUN pip install --editable .

# Fix init and zombie process reaping problems using s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v1.11.0.1/s6-overlay-amd64.tar.gz /tmp/

RUN gunzip -c /tmp/s6-overlay-amd64.tar.gz | tar -xf - -C /

ENTRYPOINT ["/init", "cellprofiler"]
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
VERSION = latest
# Inputs from https://github.com/CellProfiler/examples/tree/master/ExampleHuman
EXAMPLE_CDN = https://github.com/CellProfiler/examples/archive/master.zip

# Public gold output files
S3_GOLD = https://s3.amazonaws.com/cellprofiler-examples/example-human-gold-standard

VERSION := 3.0.0

TAG := latest

.DEFAULT_GOAL: build
build:
docker build -t cellprofiler:$(VERSION) .
docker build -t cellprofiler:$(TAG) --build-arg version=$(VERSION) .

.PHONY: input
input:
Expand All @@ -18,8 +22,9 @@ output:
# The files to compare against after a run of CellProfiler
# Note that while Image.csv is also output, it is not compared against,
# because it contains hashes that change per-run.
output/gold: output
output/gold: output
mkdir $@

AS_09125_050116030001_D03f00d0_Overlay.png: output/gold
curl -o $</$@ ${S3_GOLD}/$@

Expand Down Expand Up @@ -52,5 +57,6 @@ test: input output output/gold data input/filelist.txt AS_09125_050116030001_D03
--output-directory=/output \
--pipeline=/input/ExampleHuman.cppipe \
--file-list=/input/filelist.txt

# Compare gold files against output that was run.
diff -b output/AS_09125_050116030001_D03f00d0_Overlay.png output/gold/AS_09125_050116030001_D03f00d0_Overlay.png

0 comments on commit ede29be

Please sign in to comment.