-
Notifications
You must be signed in to change notification settings - Fork 1
/
SINGULARITY
67 lines (51 loc) · 1.77 KB
/
SINGULARITY
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
BootStrap: debootstrap
OSVersion: bionic
MirrorURL: http://archive.ubuntu.com/ubuntu/
Include: bash
%help
Help me. I'm in the container.
%labels
Maintainer Vanessasaurus
Version v1.0
%files
renv/library/R-4.1/x86_64-pc-linux-gnu /usr/local/lib/R/site-library
%environment
export R_USER_LIBS=/usr/local/lib/R/site-library
%post
# environment doesn't set at build time. need here for build.
export R_USER_LIBS=/usr/local/lib/R/site-library
# setting R cran mirror. see https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html
apt install -y apt-transport-https software-properties-common
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
# add sources to source list
{
echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse"
echo "deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse"
echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse"
} >> /etc/apt/sources.list
apt update && apt upgrade -y && apt install -y \
build-essential \
curl \
locales \
libcurl4-openssl-dev \
libncurses5-dev \
libncursesw5-dev \
build-essential \
pkg-config \
zlib1g-dev \
bzip2 \
r-base \
libcr-dev \
mpich \
mpich-doc \
vim \
&& apt-get clean \
&& apt-get purge
# build R dependencies
R --slave -e 'message(.libPaths())'
R --slave -e 'message(list.files(.libPaths()))'
# --configure-args=" \\
# --with-Rmpi-include=/path/to/mpi_include_dir \\
# --with-Rmpi-libpath=/path/to/mpi_lib_dir \\
# --with-Rmpi-type=MPICH}"