-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingularity
More file actions
67 lines (53 loc) · 1.76 KB
/
Copy pathSingularity
File metadata and controls
67 lines (53 loc) · 1.76 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
BootStrap: docker
From: ubuntu:20.10
%labels
Maintainer Dimitris Vavoulis (with code bits from nickjer/singularity-rstudio)
%apprun rserver
exec rserver "${@}"
%runscript
exec rserver "${@}"
%environment
export PATH=/usr/lib/rstudio-server/bin:${PATH}
%setup
install -Dv rstudio_auth.sh ${SINGULARITY_ROOTFS}/usr/lib/rstudio-server/bin/rstudio_auth
install -Dv rstudio.sqlite ${SINGULARITY_ROOTFS}/var/lib/rstudio-server/rstudio.sqlite
%post
# basic installation
apt update
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
tzdata \
locales \
wget \
gdebi-core \
add-apt-key \
libxml2-dev \
libssl-dev \
libcurl4-openssl-dev
echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen en_GB.utf8
/usr/sbin/update-locale LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
export LANG=en_GB.UTF-8
# install R
echo "deb http://cloud.r-project.org/bin/linux/ubuntu groovy-cran40/" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
apt update
apt upgrade -y
apt dist-upgrade -y
apt install -y --no-install-recommends r-base r-base-dev
# install rstudio server
wget -O rstudio-server.deb https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.4.1103-amd64.deb
gdebi -n rstudio-server.deb
rm rstudio-server.deb
# clean up
apt -y autoremove --purge
apt -y clean
# set permissions
mkdir -p /var/run/rstudio-server/rstudio-rsession
mkdir -p /tmp/rstudio-server
chmod -R 1777 /var/run/rstudio-server
chmod -R 1777 /var/lib/rstudio-server
chmod -R 1777 /var/log/rstudio-server
chmod -R 1777 /tmp/rstudio-server
# specific to WHG rescomp
mkdir /users /gpfs0 /gpfs1 /gpfs2 /well