- Create EC2
These settings are for all-purpose bioinformatic analyses. Prioritize RAM.
OS: Ubuntu 22.04 key pair name: victor-sonoma-thinkpad Instance type m5.xlarge (32 CPUs, 128 gb RAM) volumes: root 64 Gb, workspace 1 Tb
Configure networking to open ports for for rshiny and rstudio server
For accessing rstudio-server, set security group to allow incoming traffic with following settings: Port range:8787, TCP, 0.0.0.0/0
- Login via terminal (linux)
chmod 400 [instructor-key].pem ssh -i [instructor-key].pem ubuntu@[public.ip.address] #ssh -i "victor-sonoma-thinkpad.pem" [email protected]
-
Setup data mounts and install software
sudo bash setup.sh
-
Rstudio setup
Ensure incoming traffic is enabled (create new rule, add TCP, port 8787, and 0.0.0.0/0) Install Rstudio server Add user / pw
lsblk
df -h
lshw
top
Easiest is drag and drop from vscode ssh remote <-> local
Other options like PuTTY + winscp:
Create PuTTY Private Key file (.ppk)
Then, in WinSCP, add new site with public DNS of EC2 instance. Under Advanced Site Settings, SSH, add .ppk file.
update version
https://support.posit.co/hc/en-us/articles/216079967-Upgrading-RStudio-Workbench-or-RStudio-Server
sudo rstudio-server stop
sudo apt remove rstudio-server
sudo gdebi <rstudio-server-package.deb>
# configure password
sudo passwd ubuntu
style
# vscode style theme
remotes::install_github("anthonynorth/rscodeio")
rscodeio::install_theme()
# others
devtools::install_github("max-alletsee/rstudio-themes")
library(rstudiothemes)
install_rstudio_themes(theme = "all_dark")
rstudio settings
copy rstudio-prefs.json
to ~/.config/rstudio
touch ~/.config/rstudio/rstudio-prefs.json
code ~/.config/rstudio/rstudio-prefs.json #interactively copy