![]() ![]() Sudo add-apt-repository -y ppa:ubuntugis/ppa Install spatial libraries for sf, including GDAL > 2.2.0 (some black magic here, it definitely could be optimized but I don’t know how) sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable ![]() Sudo apt-get -y update & sudo apt-get -y upgrade Sudo apt-key adv -keyserver -recv-keys E084DAB9 Sudo sh -c 'echo "deb xenial/" > /etc/apt/sources.list' Make sure that your machine is up-to-date by running these commands: sudo apt-get update Here we follow Luis’s guide, with the only differences being a a few lines under “install spatial libraries” to make sure that a recent version of GDAL will be installed, allowing me to install the sf package. Installing R, RStudio Server and Shiny Server on your virtual machine Sudo dd if=/dev/zero of=swapfile bs=1M count=3000 I create a 3GB swap file because we don’t have enough RAM to compile rcpp using the f1-micro instance. I used a f1-micro instance (0.2 CPU, 512 MB RAM) because it is free.ĮDIT: I have been recently made aware of the googleCOmputerEngineR package, which can create a google cloud instance from your local R session. Here we follow Luis’s instruction to create the VM instance. * Password-protect the shiny server using nginx * Link my domain name to the static IP address using "A Record" * Get a static IP address for my virtual machine ![]() * Install dependencies for the "sf" package (GDAL was a pain) In this post, I will complement Luis’s guide with the following information that was required for my use case: * Create a swap file because the f1-micro doesnt have enough ram to compile `rcpp` This guide by Luis Henrique Zanandrea Paese on GitHub covered all the bases I needed to covered to start my first RStudio / Shiny server. The main reasons I decided to do it on the cloud are as follow: * No need to open port on my home computer I decided this would be the perfect time to create my first google cloud machine. I have recently had to deploy a public-facing shiny dashboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |