-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvampire.def
More file actions
95 lines (78 loc) · 3.08 KB
/
Copy pathvampire.def
File metadata and controls
95 lines (78 loc) · 3.08 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
Bootstrap: docker
From: ubuntu:22.04
%labels
Author Zikun-Yang
Version v0.4.2
%help
VAMPIRE - tandem repeat motif annotation tool
Build options:
Default (international users):
apptainer build vampire.sif vampire.def
Chinese users (use Tsinghua mirrors for conda + pip):
apptainer build --build-arg CONDA_MIRROR=cn vampire.sif vampire.def
Install a specific version:
apptainer build --build-arg VAMPIRE_VERSION=0.4.2 vampire.sif vampire.def
%arguments
VAMPIRE_VERSION=""
CONDA_MIRROR=""
%post
set -e
# Runtime libraries for Python scientific / plotting wheels and Miniconda
apt-get update && apt-get install -y \
ca-certificates \
wget \
curl \
bzip2 \
libcurl4 \
libfontconfig1 \
libfreetype6 \
libpng16-16 \
libtiff5 \
libjpeg-turbo8 \
locales
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
# Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh
bash /tmp/miniconda.sh -b -p /opt/conda
rm /tmp/miniconda.sh
export PATH="/opt/conda/bin:$PATH"
# Configure conda + pip channels with optional mirror support
# Set CONDA_MIRROR=cn before building to use Tsinghua (TUNA) mirrors.
if [ "{{ CONDA_MIRROR }}" = "cn" ]; then
echo "==> Configuring Tsinghua (TUNA) mirrors for Chinese network"
TUNA="https://mirrors.tuna.tsinghua.edu.cn/anaconda"
/opt/conda/bin/conda config --remove-key channels || true
/opt/conda/bin/conda config --add channels "${TUNA}/cloud/bioconda/"
/opt/conda/bin/conda config --add channels "${TUNA}/cloud/conda-forge/"
/opt/conda/bin/conda config --add channels "${TUNA}/pkgs/main/"
/opt/conda/bin/conda config --set show_channel_urls yes
/opt/conda/bin/pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
/opt/conda/bin/pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
else
echo "==> Configuring official conda channels (international)"
/opt/conda/bin/conda config --add channels conda-forge
/opt/conda/bin/conda config --add channels bioconda
/opt/conda/bin/conda config --set show_channel_urls yes
fi
/opt/conda/bin/conda init bash
/opt/conda/bin/conda clean -afy
# Install bioinformatics dependencies
/opt/conda/bin/conda install -y mafft
# Install VAMPIRE (specific version if provided, otherwise latest stable)
if [ -n "{{ VAMPIRE_VERSION }}" ]; then
/opt/conda/bin/pip install --root-user-action=ignore "vampire-tr=={{ VAMPIRE_VERSION }}"
else
/opt/conda/bin/pip install --root-user-action=ignore vampire-tr
fi
# Clean up
/opt/conda/bin/conda clean -afy
apt-get clean && rm -rf /var/lib/apt/lists/*
%environment
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export PATH=/opt/conda/bin:/usr/local/bin:$PATH
export PYTHONUNBUFFERED=1
%runscript
echo "VAMPIRE v0.4.2 - tandem repeat motif annotation"
exec "$@"