How to Run DeepRacer Locally to Save your Wallet


AWS DeepRacer training locally on the New York Track

The AWS DeepRacer can be expensive. With some top competitors in the league spending +$700 to train their DeepRacers and learn how to do it effectively the activity can be very cost-prohibitive. Plus, if you are like me, you want total control over the training of your model and the ability to use RL algorithms that AWS does not provide (as of writing this they only provide PPO). In this tutorial, I will walk you through how to run the DeepRacer locally on your Ubuntu (I am using 18.04) machine with docker. I will also show places where I got stuck so that you do not get stuck there. It took me several days of research and tinkering to get it right, so hopefully, you find this before you spend that time so you can get right into the fun stuff, watching your DeepRacer learn without your wallet shrinking!

Step 1: If you do not have one already, make an AWS account. I recommend that you at least have some time playing around with the DeepRacer console so you can be familiar with everything there. You get around 10 hours of free training anyway so it doesn’t hurt to play around with the official console for a bit.

Step 2: Make sure you have git installed on your computer and that it is docker compatible.

Step 3: Make a folder called github wherever you feel most comfortable and run the following command in a terminal that is pointing into your github directory. We will be using the Github repository deepracer-for-dummies credited by Alex Schultz.

git clone && cd deepracer-for-dummies && ./

Step 4: Setup the aws-cli. Begin by installing it on your computer. The setup the configure file by running `aws configure` in a terminal. Watch this video starting at the 10-minute mark to learn how to go through the aws configure queries related to keys. Set your region `us-east-1` and do not put anything for the output format (this will use the default).

Step 5: Download and install vncviewer (get the .deb if you are using Linux):

Step 6: Install the Nvidia Docker Runtime.

Step 7: Make sure `github/deepracer-for-dummies/deepracer/rl_coach/` has content. If not pull it from crr4000’s repo (For example you could `git reset — hard` in github/deepracer-for-dummies/deepracer to get the file to show up). NOTE: this is a known glitch with the script that will eventually be solved.

Step 8: Begin training with the scripts provided by the repository. See the repositories for information on the available scripts and their usage.

When you run the script to start training you should see three terminals like the ones below. The one to the right is the terminal that you ran the command in and the one in the middle being the log terminal after an hour or so of training.

A VNC window should also open up showing the DeepRacer simulation. After everything boots up correctly you should see the DeepRacer start learning by racing around the track just as it does in the AWS DeepRacer console. The simulation backend is all through ROS which is easy to tinker with if you like to add your world or adjust the car to your liking. You no longer need to deal with the restrictions placed by the DeepRacer console so see what you can come up with!

The DeepRacer repo provided by Alex Schultz also contains convenience scripts for running the log analysis tool locally. You can learn more about that here. I will be making a tutorial about it in more detail in the future.

I will be making another tutorial about manually uploading your local models to the official console for submission into the DeepRacer league. Doing the model upload manually helps develop a better understanding of the AWS DeepRacer architecture and how it is structured in S3.

read original article at——artificial_intelligence-5

Do NOT follow this link or you will be banned from the site!