-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity.U18.r4-rserver-netdx
54 lines (41 loc) · 2.12 KB
/
Singularity.U18.r4-rserver-netdx
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
BootStrap: shub
From: Xentrics/jupyter-r-base:u18.r4-rserver
#Bootstrap: localimage
#From: Singularity.U18.r4-rserver.sif
%labels
LICENSE Copyright 2020 Bastian Seelbinder,
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above
copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Maintainer Bastian Seelbinder
%help
This will run RStudio Server
%apprun rserver
exec /usr/lib/rstudio-server/bin/rserver "${@}"
%runscript
exec /usr/lib/rstudio-server/bin/rserver "${@}"
%environment
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
%post
# to solve the "locale.Error: unsupported locale setting" error [https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting ]
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
# install additional dependencies
apt-get update
apt-get install -y libgtk3-nocsd0
apt-get install -y libzmq3-dev # required by clustermq
# Install Cytoscape
wget https://github.com/cytoscape/cytoscape/releases/download/3.8.0/Cytoscape_3_8_0_unix.sh
chmod u+x Cytoscape*
sh Cytoscape* -q
rm Cytoscape_3_8_0_unix.sh
# Install R packages
export R_LIBS_USER="/usr/local/lib/R/site-library" # make sure packages go here
/usr/local/bin/R --vanilla -e ".libPaths()" # show the path to the R libraries
/usr/local/bin/R --vanilla -e 'install.packages(c("clustermq", "future", "tidyverse", "magrittr", "readxl", "writexl"), repos="https://cloud.r-project.org", Ncpus = 10)'
/usr/local/bin/R --vanilla -e 'install.packages("BiocManager", repos="https://cloud.r-project.org", Ncpus = 10)'
/usr/local/bin/R --vanilla -e 'BiocManager::install("netDx", Ncpus = 10)'
# Clean up
rm -rf /var/lib/apt/lists/*