-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcellprofiler_stardist.def
76 lines (71 loc) · 2.27 KB
/
cellprofiler_stardist.def
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
Bootstrap:docker
# use linux-amd64 ubuntu jammy
From:mambaorg/micromamba@sha256:e678de11f8a47f2811f051a1329a7910bfbe056a49c63152a761d83dec3e5c4e
%post
# get build tools needed for cellprofiler dependencies lacking wheels and wxPython
apt update -y
apt install -y gcc git build-essential libxxf86vm-dev libnotify-dev libsdl2-dev libgtk-3-dev libwebkit2gtk-4.0-dev
# create environment yaml file, it will be in the root of container for reference
{
echo 'name: cellprofiler'
echo 'channels:'
echo ' - conda-forge'
echo 'dependencies:'
echo ' - python =3.8'
echo ' - openjdk =11'
echo ' - boto3 >=1.12.28'
echo ' - docutils =0.15.2'
echo ' - h5py >=3.6.0,<3.7.dev0,<4'
echo ' - imageio >=2.5'
echo ' - inflect >=2.1,<7'
echo ' - jinja2 >=2.11.2'
echo ' - joblib >=0.13'
echo ' - mahotas >=1.4'
echo ' - matplotlib-base >=3.1.3,<4'
echo ' - mysqlclient =1.4.6'
echo ' - numpy >=1.20.1'
echo ' - pillow >=7.1.0'
echo ' - pyzmq >=22.3,<23.dev0'
echo ' - sentry-sdk =0.18.0'
echo ' - requests >=2.22'
echo ' - scikit-image =0.18.3'
echo ' - scikit-learn >=0.20,<1'
echo ' - scipy =1.9.0'
echo ' - future >=0.18.2'
echo ' - psutil >=5.7.0'
echo ' - six'
echo ' - tifffile <2022.4.22'
echo ' - stardist'
echo ''
echo ' - pip:'
echo ' - https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.1-cp38-cp38-linux_x86_64.whl'
echo ' - cellprofiler==4.2.6'
} > environment.yaml
# use micromamba to install dependencies from conda-forge and cellprofiler from pip
micromamba create -f environment.yaml
# clean up unneeded conda files
micromamba clean --all --yes
# create a CellProfiler plugins dir
cd /opt
git clone https://github.com/CellProfiler/CellProfiler-plugins.git
%runscript
#!/bin/bash
if [ -f "~/CellProfilerLocal.cfg" ]
then
if cat CellProfilerLocal.cfg | grep -q PluginDirectoryCP4
then
echo "Plugin directory already set"
else
echo 'PluginDirectoryCP4=/opt/CellProfiler-plugins/active_plugins' >> ~/CellProfilerLocal.cfg
fi
else
{
echo 'PreferencesVersion=1'
echo 'Telemetry=0'
echo 'Telemetry\ prompt=0'
echo 'PluginDirectoryCP4=/opt/CellProfiler-plugins/active_plugins'
} > ~/CellProfilerLocal.cfg
fi
eval "$(micromamba shell hook --shell bash)"
micromamba activate cellprofiler
cellprofiler