-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingularity.def
114 lines (99 loc) · 2.24 KB
/
singularity.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
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
Bootstrap: docker
From: ubuntu:18.04
Stage: spython-base
%files
./src /opt/prepy-wrapper/src
./requirements.txt /opt/prepy-wrapper/requirements.txt
%labels
author="Rodrigo Martin <[email protected]>"
%post
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND=noninteractive
# Install dependencies
apt-get update && \
apt-get install -y \
autoconf \
build-essential \
bzip2 \
cmake \
cython \
git \
libbz2-dev \
libncurses5-dev \
openjdk-8-jdk \
pkg-config \
python \
python2.7 \
python2.7-dev \
python-setuptools \
python-pip \
python-psutil \
python-numpy \
python-pandas \
python-distribute \
python-pysam \
python-scipy \
software-properties-common \
libz-dev \
libglib2.0-dev \
libbz2-dev \
liblzma-dev \
default-jre \
autoconf \
wget \
python3 \
python3-pip \
git \
zlib1g-dev && \
apt-get clean -y
# Copy the source code
mkdir -p /opt/prepy-wrapper/src
# Change the permissions to be able to execute the scripts in src folder
chmod -R 755 /opt/prepy-wrapper/src
PATH=$PATH:/opt/prepy-wrapper/src
# Install dependencies
pip3 install -r /opt/prepy-wrapper/requirements.txt
# Install hap.py
git clone --recurse-submodules https://github.com/Illumina/hap.py
mkdir -p /hap.py
cd /hap.py
pip install bx-python
# copy git repository into the image
mkdir -p /opt/hap.py-source
cp -r /hap.py/* /opt/hap.py-source/
# make minimal HG19 reference sequence
mkdir -p /opt/hap.py-data
# download HG19 reference data
mkdir -p /opt/hap.py-data
cd /opt/hap.py-data
# get + install ant
mkdir -p /opt
cd /opt
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.7-bin.tar.gz && \
tar xzf apache-ant-1.9.7-bin.tar.gz && \
rm apache-ant-1.9.7-bin.tar.gz
PATH=$PATH:/opt/apache-ant-1.9.7/bin
# run hap.py installer in the image, don't run tests since we don't have a reference file
mkdir -p /opt/hap.py-source
cd /opt/hap.py-source
python install.py /opt/hap.py --with-rtgtools --no-tests
mkdir -p /opt/hap.py
cd /opt/hap.py
# run basic tests
bin/test_haplotypes
# remove source folder
mkdir -p /
cd /
rm -rf /opt/hap.py-source
# Add pre.py to path
PATH=$PATH:/opt/hap.py/bin
%environment
export PATH=$PATH:/opt/prepy-wrapper/src
export PATH=$PATH:/opt/apache-ant-1.9.7/bin
export PATH=$PATH:/opt/hap.py/bin
%runscript
cd /
exec /bin/bash "$@"
%startscript
cd /
exec /bin/bash "$@"