forked from aws/amazon-sagemaker-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a notebook for Unity executables on SageMaker RL (aws#1489)
* minor changes on launcher script * Adding a sample notebook for Unity executables with SageMaker RL * update README; update notebook intro; update Dockerfile and train preset Co-authored-by: yoheigon <[email protected]> Co-authored-by: henryyuanheng-wang <[email protected]>
- Loading branch information
1 parent
137d40e
commit 93ce04f
Showing
9 changed files
with
875 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
ARG CPU_OR_GPU | ||
ARG AWS_REGION | ||
FROM 462105765813.dkr.ecr.${AWS_REGION}.amazonaws.com/sagemaker-rl-ray-container:ray-0.8.2-tf-${CPU_OR_GPU}-py36 | ||
|
||
WORKDIR /opt/ml | ||
|
||
# Unity dependencies | ||
|
||
RUN pip install --upgrade \ | ||
pip \ | ||
gym-unity \ | ||
mlagents-envs | ||
|
||
RUN pip install sagemaker-containers --upgrade | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
############################################ | ||
# Test Installation | ||
############################################ | ||
# Test to verify if all required dependencies installed successfully or not. | ||
RUN python -c "import gym;import sagemaker_containers.cli.train;import ray; from sagemaker_containers.cli.train import main; from mlagents_envs.environment import UnityEnvironment; from mlagents_envs.registry import default_registry; from gym_unity.envs import UnityToGymWrapper" | ||
|
||
# Make things a bit easier to debug | ||
WORKDIR /opt/ml/code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Unity3D Game with Amazon SageMaker RL | ||
|
||
This folder contains examples of how to use RL to train an agent to play Unity3D game using Amazon SageMaker Reinforcement Learning. Customer can choose using [example environment](https://github.com/Unity-Technologies/ml-agents/blob/742c2fbf01188fbf27e82d5a7d9b5fd42f0de67a/docs/Learning-Environment-Examples.md) provided by Unity Toolkit or bring their own customized Unity executables. | ||
|
||
|
||
## Contents | ||
|
||
* `rl_unity_ray.ipynb`: notebook for training an RL agent. | ||
|
||
|
||
* `src/` | ||
* `train-unity.py`: Entrypoint file to starting a training job | ||
* `evaluate-unity.py`: Entrypoint file to starting a evaluation job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common |
Oops, something went wrong.