ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Tutorial of training on Google Cloud Platform

Open Tsuihao opened this issue 8 years ago • 8 comments

Hi there,

I have searched on How to train the ml-agents PPO on the google cloud platform(GCP) It would be great to provide a "How to train on GCP" tutorial based on the 3DBall example.

Anyone here already achieved training on GCP? Any suggestion or short documentation will be appreciated.

Thanks

Tsuihao avatar Apr 19 '18 08:04 Tsuihao

You can use a docker to run on GCP. You can build a docker image on your local machine and push that docker image to GCP. Lookup how to build a docker image in the docker documentation. The only thing you need to move to GCP is the unity-volume folder with your build program.

Lakrix avatar Apr 19 '18 11:04 Lakrix

Yes, that is exactly what you'd do. Thanks for stepping in @Lakrix !

@Tsuihao Please let us know if you face any issues!

eshvk avatar Apr 19 '18 15:04 eshvk

Hi all,

Thanks for the reply. I have found this tutorial: https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Using-Docker.md

I followed the procedure to Build the Docker Container docker build -t <image-name> .

It displayed: unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx: D:\lib\ml-agents_v0.3\unity-volume\2D_Docking_Data\Dockerfile: The system cannot find the file specified

I assumed that I need to create a Dockerfile and place it in my repo.

Could @eshvk add the example Dockerfile for 3DBall?

Thanks

Tsuihao avatar Apr 20 '18 16:04 Tsuihao

Hi @Tsuihao There isn't a specific Dockerfile for 3DBall, we have provided a general DockerFile in the ml-agents repo, this one. The docker build command needs to be run in the directory which contains the file.

eshvk avatar Apr 20 '18 17:04 eshvk

Hi @eshvk Thanks for the information. I am a total beginner level of docker, just wanna make sure that:

1.Use the general ml-agents Dockfile to build the docker image. 2.Follow what @Lakrix mentioned, push this image to the GCP with unity-volume folder.

Is the above-mentioned correct?

Tsuihao avatar Apr 20 '18 20:04 Tsuihao

There are a few pieces here:

  1. Think of the DockerFile as code used to generate a Docker image. It bundles of the source i.e. ml-agents into that image. You'd have to put this image into your GCP registry.

  2. The image is run as a container. That container would have to have access to the unity-volume folder when you run it in GCP. This is assuming that you have put the Unity environment executable there.

I'd suggest trying to understand how to get setup with docker in your local computer before trying it out on Google Cloud.

eshvk avatar Apr 20 '18 21:04 eshvk

Thanks for reaching out to us. Hopefully you were able to resolve your issue. We are closing this due to inactivity, but if you need additional assistance, feel free to reopen the issue.

xiaomaogy avatar May 21 '18 20:05 xiaomaogy

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 03 '20 09:01 lock[bot]