Last active
December 29, 2016 09:44
-
-
Save omsai/a6394fc38c9224f681bd732c4836611f to your computer and use it in GitHub Desktop.
Singularity bootstrap for CellProfiler 2.2.0 using CentOS 7.3 minimal host to run on RHEL 6.7 nodes of the UConn Storrs HPC cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: rpm-spec -*- | |
# Singularity bootstrap for CellProfiler | |
# Host OS used is CentOS Linux release 7.3.1611 (Core) | |
BootStrap: yum | |
OSVersion: 7 | |
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/ | |
Include: yum | |
%runscript | |
echo "Running cellprofiler with arguments $*" | |
exec /usr/bin/cellprofiler "$@" | |
%post | |
echo "Installing OS dependencies for CellProfiler" | |
NUMPY_DEPS="lapack-devel gcc-c++" | |
SCIPY_DEPS="atlas-devel python-devel" | |
MATPLOTLIB_DEPS="libpng-devel freetype-devel" | |
JAVABRIDGE_DEPS="java-1.8.0-openjdk-devel" | |
CELLPROFILER_DEPS="wget tar python2-pip mysql-devel wxPython-devel" | |
yum -y install epel-release # For python2-pip | |
yum -y install $NUMPY_DEPS $SCIPY_DEPS $MATPLOTLIB_DEPS $JAVABRIDGE_DEPS $CELLPROFILER_DEPS | |
echo "Installing CellProfiler" | |
PN=CellProfiler; V=2.2.0; P=$PN-$V; TARBALL=$V.tar.gz # Gentoo's naming convention | |
cd /tmp # Download directory | |
wget -nc https://github.com/$PN/$PN/archive/$V.tar.gz | |
cd /opt # CellProfiler install prefix | |
test -d $P || tar -xvpf /tmp/$TARBALL | |
cd $P | |
# Cython is required by centrosome, but the dependency is not | |
# pulled in. Seems like a bug with either centrosome or | |
# CellProfiler. | |
pip install --upgrade pip | |
pip install numpy cython | |
pip install -vvv --editable . | |
echo "HPC cluster specific mount bind points" | |
# See http://singularity.lbl.gov/docs-mount | |
mkdir -p /work /scratch/scratch{2,3} | |
exit 0 | |
%test | |
/usr/bin/cellprofiler -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment