Coder Social home page Coder Social logo

aws_ec2's Introduction

For setting up EC2 instance

  1. 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

  1. 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]

  1. Setup data mounts and install software sudo bash setup.sh

  2. 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

EC2 management tips

Taking stock of compute resources within an Ubuntu Linux instance

How are storage volumes mounted?

lsblk

How much storage space in being used for various mount points?

df -h

Detailed description of hardware

lshw

See active resource usage right now with top. Use 1 to see all CPUs individually. Use q to exit

top

Transferring data

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.

rstudio server

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

Resources

Griffith lab "Intro to AWS" workshop

Running R on AWS EC2 and Logging into RStudio from Anywhere

aws_ec2's People

Contributors

wvictor14 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.