在 Azure 批处理服务的节点上安装 R

Install R on the nodes for Azure batch services

我可以使用 Power shell 创建批处理服务资源,如下所述:https://docs.microsoft.com/en-us/azure/batch/batch-powershell-cmdlets-get-started

我想在节点上 运行 一个 R 脚本,我需要在节点上安装 R 作为可用 VM 的 none(windows 或 linux)安装了 R。我目前已经通过手动登录到 VM 安装了 R。但是我想创建批处理资源,然后最好在我 运行 R 代码之前通过脚本在节点上安装 R。我该怎么做?

有 4 种主要方法可以将必要的软件加载到 VM 上:

  1. 创建一个 start task along with potentially resource files 以根据您的要求准备计算节点。
  2. 创建一个 custom image 已经包含所有预配置软件的文件。
  3. 使用containers而不是直接在计算节点上加载软件。
  4. 利用application packages.