Unity 机器学习代理工具包 (ML-Agents) 是一个开源项目,它使游戏和模拟能够作为训练智能代理的环境。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

2.2 KiB

Training on Amazon Web Service

This page contains instructions for setting up an EC2 instance on Amazon Web Service for training ML-Agents environments. Visual observations is not supported currently and you need to enable headless mode.

You can get started with an EC2 instance with the Deep Learning AMI (Ubuntu) listed under AWS Marketplace AMI. Choose the python3 environment within that ami which gives you the python3 and CUDA 9.0 environment.

Configuring your own Instance

To begin with, you will need an EC2 instance which contains the latest Nvidia drivers, CUDA9, and cuDNN. There are a number of external tutorials which describe this (Note: You will need to tweak some steps in these tutorials for CUDA 9):

Installing ML-Agents

  1. Move python sub-folder of this ml-agents repo to the remote ECS instance, and set it as the working directory.
  2. Install the required packages with pip3 install ..

Testing

To verify that all steps worked correctly:

  1. In the Unity Editor, load a project containing an ML-Agents environment (you can use one of the example environments if you have not created your own).
  2. Open the Build Settings window (menu: File > Build Settings).
  3. Select Linux as the Target Platform, and x86_64 as the target architecture.
  4. Check Headless Mode.
  5. Click Build to build the Unity environment executable.
  6. Upload the executable to your EC2 instance.
  7. Test the instance setup from Python using:
from unityagents import UnityEnvironment

env = UnityEnvironment(<your_env>)

Where <your_env> corresponds to the path to your environment executable.

You should receive a message confirming that the environment was loaded successfully.