-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity
33 lines (25 loc) · 883 Bytes
/
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
Bootstrap: docker
From: adamwilsonlab/emma:latest
%labels
Author Adam M. Wilson
Version 0.0.1
%apprun rserver
exec rserver "${@}"
%runscript
exec rserver "${@}"
%startscript
echo "Container was created $NOW"
echo "RUNNING rserver startscript"
echo "Arguments received: $*"
echo user = $USER password = $PASSWORD port = $PORT
rserver "$@"
%post
# Save date - not sure if this is needed
NOW=`date`
echo "export NOW=\"${NOW}\"" >> $SINGULARITY_ENVIRONMENT
# Add a default CRAN mirror
mkdir -p /usr/lib/R/etc/
echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/lib/R/etc/Rprofile.site
# Add a directory for host R libraries
mkdir -p /library
echo "R_LIBS_SITE=/library:\${R_LIBS_SITE}" >> /usr/lib/R/etc/Renviron.site