-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSingularity
More file actions
59 lines (48 loc) · 1.37 KB
/
Singularity
File metadata and controls
59 lines (48 loc) · 1.37 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
# Singularity definition file for bwt-algorithm
# This file builds a container with all dependencies and compiles Cython extensions
Bootstrap: docker
From: ubuntu:22.04
%labels
Author Filip Ramazan
Version v1.0
Description BWT-based tandem repeat finder
%environment
LC_ALL=C.UTF-8
LANG=C.UTF-8
PYTHONUNBUFFERED=1
PYTHONPATH=/opt/bwt-algorithm:${PYTHONPATH}
%post
# Install system dependencies
apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-dev python3-setuptools python3-wheel \
build-essential cython3 \
git \
libopenblas-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
pip3 install --upgrade pip
pip3 install numpy numba pydivsufsort Cython
cd /opt/bwt-algorithm
# Compile Cython extension (if present)
if [ -f src/_accelerators.pyx ]; then
python3 - <<'PY'
from setuptools import setup, Extension
from Cython.Build import cythonize
import numpy as np
ext_modules = [
Extension(
"src._accelerators",
["src/_accelerators.pyx"],
include_dirs=[np.get_include()],
)
]
setup(
script_args=["build_ext", "--inplace"],
ext_modules=cythonize(ext_modules, compiler_directives={"language_level": "3"}),
)
PY
fi
%files
. /opt/bwt-algorithm
%runscript
exec python3 -m src.main "$@"