-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSingularity
More file actions
162 lines (134 loc) · 4.4 KB
/
Singularity
File metadata and controls
162 lines (134 loc) · 4.4 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Bootstrap: docker
From: ubuntu:18.04
%setup
mkdir -p ${SINGULARITY_ROOTFS}/src/malis
mkdir -p ${SINGULARITY_ROOTFS}/src/mala
mkdir -p ${SINGULARITY_ROOTFS}/src/numcodecs
mkdir -p ${SINGULARITY_ROOTFS}/src/zarr
mkdir -p ${SINGULARITY_ROOTFS}/src/gunpowder
mkdir -p ${SINGULARITY_ROOTFS}/src/daisy
mkdir -p ${SINGULARITY_ROOTFS}/src/synister
mkdir -p ${SINGULARITY_ROOTFS}/src/funlib/learn/torch
%files
synister /src/synister/synister
setup.py /src/synister/setup.py
requirements.txt /src/synister/requirements.txt
%labels
maintainer funkej@janelia.hhmi.org
%post
# basic ubuntu packages
apt update
apt install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
libmlpack-dev \
liblzma-dev \
libsm6 \
libxext6 \
libxrender-dev \
libmlpack-dev \
wget && \
rm -rf /var/lib/apt/lists/*
# install conda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p /miniconda
PATH="/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda install python=3.6
MALIS_ROOT=/src/malis
MALIS_REPOSITORY=https://github.com/TuragaLab/malis.git
MALIS_REVISION=beb4ee965acee89ab00a20a70205f51177003c69
pip install cython
cd ${MALIS_ROOT}
git clone ${MALIS_REPOSITORY} . && \
git checkout ${MALIS_REVISION}
python setup.py build_ext --inplace
PYTHONPATH=${MALIS_ROOT}:$PYTHONPATH
MALA_ROOT=/src/mala
MALA_REPOSITORY=https://github.com/funkey/mala.git
MALA_REVISION=465b02ffce4204a4c1922f2b316a8b447ec4eb9b
cd ${MALA_ROOT}
git clone ${MALA_REPOSITORY} . && \
git checkout ${MALA_REVISION}
python setup.py build_ext --inplace
PYTHONPATH=${MALA_ROOT}:$PYTHONPATH
NUMCODECS_ROOT=/src/numcodecs
NUMCODECS_REPOSITORY=https://github.com/funkey/numcodecs
NUMCODECS_REVISION=f950047d7b666723f81006cbdfd82c0e6705c39c
cd ${NUMCODECS_ROOT}
git clone ${NUMCODECS_REPOSITORY} . && \
git checkout ${NUMCODECS_REVISION} && \
git submodule update --init --recursive
pip install -r requirements.txt
python setup.py install
ZARR_ROOT=/src/zarr
ZARR_REPOSITORY=https://github.com/funkey/zarr
ZARR_REVISION=9ddf849a6e3329f5ff361ebf6156712926e2fdfe
cd ${ZARR_ROOT}
git clone ${ZARR_REPOSITORY} . && \
git checkout ${ZARR_REVISION}
pip install -r requirements.txt
python setup.py install
GUNPOWDER_ROOT=/src/gunpowder
GUNPOWDER_REPOSITORY=https://github.com/funkey/gunpowder.git
GUNPOWDER_REVISION=754607abcd3c84ec28c0d2ea257b969934ce986d
cd ${GUNPOWDER_ROOT}
git clone ${GUNPOWDER_REPOSITORY} . && \
git checkout ${GUNPOWDER_REVISION}
pip install -r requirements.txt
python setup.py build_ext --inplace
PYTHONPATH=${GUNPOWDER_ROOT}:$PYTHONPATH
DAISY_ROOT=/src/daisy
DAISY_REPOSITORY=https://github.com/funkelab/daisy
DAISY_REVISION=5d0e6c9abbab6a86990d58b3e00ac4332a8ced46
cd ${DAISY_ROOT}
git clone ${DAISY_REPOSITORY} . && \
git checkout ${DAISY_REVISION}
pip install -r requirements.txt
python setup.py build_ext --inplace
PYTHONPATH=${DAISY_ROOT}:$PYTHONPATH
FUNLIB_LEARN_ROOT=/src/funlib/learn/torch
FUNLIB_LEARN_REPOSITORY=https://github.com/funkelab/funlib.learn.torch.git
FUNLIB_LEARN_REVISION=636813e60d48379d078b5458e40bdf23269631b3
cd ${FUNLIB_LEARN_ROOT}
git clone ${FUNLIB_LEARN_REPOSITORY} . && \
git checkout ${FUNLIB_LEARN_REVISION}
#pip install -r requirements.txt
python setup.py build_ext --inplace
PYTHONPATH=${FUNLIB_LEARN_ROOT}:$PYTHONPATH
# install pytorch
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
# install synister
cd /src/synister
#pip install -r requirements.txt
python setup.py build_ext --inplace
PYTHONPATH=/src/synister:$PYTHONPATH
pip install mahotas
pip install pymongo
pip install opencv-python
pip install iteration_utilities
%environment
export MALIS_ROOT=/src/malis
export PYTHONPATH=${MALIS_ROOT}:$PYTHONPATH
export PYTHONPATH=${AUGMENT_ROOT}:$PYTHONPATH
export PYTHONPATH=${DVISION_ROOT}:$PYTHONPATH
export MALA_ROOT=/src/mala
export PYTHONPATH=${MALA_ROOT}:$PYTHONPATH
export GUNPOWDER_ROOT=/src/gunpowder
export PYTHONPATH=${GUNPOWDER_ROOT}:$PYTHONPATH
export DAISY_ROOT=/src/daisy
export PYTHONPATH=${DAISY_ROOT}:$PYTHONPATH
export PATH=/miniconda/bin:${PATH}
export SYNISTER_ROOT=/src/synister
export PYTHONPATH=${SYNISTER_ROOT}:$PYTHONPATH
export FUNLIB_LEARN_ROOT=/src/funlib/learn/torch
export PYTHONPATH=${FUNLIB_LEARN_ROOT}:$PYTHONPATH
# disable threads for numpy and the like, they get into our way when we
# pre-fetch batches using multiple processes
export OMP_NUM_THREADS=1
%runscript
exec /bin/bash "$@"