I am looking for all the possible options to deploy an application written using R and the Shiny package on AWS. I see one of the options is to use EC2, but I would like to know if there is any serverless option available to deploy R applications on AWS.
Does Sagemaker RStudio have an option to deploy? I looked into AWS documents, but unfortunately I could not see an option.
Any leads would be much appreciated.
Using RStudio on SageMaker (or simply R kernels in SageMaker Studio / Notebooks) enables several deployment strategies for RESTful application endpoints.
In this example, you can see a trained R model deployed to a SageMaker serverless endpoint:
https://github.com/aws-samples/rstudio-on-sagemaker-workshop/blob/main/03_SageMakerPipelinesAndDeploy/01_Pipeline.Rmd#L124-L149
In this example, you will deploy a trained R model to a 24/7 RESTful endpoint using SageMaker real-time endpoints:
https://github.com/aws/amazon-sagemaker-examples/tree/main/r_examples/r_serving_with_plumber
In order to build the serving containers for those models, you can check the above examples or you may want to use recently launched functionality using the native R vetiver package:
https://github.com/juliasilge/vetiverdemo/blob/main/biv-svm/train_sagemaker.Rmd
If you're looking to deploy shiny applications and not models, you can use EC2 or a container service like ECS/Fargate to host the Shiney or RStudio connect server. These blogs may be a bit overkill for what you're looking to do, but they should have good examples of achieving hosted applications:
https://aws.amazon.com/blogs/machine-learning/host-rstudio-connect-and-package-manager-for-ml-development-in-rstudio-on-amazon-sagemaker/
https://aws.amazon.com/blogs/architecture/scaling-rstudio-shiny-using-serverless-architecture-and-aws-fargate/
Related
I have an R script that I need to run once every week. I need it to be done using Azure. One option is to use Azure Data Factory and set up a pipline what will run this R script on a VM (Windows).
The problem I'm facing is that I will have to update every now and then both the R script and the R packages the R script is using.
When setting up this pipeline I will have to generalize the VM (correct me if I'm wrong) and doing so I can no longer log into this VM. And if I can't log into this VM I cannot update the R packages.
What options do I have here?
There is an alternate solution where you can use Azure Batch Service and Azure Data Factory to execute R scripts in your pipeline.
For more information, you can refer this blog: How to execute R Scripts using Azure Batch Services and Azure Data Factory? | by Aditya Kaushal | Medium
Alternatively, to run R scripts in your VM, you can use below options:
Custom Script Extension
Run Command
Hybrid Runbook Worker
Serial console
Reference: Run scripts in an Azure Windows VM - Azure Virtual Machines | Microsoft Docs
I am hosting my Shiny apps via Shiny Server on AWS. The apps I am hosting depend on a package I am actively developing.
I want app1 to use a stable version of the package I am developing (i.e., be fixed to a certain Github release). But app2, I want to follow the latest updates (i.e., that I reinstall on the server every time I want to test something).
Usually, when I install the latest version of my package, this updates things globally, so app1 would be affected. But how could I have a fixed system environment for app1 and a different environment for app2 in this context? What is a good workflow to achieve this?
I was able to achieve this using adisarid's answer here:
Using renv:
log into the production server, get into the app's directory. Then run
R, and use renv::restore and then renv::isolate.
I was doing a simulation study in RStudio using doAzureParallel package. It uses a Virtual Machines to do the work and merges the result finally in my RStudio workspace. However, suddenly my RStudio Stopped working. But when I log in to Microsoft Azure Portal I can still see that the jobs are running and it shows the number of simulations running, completed, etc. Once I restart my Rstudio is there any possibility to get the R output from the Azure portal? I am new to Azure. I hope I would be helped by some experienced people.
Note: You can only monitor the jobs using Azure Portal.
Once the Job Submission object is passed through the Submit call in the SDK and the workload is submitted to the service that has been created using the portal. Now the job can be monitored via the portal or via the client by getting the details of the job using the Job Id that was returned at submission.
This article covers the following Azure services that support the R language:
The doAzureParallel package is a parallel backend for the widely popular foreach package. With doAzureParallel, each iteration of the foreach loop runs in parallel on an Azure Virtual Machine (VM), allowing users to scale up their R jobs to tens or hundreds of machines.
This tutorial shows you how to deploy a Batch pool and run a parallel R job in Azure Batch directly within RStudio.
What is the equivalent of Google Cloud Datalab(jupyter notebook service) managed service provided in Amazon Cloud, for usage by Data Analysts/Data Scientists? Is the only option is to build Databricks/Jupyter notebook separately on EC2 cluster in AWS, is there not a managed service in AWS available for this?
Checkout Amazon SageMaker, a fully-managed service that enables data scientists and developers to build, train and deploy machine learning models.
As part of SageMaker documentation, there is a section on running Jupyter notebook apps with SageMaker notebook instance. You may also want to read How it works and Get Started sections to understand the complete workflow.
I am trying to connect Analysis services from either through R or Nodejs.
For R, I have found the following library:
https://github.com/overcoil/X4R
For Nodejs, I have found the following library:
https://github.com/rpbouman/xmla4js
Analysis Services Server is external. It is not in my local machine. Currently I am able to connect it successfully from Excel using both Windows and basic authentication (username/password).
For accessing it through R or nodejs, in the following link it is said I need to configure http access using IIS. But since it is not local how can I get the
file msmdpump.dll and configure it.
In this link https://www.linkedin.com/grp/post/77616-265568694, at the end Sarah Lukens said that I need to follow the steps mentioned in https://msdn.microsoft.com/en-us/library/gg492140.aspx
Since I didn't work before in SSAS, I don't have much clarity. Can anyone please guide me in establishing the connection from R or Nodejs to Analysis services. Then I just want to submit the MDX queries and get the result.
thanks,
r karthik.
It seems there is no way to connect to your SSAS remotely without IIS. You have to share your msmdpump.dll in order to get access to your SSAS connection for third-party APIs via the xmla interface.