On an m4.10xlarge:
sudo apt-get install imagemagick xorg libx11-dev libglu1-mesa-dev htop
Then fire up R as root, and run the following (note that biocLite nowadays will install from CRAN which is pretty nice!)
source("https://bioconductor.org/biocLite.R")
biocLite(
c(
"DESeq2",
"flowQ",
"flowUtils",
"RchyOptimyx",
"flowViz",
"genefilter",
"GenomicFeatures",
"Rsamtools",
"AnnotationDbi",
"org.Hs.eg.db",
"GenomicAlignments",
"GenomicFeatures",
"pheatmap",
"RColorBrewer",
"ks",
"BiocParallel",
"Gviz",
"sva"
)
)
newusers
kept segfaulting on me when providing a large file, so this is one user per file, overwritten each time.
Contents of addusers.py
:
#!/usr/bin/env python
import os
for i in range(1, 60):
with open('tmp', 'w') as fout:
fout.write('user{0}:xzfy:100{1}:100{1}:,,,:/home/user{0}:/bin/bash\n'.format(i, i+10))
os.system('newusers tmp')
Run with sudo python addusers.py
sudo mkdir -p /opt/RLIBS
sudo rsync -r /home/ubuntu/R/x86_64-pc-linux-gnu-library/3.4/ /opt/RLIBS/
sudo chmod -R ugo+r /opt/RLIBS
If you need to install anything else, do it as ubuntu user as root and re-run the last two lines.
Edit /etc/rstudio/rsession.conf
to add the line:
r-libs-user=/opt/RLIBS/
Then restart RStudio Server
sudo rstudio-server restart
Clone the repo into ubuntu's home dir, then send out to users. Note it's 89MB, so copying it all to 60 users may not be efficient
git clone https://github.com/burkesquires/immunology-informatics.git
#!/usr/bin/env python
import os
for i in range(60):
os.system('rsync -rv immunology-informatics /home/user{0}/immunology-informatics'.format(i)
os.system('chown -R user{0}:user{0} /home/user{0}/immunology-informatics'.format(i))