/unity-ml-on-azure

Resources for running Unity ML agent training in Azure

Primary LanguagePowerShell

unity-ml-on-azure

Resources for running Unity ML agent training in Azure

Prerequisites

Quickstart

  1. Get started with Unity 3D ML Agents as described here
  2. Build your Unity project for Linux x86_64 as described here
  3. Copy Editor/AzureDeploymentWindow.cs into your project's Editor directory.
  4. Use the ML on Azure > Train command to open the dialog
  5. Optionally set the storage account name; a default name is provided based on the current time, but is not guaranteed to be unique
  6. Click Choose build output and navigate to your x86_64 build output.
  7. Click Deploy; currently the editor only displays what you should run at the command line
  8. Ensure you are logged into Azure (run az login)
  9. Navigate to the scripts and run the command provided by the editor, e.g., .\train-on-aci.ps1 -storageAccountName drunityml20180425 -environmentName 3dball -localVolume C:\code\ml-agents\unity-volume

Details

PowerShell Script

scripts/train-on-aci.ps1 will do the following:

  • Ensures the existence of a target Azure resource group
  • Ensures the existence of a target Azure storage account and file share
  • Uploads your Unity build to the file share
  • Creates an Azure Container Instance to run the ML training using said Unity build, outputting to said file share
  • For parameters, see comment based help in train-on-aci.ps1

Bash Script

scripts/train-on-aci.sh will do the following:

  • Ensures the existence of a target Azure resource group
  • Ensures the existence of a target Azure storage account and file share
  • Uploads your Unity build to the file share
  • Creates an Azure Container Instance to run the ML training using said Unity build, outputting to said file share
  • For parameters, see comment based help in train-on-aci.sh