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

Commit

Permalink
Dockerfile refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Oct 28, 2015
1 parent d1e7906 commit 53eab55
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 72 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
- docker
script:
- make
- make test
sudo: required
101 changes: 86 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,86 @@
FROM centos:centos6

# See cellprofiler.org/linux.shtml

COPY cellprofiler.repo /etc/yum.repos.d/
RUN yum install -y cellprofiler-2.1.1

RUN useradd cellprofiler
USER cellprofiler
ENV HOME /home/cellprofiler
WORKDIR /home/cellprofiler

ENTRYPOINT ["cellprofiler", "-r", "-c"]
CMD ["-h"]
# Use -p filename for execution
# Ü ÜÜÜÜÜÜÜÜÜÜÜ
# Ü ÜÜÜÜÜÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÜ ° ÜÛ² Ü ÜÜÜÛÛÛßßßßßßÛÛÛÛÜ °
# ßßßßßßÛÛÛ² Ü ßÛÛÛ² ± ÛÛÛ² ÛÛÛ² ° ÛÛÛ² ±
# ÛÛÛ² ° ÛÛÛ² ß ÛÛÛ² ÛÛÛ² ß ÛÛÛ² ²
# ÜÜÜÜÜÜÜÛÛÛ²ÜÜÜÜÜÜÛÛÛ² ÜÜÛÛÛÛÛÛÛÛÛÜÜßßÛ²ÜÛÛÛÛÛÛÛÛÛ² ß
# ÛÛÛßßßßßÛÛÛ²ßßßßßßÛÛÛ²ßßßßßÛÛÛ²ßßßßßßßܲ Ü ÛÛÛ² Ü
# ßÜ ÛÛÛ² Ü ÛÛÛ² Ü ÛÛÛ² Ü ÛÛÛ² ² ÛÛÛ² ²
# ÛÛÛ² ² ÛÛÛ² ² ÛÛÛ² ² ÛÛÛ² ± ÛÛÛ² ±
# ÛÛÛ² ± ÛÛÛ² ± ÛÛÛ² ± ÛÛÛ² ° ÛÛÛ² °
# ÛÛÛ² ° ÛÛÛ² ° ÛÛÛ² ° ÛÛÛ² Ü ÛÛÛ² Ü
# ÜÛÛÛÛÜÜß ÜÛÛÛÛÜÜÜß ÛÛ² ÜÜÛÛÛÛÛÛß ÜÛÛÛÛÛÛßß
# Üßßßßßßßß Üßßßßßßß ßÛ ß ß [BROAD‘15]
# Ü ÜÜÜ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ ÜÜÜ Ü
#
# ... Broad Institute of MIT and Harvard ‘15
#
# Proudly Present ...
#
# ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
# ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
# ³ ³
# ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
# ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
# Released at [þþ:þþ] on [þþ/þþ/þþ]
# ÉÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Ä ÄÄ Ä Ä ú Ä Ä ÄÄ Ä ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÍÍÍ»
# ³ º
# ³ [Supplier : 0x00B1........] [Operating System : all.....] ³
# ³ [Packager : 0x00B1........] [Video : none....] ³
# ³ [Cracker : none..........] [Audio : none....] ³
# ³ [Protection : none..........] [Number of Disks : 1.......] ³
# ú [Type : Dockerfile....] [Rating : ........] ú
#
#
# ú Well, this is a little Dockerfile that have many functions ú
# for quantifying phenotypes...enjoy.... ú
#
# ú ú
# ³ ³
# ³ ³
# ³ ³
# ³ ³
# º º
# ÈÍÍÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Ä ÄÄ Ä Ä ú Ä Ä ÄÄ Ä ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÍÍͼ
#
# Greets: ...
#
#
# - [ BROAD‘15 ] -
# -0x00B1 [05/06/84]
FROM ubuntu:14.04
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
cython \
git \
openjdk-7-jdk \
python-h5py \
python-imaging \
python-libtiff \
python-lxml \
python-matplotlib \
python-mysqldb \
python-numpy \
python-pandas \
python-pip \
python-scipy \
python-skimage \
python-sklearn \
python-vigra \
python-wxgtk2.8 \
python-zmq \
xvfb
WORKDIR /usr/local/src
RUN git clone https://github.com/CellProfiler/CellProfiler.git
WORKDIR /usr/local/src/CellProfiler
RUN pip install \
--requirement \
requirements.txt
RUN pip install \
--editable \
git+https://github.com/CellH5/cellh5.git#egg=cellh5 \
--upgrade
RUN python external_dependencies.py
RUN python CellProfiler.py --build-and-exit
ENTRYPOINT ["python", "CellProfiler.py", "--run", "--run-headless"]
CMD ["--help"]
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
SVN = http://cellprofiler.org/svnmirror/ExampleImages/ExampleHumanImages

.PHONY: input
input:
mkdir -p $@

output:
mkdir -m 777 -p $@

ExampleHuman.cppipe:
curl -O ${SVN}/ExampleHuman.cppipe

input/ExampleHuman.cppipe: ExampleHuman.cppipe
mv $< $@

AS_09125_050116030001_D03f00d0.tif:
curl -O ${SVN}/$@

input/AS_09125_050116030001_D03f00d0.tif: AS_09125_050116030001_D03f00d0.tif
mv $< $@

AS_09125_050116030001_D03f00d1.tif: AS_09125_050116030001_D03f00d1.tif
curl -O ${SVN}/$@

input/AS_09125_050116030001_D03f00d1.tif: AS_09125_050116030001_D03f00d1.tif
mv $< $@

AS_09125_050116030001_D03f00d2.tif:
curl -O ${SVN}/$@

input/AS_09125_050116030001_D03f00d2.tif: AS_09125_050116030001_D03f00d2.tif
mv $< $@

input/filelist.txt: input/AS_09125_050116030001_D03f00d0.tif input/AS_09125_050116030001_D03f00d1.tif input/AS_09125_050116030001_D03f00d2.tif
echo 'file:///input/AS_09125_050116030001_D03f00d0.tif' >> $@
echo 'file:///input/AS_09125_050116030001_D03f00d1.tif' >> $@
echo 'file:///input/AS_09125_050116030001_D03f00d2.tif' >> $@

.PHONY: test
test: input output input/filelist.txt input/ExampleHuman.cppipe
docker run --volume=`pwd`/input:/input --volume=`pwd`/output:/output cellprofiler --image-directory=/input --output-directory=/output --pipeline=/input/ExampleHuman.cppipe --file-list=/input/filelist.txt
5 changes: 5 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# docker

$ make

$ make test
18 changes: 0 additions & 18 deletions README.md

This file was deleted.

12 changes: 0 additions & 12 deletions cellprofiler-avoid-blank-libdir-for-libjvm.diff

This file was deleted.

11 changes: 0 additions & 11 deletions cellprofiler-frozen.diff

This file was deleted.

5 changes: 0 additions & 5 deletions cellprofiler.repo

This file was deleted.

11 changes: 0 additions & 11 deletions threshold.diff

This file was deleted.

0 comments on commit 53eab55

Please sign in to comment.