-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSingularityDef_NoPerlbrew.def
126 lines (106 loc) · 3.43 KB
/
SingularityDef_NoPerlbrew.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
115
116
117
118
119
120
121
122
123
124
125
126
Bootstrap: docker
From: ubuntu:24.04
%labels
Version 1.6.0
Author Vladimir Mikryukov, Kessy Abarenkov
Maintainer vladimir.mikryukov@ut.ee
Biodiverse 4.99_x
Perl 5.38.0
%runscript
exec "$@"
%environment
export SHELL="/bin/bash"
export PERL5LIB="/opt/biodiverse/lib"
%post -c /bin/bash
export DEBIAN_FRONTEND="noninteractive"
export TZ=UTC
## Assign variables with perl path
## Assign read and execute access for everyone (+ write access for the owner) to the /opt dir
chmod -R 755 /opt
## cpanm default options
export PERL_CPANM_OPT="--notest --skip-satisfied"
## Install the required dependencies
apt update -y \
&& apt install -y software-properties-common \
&& add-apt-repository universe \
&& apt update -y \
&& apt upgrade -y \
&& apt install -y \
software-properties-common \
python3 python3-pip \
zip unzip \
curl git wget less gawk \
build-essential ca-certificates \
cpanminus \
make cmake libtool automake autoconf pkg-config \
libffi-dev zlib1g-dev libminizip-dev libexpat1-dev libssl-dev \
libarmadillo-dev libpoppler-dev liblzma-dev \
libkml-dev libfreexl-dev libogdi-dev \
libgdal-dev gdal-bin \
libgeos-dev librttopo-dev \
libsqlite3-dev sqlite3 \
locales language-pack-fi language-pack-en && \
export LANGUAGE=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8 && \
locale-gen en_US.UTF-8 && \
dpkg-reconfigure locales \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/*
## Install modules
cpanm \
rlib@0.02 \
ExtUtils::Embed@1.35 \
Catalyst::Devel@1.42 \
Module::Compile@0.38 \
FFI::Build::MM@2.10 \
FFI::Platypus@2.10 \
List::Util@1.68 \
List::MoreUtils@0.430 \
PDL@2.098 \
Test2::Harness@1.000155 \
Text::CSV@2.05 \
Text::CSV_XS@1.59 \
Excel::ValueReader::XLSX@1.15 \
Alien::Build@2.84 \
Alien::freexl@1.06 \
Alien::libtiff@1.02 \
Alien::cmake3@0.08 \
Alien::sqlite@1.07 \
Alien::patch@0.15 \
Alien::patchelf@0.08 \
FFI::Platypus::Declare@1.34 \
Alien::geos::af@1.012 \
Alien::proj@1.30
cpanm \
Alien::spatialite@1.09 \
Alien::gdal@1.39
## Export LD_LIBRARY_PATH and install Geo::GDAL::FFI
export LD_LIBRARY_PATH=`perl -MAlien::geos::af -E'print Alien::geos::af->dist_dir . q{/lib}'` \
&& cpanm Geo::GDAL::FFI@0.12
cd /opt
## Download Biodiverse repo (pull only the latest commit from GitHub)
## Latest commit from the master branch (development version)
git clone --depth 1 https://github.com/shawnlaffan/biodiverse.git
cd "biodiverse"
## Get the updated `cpanfile` with fixed module versions
wget https://raw.githubusercontent.com/vmikk/biodiverse-docker/main/cpanfile -O cpanfile
## Install Biodiverse + deps for the current directory
cpanm --installdeps .
## Install remaining modules
cpanm \
Data::Recursive@1.1.0 \
Getopt::Long::Descriptive@0.116 \
List::BinarySearch@0.25 \
LWP::Protocol::https@6.14 \
Inline::Module@0.34
## Install Biodiverse Utils
cpanm \
https://github.com/shawnlaffan/biodiverse-utils/releases/download/v1.11/Biodiverse-Utils-1.11.tar.gz
%test
perl -V
## Test Biodiverse
# cd /opt/biodiverse
# export BD_NO_TEST_GUI=1 # no need to test the GUI libs load
# /opt/perl5/perlbrew/perls/perl-5.34.0/bin/prove -l