-
Notifications
You must be signed in to change notification settings - Fork 0
/
cellprofiler.sh
executable file
·83 lines (67 loc) · 2.42 KB
/
cellprofiler.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
# Installs CellProfiler and CellProfiler-Analyst on Centos 7 host
# cellprofiler.org
# https://github.com/CellProfiler/CellProfiler/wiki/Source-installation-%28Linux%29
# Notes:
# Utilises the Python vitualenv to segregate dependancies from the host and other installed software on the system.
# Provides a mechanism to allow multiple versions of CellProfiler and CellProfiler-Analyst to co-exist on the same host.
# wxPython was installed via the hosts package manager as it can not be added via pip, the
# "virtualenv --system-site-packages" was added to allow this module to be made available.
# Run:
# $ source /usr/local/CellProfiler/CellProfiler-2.2.0/bin/activate
# $ cd /usr/local/CellProfiler/CellProfiler-2.2.0/CellProfiler-Analyst
# $ python CellProfiler-Analyst.py
# $ deactivate
name='CellProfiler'
ver='2.2.0'
name_ver="${name}-${ver}"
wd="/usr/local/${name}"
prefix="${wd}/${name_ver}"
set -e
[ -d "${wd}" ] || sudo mkdir -p "${wd}"
[ -w "${wd}" ] || sudo chown -R vagrant "${wd}"
# wxPython does not contain a setup.py file so you are not able to install it with pip
# "virtualenv --system-site-packages" switch added to allow use of wxPython module
sudo yum -y install \
gcc-c++ \
java-1.8.0-openjdk \
python \
python-pip \
unzip \
wxPython
sudo yum -y install \
czmq-devel \
java-1.8.0-openjdk-devel \
mariadb-devel \
python-devel
sudo pip install -U pip
sudo pip install \
virtualenv
cd "${wd}"
[ -d ${name_ver} ] || virtualenv --system-site-packages ${name_ver}
cd "${prefix}"
source bin/activate
# CellProfiler
pip install \
Cython \
matplotlib \
NumPy \
SciPy
[ -d CellProfiler ] || git clone https://github.com/CellProfiler/CellProfiler.git
cd CellProfiler
[[ $(git symbolic-ref --short -q HEAD) == *2.2.0 ]] || git checkout -b 2.2.0 2.2.0
pip install --editable . --process-dependency-links
# CellProfiler-Analyst
cd "${prefix}"
[ -d CellProfiler-Analyst ] || git clone https://github.com/CellProfiler/CellProfiler-Analyst.git
cd CellProfiler-Analyst
[[ $(git symbolic-ref --short -q HEAD) == *2.2.0 ]] || git checkout -b 2.2.0 2.2.0
# NB: May need to add database clients for this deployment?
pip install -r requirements.txt
deactivate
if [ ! -d "${wd}/examples/cpa_example" ]; then
cd /tmp
[ -f cpa_2.0_example.zip ] || curl -L -O http://d1zymp9ayga15t.cloudfront.net/content/Examplezips/cpa_2.0_example.zip
unzip cpa_2.0_example.zip -d "${wd}/examples"
fi
exit 0