


So that’s it! Thanks for reading and feel free to leave any comments/questions below.

This is intended for those who have some experience with R and with Jupyter notebooks, and. 1 min read How to install RStudio Server in a Google Cloud Platform (GCP) compute engine instance Let’s assume that you already have a GCP instance created.50 13 * * 4 cd /home/stefang/ & /usr/bin/Rscript -e "rmarkdown::render('')" 00 18 * * 4 cd /home/stefang/ & /usr/bin/bash write_to_bucket.sh Objectives This tutorial shows you how to get started with data science at scale with R on Google Cloud. Third, I configured Crontab to run the script every Thursday at 1:50 pm, preceded by the bash script at 6:00 pm (this gave me enough time in case the report took longer). #!/bin/bash cd /home cd stefang/ gcsfuse -implicit-dirs gcs-bucket/ sudo mv /output/ gcs-bucket/ #unmount GCS bucket fusermount -u gcs-bucket Second, I created a bash script that would change current directories, mount a GCS bucket, and upload my script’s output files (several CSVs and an HTML map file) to the bucket. The full process of setting this up also involves Cloud Functions and Pub/Sub. Open a JupyterLab notebook To open a user-managed notebooks instance, complete the following steps: In the Google Cloud console, go to the User-managed notebooks page. Cloud Scheduler allows us to limit our usage of our VM, keeping costs low and reducing any wasted energy. There were a few steps required for this task, which I will briefly sum up:įirst, I set up Cloud Scheduler to start/stop my instance at specific times each week. I wanted to fully automate this process so that, unless I had new code to push, the script would run without me having to SSH into the instance. From this new directory, we can access all of our files (including any outputs from the script) via the shell.
