Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
548 commits
Select commit Hold shift + click to select a range
e3048de
Bugfix - ensure incremented model is used
larsll Oct 6, 2021
581c579
Fix import bug
larsll Oct 6, 2021
9ec4e93
Allow restart viewer through start training
larsll Oct 10, 2021
cace881
Merge remote-tracking branch 'upstream/master' into dev
larsll Oct 10, 2021
63f630e
Merge pull request #72 from aws-deepracer-community/dev
larsll Oct 16, 2021
4095cde
Move to 4.0.9
larsll Oct 16, 2021
e9ae898
Merge pull request #70 from oberfrank-rezso/patch-1
larsll Oct 16, 2021
2b4b1ef
Add quotes to S3 download source URL
yyao84 Oct 27, 2021
d8cec72
Fixing a bug
larsll Nov 4, 2021
01285d6
Merge branch 'dev' of https://github.com/aws-deepracer-community/deep…
larsll Nov 4, 2021
30a94cf
Merge remote-tracking branch 'upstream/master' into dev
larsll Nov 13, 2021
927c968
Version 4.0.10 of Robomaker
larsll Nov 13, 2021
04cfba6
Adding some further doc
larsll Nov 13, 2021
e3f5e81
Merge pull request #76 from aws-deepracer-community/dev
larsll Nov 13, 2021
825b58f
Merge pull request #75 from yyao84/AddQuotes
larsll Nov 13, 2021
f92b895
Enhance Evaluation Mode
larsll Nov 14, 2021
87e435a
Improved resets - require robomaker 4.0.11
larsll Nov 14, 2021
d7ba389
Enable choice of checkpoint for eval
larsll Nov 14, 2021
b5273b1
Merge pull request #78 from aws-deepracer-community/dev
larsll Nov 27, 2021
a59409f
FIx download of logs.
larsll Nov 28, 2021
8d41067
Adjusting KINESIS documentation
larsll Dec 11, 2021
5896701
Merge branch 'dev' of https://github.com/aws-deepracer-community/deep…
larsll Dec 11, 2021
fd21df8
Change default value to enable viewer
larsll Dec 11, 2021
955848a
Update Slack reference
larsll Dec 18, 2021
389c114
Update model_metadata.json
larsll Dec 21, 2021
9fb80b0
Update model_metadata_sac.json
larsll Dec 21, 2021
0a57dcd
Update dependencies.json
larsll Jan 8, 2022
d997483
Merge pull request #80 from aws-deepracer-community/dev
larsll Jan 17, 2022
0d52003
Update Windows documentation (#82)
dartjason Jan 22, 2022
93e68ae
Update multi_worker.md
larsll Jan 25, 2022
389b799
Update dependencies.json
larsll Jan 27, 2022
80ca1d5
Video documentation
larsll Feb 12, 2022
173ba8b
Merge branch 'master' of https://github.com/aws-deepracer-community/d…
larsll Feb 12, 2022
9f56119
Moving default to 4.0.12
larsll Feb 13, 2022
9b9e017
Make minio folder available
larsll Feb 19, 2022
fe6dae3
Merge branch 'master' of https://github.com/aws-deepracer-community/d…
larsll Feb 19, 2022
fdc97da
Enable cloning of model before evaluation
larsll Feb 21, 2022
3ec75b0
Update multi_gpu.md
larsll Mar 3, 2022
75c1ed0
Version 5 (#86)
larsll Apr 2, 2022
00aa198
pkg-config needed for clean setup
larsll Apr 4, 2022
5d723ee
Merge branch 'master' of https://github.com/aws-deepracer-community/d…
larsll Apr 4, 2022
433da99
Ensure .Xauthority exists
larsll Apr 4, 2022
6daf51f
Update cuda repository key (#88)
jochem725 Apr 28, 2022
ad8d82c
Use https to fetch cuda key
jochem725 Apr 28, 2022
93f80bd
Merge branch 'master' into fix/cuda-gpg-https
jochem725 Apr 28, 2022
d5f6745
Fix distribution
jochem725 Apr 28, 2022
04bc81a
Merge pull request #89 from jochem725/fix/cuda-gpg-https
jochem725 Apr 28, 2022
430adcb
Updating Keys (#91)
larsll Jun 1, 2022
3d37b2e
Update dependencies.json
larsll Jun 1, 2022
14827dd
Update Dockerfile.sagemaker-gpu
larsll Jun 16, 2022
66cfb61
Extend Troubleshooting
larsll Jun 26, 2022
94d056a
Update dependencies.json
larsll Aug 2, 2022
4afada5
Update dependencies.json
larsll Aug 2, 2022
0c80250
Create a unique path for Evaluation Simtrace (#95)
larsll Aug 4, 2022
ca98771
Changing approach to Multi-GPU (#92)
larsll Aug 4, 2022
251f43e
Fix Docker Setup Issue #83 (#93)
larsll Aug 4, 2022
1421f68
Upload 'snapshot' to local S3
larsll Aug 4, 2022
9e62471
Fixing error message when using -1 flag with -L
larsll Aug 5, 2022
e970faf
Update dependencies.json
larsll Sep 22, 2022
bf9bc5c
Merge branch 'dev' of https://github.com/aws-deepracer-community/deep…
larsll Sep 22, 2022
d77007b
Automatically add minio credentials
larsll Sep 22, 2022
7c0d9d7
Adding a config
larsll Sep 22, 2022
fd23668
Tweaking code
larsll Sep 22, 2022
6b9183d
Merge pull request #101 from aws-deepracer-community/minio-cred
Lacan82 Sep 22, 2022
0c5a2f5
Create dr-aws
larsll Sep 24, 2022
b32a969
Rename to dr-local-aws
larsll Sep 24, 2022
7f92532
Update dependencies.json
larsll Oct 1, 2022
2ccbd73
Merge pull request #96 from aws-deepracer-community/dev
larsll Oct 1, 2022
06f9ebd
Isolate Robomaker in Evalulation
larsll Oct 2, 2022
17ae5d6
Merge branch 'master' of https://github.com/aws-deepracer-community/d…
larsll Oct 2, 2022
680192c
Option to upload to local S3
larsll Oct 3, 2022
44a53e2
Obstacle Type
larsll Oct 5, 2022
a2db4df
working tag before single drive xl implementation
mayurmadnani Oct 9, 2022
9e54afc
Update import-model.py
larsll Oct 13, 2022
dba95d2
Merge pull request #104 from aws-deepracer-community/obstacle-type
larsll Oct 20, 2022
e984aa9
Abort if path has spaces
larsll Oct 23, 2022
c0aa20f
Merge pull request #106 from aws-deepracer-community/bug-85
larsll Oct 23, 2022
4ea80b5
Simplify dependencies
larsll Oct 23, 2022
7d96184
Merge pull request #107 from aws-deepracer-community/fix-import
larsll Oct 23, 2022
8739ba6
Merge pull request #102 from mayurmadnani/master
larsll Nov 3, 2022
570da13
Workaround for minio
larsll Nov 3, 2022
d883a5d
Exclude non-local installs
larsll Nov 3, 2022
008d6e8
Added doc
larsll Nov 3, 2022
9a57119
Merge pull request #109 from aws-deepracer-community/minio-update
larsll Nov 4, 2022
03ea758
Robomaker 5.0.8 as default
larsll Nov 6, 2022
a0fc74f
Update README.md
larsll Nov 6, 2022
029aa66
Update reference
larsll Nov 6, 2022
9fea338
Enable externally mounted bundle in Robomaker (#105)
larsll Dec 3, 2022
e77a4a5
Viewer: Add 'Select' options for car, camera type and quality. (#110)
anjrew Dec 30, 2022
3a92a6b
Style fixes
larsll Dec 30, 2022
b096f83
Merge pull request #115 from aws-deepracer-community/viewer-update
larsll Dec 30, 2022
def7d50
Subnet fix
larsll Dec 30, 2022
9e70778
Update dependencies.json
larsll Dec 30, 2022
49de981
Merge pull request #116 from aws-deepracer-community/subnet-fix
larsll Dec 30, 2022
819e3da
Merge pull request #117 from aws-deepracer-community/robomaker-5.0.9
larsll Dec 31, 2022
ba94b97
Camera disable feature
larsll Dec 31, 2022
aef01ee
Updated dependency
larsll Dec 31, 2022
be43b6a
Support IAM role for EC2
larsll Jan 18, 2023
04b2060
Merge branch 'master' into camera-logic
larsll Jan 18, 2023
f05a517
Update .gitignore
larsll Jan 27, 2023
dba2ae3
Add reverse direction param
mattcamp Mar 2, 2023
765e770
Merge pull request #121 from aws-deepracer-community/matt/add_reverse…
larsll Mar 4, 2023
54d096a
Merge branch 'master' into camera-logic
larsll Mar 5, 2023
83a79ac
Robomaker 5.0.10
larsll Mar 5, 2023
f8fdf6e
Update increment script to enable -p model
vovikdrg Mar 10, 2023
c25e2c4
Merge pull request #122 from vovikdrg/patch-1
larsll Mar 11, 2023
8e17bae
Add BEST_MODEL_METRIC parameter
jochem725 Mar 13, 2023
5b7e898
Ignore custom scripts in root
larsll Mar 13, 2023
415e145
Merge branch 'master' into camera-logic
larsll Mar 14, 2023
ce95ff5
Add documentation for recently added parameters
jochem725 Mar 14, 2023
531cde7
Merge pull request #124 from aws-deepracer-community/feature/best-mod…
larsll Mar 15, 2023
013e854
Moving to 5.1
larsll Mar 15, 2023
5531ef5
Merge branch 'dev' into camera-logic
larsll Mar 15, 2023
991325a
Merge pull request #118 from aws-deepracer-community/camera-logic
larsll Mar 15, 2023
d5521d8
Constrain ROS IP
larsll Mar 24, 2023
1e64ef2
Merge branch 'dev' into watchdog
larsll Mar 24, 2023
5d2f433
Merge pull request #129 from aws-deepracer-community/watchdog
larsll Mar 25, 2023
6850fc1
Update dependencies.json
larsll Mar 25, 2023
005d23c
Merge pull request #125 from aws-deepracer-community/dev
larsll Mar 25, 2023
f513dad
Typo fix
larsll Mar 28, 2023
af1805a
Adding License
larsll Mar 30, 2023
9e68915
Merge pull request #130 from aws-deepracer-community/license
breadcentric Mar 30, 2023
6ac72fd
Enable reverse in multi-config
larsll May 1, 2023
dec9e50
Fix CUDA base image
larsll Jul 16, 2023
4fd7ade
Change reboot
larsll Oct 7, 2023
38ed156
Default is v5 Physics
larsll Oct 12, 2023
f4af8da
Update upload defaul model prefix
larsll Oct 12, 2023
a1624e5
Merge branch 'master' into workshop
larsll Oct 18, 2023
c8e3141
Merge pull request #142 from aws-deepracer-community/workshop
larsll Oct 31, 2023
c14eba3
Updated instructions
larsll Nov 11, 2023
acd6e66
Additional checks on startup.
larsll Nov 14, 2023
32a31b2
Merge pull request #144 from aws-deepracer-community/startup-checks
larsll Nov 14, 2023
09df3eb
Fix case if no models in AWS console
larsll Nov 17, 2023
4ffab70
Merge remote-tracking branch 'refs/remotes/upstream/master'
larsll Nov 17, 2023
dba42ac
Fix relative paths
larsll Nov 17, 2023
8aa765d
Changing Azure Mode (#145)
larsll Nov 18, 2023
19b8459
Changing defaults
larsll Nov 18, 2023
0b2d73b
Alternate way to start Xorg
larsll Nov 19, 2023
d64dc42
Add training prefix to CloudWatch log stream name (#148)
jochem725 Dec 21, 2023
81cb0eb
Version 5.1.1
larsll Jan 7, 2024
a6b2d9b
Update docker commands (#149)
larsll Jan 7, 2024
22efcad
Merge pull request #146 from aws-deepracer-community/alt-xorg
larsll Jan 7, 2024
e49d74d
Fix dr-logs-robomaker for compse style
larsll Jan 7, 2024
2d81a07
Fix container name for deepracer-analysis
larsll Jan 7, 2024
35355c4
Fix viewer stop script
larsll Jan 9, 2024
bdfbe96
Linting bash
larsll Jan 13, 2024
19a10d7
Improved documentation on OpenGL
larsll Jan 24, 2024
1862b8b
Merge branch 'master' into bash-lint
larsll Jan 24, 2024
aac4d86
Removed unclarity
larsll Jan 24, 2024
831dc30
Merge pull request #150 from aws-deepracer-community/bash-lint
larsll Jan 25, 2024
8d87c7a
Max Steps per Iteration (#152)
larsll Jan 27, 2024
f2661c3
Disable multi-worker when only 1 worker
larsll Jan 28, 2024
2d32785
Tuning Xorg start script (#151)
larsll Jan 31, 2024
ae07b42
Remove use of apt-key
larsll Mar 9, 2024
c495aa0
Pass AWS_REGION into rl_coach
larsll Mar 9, 2024
ae569a1
Merge pull request #156 from aws-deepracer-community/apt-key-fix
larsll Mar 9, 2024
59ed9e9
Updates for 5.2 and Improvements (#154)
larsll Mar 9, 2024
2a67ef2
Fix casting of int
larsll Mar 10, 2024
908a05e
Revert new metrics structure
larsll Mar 10, 2024
d2bdadd
Merge pull request #157 from aws-deepracer-community/app-region
MarkitectRoss Mar 12, 2024
fa942ce
New syntax for swarm
larsll Mar 24, 2024
1c115ba
Revert "New syntax for swarm"
larsll Mar 24, 2024
d4efe3d
Enable different BODY_SHELL_TYPE in Multi Config
larsll Apr 1, 2024
10b8483
Update Documentation to Provide Alternative Solution for SageMaker Er…
CoulterStutz Apr 2, 2024
2daf796
Improved Installation / Prepare Script (#160)
larsll Apr 7, 2024
b99ca92
Additional tweak for non-standard-region (#162)
larsll Apr 7, 2024
ae6419f
Sample countinous Action Space
larsll Apr 9, 2024
a019348
Allow for individual camera control
larsll Apr 9, 2024
12832da
Add Telegraf/InfluxDB/Grafana compose stack for recording InfluxDB me…
larsll May 1, 2024
e7c3505
nividia-driver-550 for Ubuntu22.04 (#167)
MarkitectRoss May 3, 2024
573db00
Fix inconsistent naming
larsll May 9, 2024
f10049a
revert gpu from 550 to 535
MarkitectRoss May 9, 2024
87af033
Merge pull request #171 from aws-deepracer-community/bugfix-revertgpu
MarkitectRoss May 9, 2024
7441fb7
550 drivers and additional docker var for xorg
MarkitectRoss May 9, 2024
dc34add
Merge pull request #173 from aws-deepracer-community/feature/ubutnu22…
larsll May 11, 2024
a50ba36
conditional vars for AWS
MarkitectRoss Jun 21, 2024
9f0c41c
Merge pull request #178 from aws-deepracer-community/bugfix/condition…
larsll Jun 21, 2024
1755059
Combined Image (#176)
larsll Jul 6, 2024
061b1a6
Fix swarm init (#177)
larsll Jul 6, 2024
d77072a
Exit code fix
larsll Jul 6, 2024
12a7cbf
Robomaker command default value
larsll Jul 6, 2024
5a5ebfc
Adding WSL2 OpenGL support (#181)
larsll Jul 7, 2024
f16a6e1
Cron-compatible evaluation script
larsll Jul 7, 2024
ff0583d
Merge branch 'master' into dev
larsll Jul 7, 2024
2528ca4
Add upload script
larsll Jul 8, 2024
f28f28c
Merge remote-tracking branch 'upstream/master'
larsll Jul 8, 2024
addfe0d
Merge remote-tracking branch 'upstream/master' into dev
larsll Jul 8, 2024
1770afe
Pass Telegraf Variables to RL-Coach
larsll Jul 12, 2024
9a4ffa1
Add params for KVS overlay and sagemaker metrics (#179)
mattcamp Jul 13, 2024
7927efd
Ensure OpenGL works
larsll Jul 14, 2024
d7d056d
Add flags to enable KVS extra overlay (#184)
mattcamp Jul 15, 2024
b8ca8ff
Install fixes
larsll Jul 15, 2024
fb67e3b
Merge remote-tracking branch 'upstream/dev' into dev
larsll Jul 15, 2024
a46ef50
Improved help if DR_SIMAPP_SOURCE and VERSION not defined
larsll Jul 16, 2024
22da1f8
Version 5.3.1
larsll Jul 16, 2024
7ca8e5e
Merge pull request #180 from aws-deepracer-community/dev
larsll Jul 16, 2024
62afe9b
Fix WSL2 package name
larsll Jul 20, 2024
d236c1a
Update README.md
larsll Jul 20, 2024
c83949e
feature/grafana-entropy (#187)
MarkitectRoss Sep 20, 2024
3ece04b
physical car upload fix for combined image (#188)
MarkitectRoss Oct 1, 2024
ba1e55d
Version 5.3.2 (#189)
MarkitectRoss Oct 8, 2024
6d7b71d
Upload counter (#191)
larsll Nov 10, 2024
e8b28a4
Utility to download car models from S3
larsll Nov 16, 2024
31ef7e7
Fixes
larsll Nov 16, 2024
f72f085
Option to create car file
larsll Nov 17, 2024
95ad16d
Provide output_folder argument
larsll Nov 23, 2024
78c8b9e
Stop training via cron
larsll Nov 24, 2024
3802808
Update README.md
larsll Dec 11, 2024
31a0229
Fixing viewer/start with correct ip (#193)
pykler Dec 11, 2024
bb1b168
Improve handling of newer docker
larsll Dec 22, 2024
378b3b3
Merge remote-tracking branch 'origin/master'
larsll Dec 22, 2024
e9d042c
Add screen
larsll Dec 22, 2024
23ef932
Fix stop code
larsll Dec 22, 2024
bc2339c
Improve mounting of scripts
larsll Dec 22, 2024
29591f6
Add detach flag for Docker > 24
larsll Dec 22, 2024
1539c58
Fix warning
larsll Jan 23, 2025
77e326f
Simapp Version 5.3.3
larsll Jan 25, 2025
cb6a3f6
Updated prepare
larsll Aug 24, 2025
c49143a
More tweaks to make more generic
larsll Aug 24, 2025
2799e12
Refactor GPU detection logic in init.sh
ys-67 Nov 30, 2025
fb824f8
ROS2 container compatibility
larsll Feb 5, 2026
7928626
Improve viewer HTML/JS (#198)
larsll Feb 6, 2026
986a888
Merge branch 'master' into ros2
larsll Feb 6, 2026
82c76d4
Update supported Ubuntu versions in README
larsll Feb 6, 2026
1b4f793
Fix debug reward function for ROS2
larsll Feb 8, 2026
011cedc
Fix default track
larsll Feb 8, 2026
4d3f973
RL Coach environment change
larsll Feb 8, 2026
63999f3
Display logs with VSCode
larsll Feb 8, 2026
8a2ca5b
Fix versions
larsll Feb 9, 2026
e650e02
Prepare bugfix
larsll Feb 9, 2026
956f386
Update check container
larsll Feb 9, 2026
9cf7656
Use base for detection
larsll Feb 10, 2026
5dbd2a6
Change way to get region
larsll Feb 10, 2026
42d3f49
Merge branch 'master' into ros2
larsll Feb 10, 2026
207497e
Additional robustness
larsll Feb 13, 2026
ac788d1
Merge branch 'master' into ros2
larsll Feb 13, 2026
379f9d9
Python3 env change
larsll Feb 14, 2026
3c13fc7
Add Rendering Engine
larsll Feb 16, 2026
f78ee04
Select Gazebo render engine
larsll Mar 3, 2026
cc440c2
Remove Console import
larsll Mar 3, 2026
ea2e49d
Merge pull request #197 from ys-67/master
larsll Mar 3, 2026
f1faa89
Change image to match the one used in simapp 6
larsll Mar 3, 2026
277bbf0
Remove unnecessary file.
larsll Mar 3, 2026
b9230f7
Updated documentation
larsll Mar 3, 2026
9aa0fae
Merge pull request #200 from aws-deepracer-community/ros2
larsll Mar 3, 2026
d480b8a
Move to 6.0.1
larsll Mar 8, 2026
fc04590
Move to version 6.0.2
larsll Mar 12, 2026
cd185b3
Merge pull request #201 from aws-deepracer-community/v6.0.2
larsll Mar 12, 2026
4eb428d
Fix version
larsll Mar 12, 2026
151cd7e
Fix log-analysis AWS credentials
larsll Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@

aws-deepracer-workshops/

deepracer/

.vscode/
custom_files/
logs/
docker/volumes/
recording/
recording
/*.env
/*.bak
/*.tar
/*.json
DONE
data/
tmp/
autorun.s3url
nohup.out
/*.sh
_
14 changes: 14 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright 2019-2023 AWS DeepRacer Community. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
269 changes: 52 additions & 217 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,235 +1,70 @@
# DeepRacer-For-Dummies
Provides a quick and easy way to get up and running with a local deepracer training environment using Docker Compose.
This repo just creates a wrapper around the amazing work done by Chris found here: https://github.com/crr0004/deepracer
Please refer to his repo to understand more about what's going on under the covers.
# DeepRacer-For-Cloud
Provides a quick and easy way to get up and running with a DeepRacer training environment using a cloud virtual machine or a local compter, such [AWS EC2 Accelerated Computing instances](https://aws.amazon.com/ec2/instance-types/?nc1=h_ls#Accelerated_Computing) or the Azure [N-Series Virtual Machines](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-gpu).

# Video Instructions
[![Video Instructions](https://img.youtube.com/vi/CFNcKmtVRSI/0.jpg)](https://www.youtube.com/watch?v=CFNcKmtVRSI)
DRfC runs on Ubuntu 22.04 and 24.04. GPU acceleration requires a NVIDIA GPU, preferrably with more than 8GB of VRAM.

# Getting Started
## Introduction

---
#### Prerequisites
DeepRacer-For-Cloud (DRfC) started as an extension of the work done by Alex (https://github.com/alexschultz/deepracer-for-dummies), which is again a wrapper around the amazing work done by Chris (https://github.com/crr0004/deepracer). With the introduction of the second generation Deepracer Console the repository has been split up. This repository contains the scripts needed to *run* the training, but depends on Docker Hub to provide pre-built docker images. All the under-the-hood building capabilities are in the [Deepracer Simapp](https://github.com/aws-deepracer-community/deepracer-simapp) repository.

* This project is specifically built to run on Ubuntu 18.04 with an **Nvidia GPU**. It is assumed you already have **CUDA/CUDNN** installed and configured.
As if December 2025 the original DeepRacer service in the AWS console is no longer available, and is replaced by [DeepRacer-on-AWS](https://aws.amazon.com/solutions/implementations/deepracer-on-aws/) which you can install in your own AWS environment. DeepRacer-For-Cloud is independent of any AWS service, so it is not directly impacted by this change.

* You also need to have **Docker** installed as well as the **Nvidia-Docker** runtime.
## Main Features

* You should have an AWS account with the **AWS cli** installed. The credentials should be located in your home directory (~/.aws/credentials)
DRfC supports a wide set of features to ensure that you can focus on creating the best model:
* User-friendly
* Based on the continously updated community [Robomaker](https://github.com/aws-deepracer-community/deepracer-simapp) container, supporting a wide range of CPU and GPU setups.
* Wide set of scripts (`dr-*`) enables effortless training.
* Detection of your AWS DeepRacer Console models; allows upload of a locally trained model to any of them.
* Modes
* Time Trial
* Object Avoidance
* Head-to-Bot
* Training
* Multiple Robomaker instances per Sagemaker (N:1) to improve training progress.
* Multiple training sessions in parallel - each being (N:1) if hardware supports it - to test out things in parallel.
* Connect multiple nodes together (Swarm-mode only) to combine the powers of multiple computers/instances.
* Evaluation
* Evaluate independently from training.
* Save evaluation run to MP4 file in S3.
* Logging
* Training metrics and trace files are stored to S3.
* Optional integration with AWS CloudWatch.
* Optional exposure of Robomaker internal log-files.
* Technology
* Supports both Docker Swarm (used for connecting multiple nodes together) and Docker Compose

* ensure you have **vncviewer** installed
## Tech Stack

#### NOTE: If you already have these prerequisites setup then you can simply run the init.sh script described in the **Initialization** section. If you are setting everything up for the first time, then the information provided here can help you to get your environment ready to use this repo.
DRfC is built on top of the [AWS DeepRacer Simapp](https://github.com/aws-deepracer-community/deepracer-simapp) — a single Docker image used for three purposes:

* **Robomaker** — one or more containers providing robotics simulation via ROS and Gazebo
* **Sagemaker** — container running the model training job
* **RL Coach** — container that bootstraps the Sagemaker container using the Sagemaker SDK and Sagemaker Local

#### Local Environment Setup
### Core Technologies

If you are running Windows and would like to use this repo, you will need to modify the process to get everything to run on Windows (not recommended as you will not be able to take advantage of the GPU during training) Many users have found it useful to dual-boot (Windows/Linux). There are many tutorials online for how to do this. You can follow the instructions provided below as guidance.
| Component | Version |
|-----------|---------|
| Ubuntu | 24.04 |
| Python | 3.12 |
| TensorFlow | 2.20 |
| CUDA | 12.6 (GPU only) |
| Redis | 8.0.4 |
| ROS | 2 Jazzy |
| Gazebo | Harmonic |

##### * Installing Ubuntu 18.04 with Windows 10
### Images

https://medium.com/bigdatarepublic/dual-boot-windows-and-linux-aa281c3c01f9
Pre-built images are available on [Docker Hub](https://hub.docker.com/repository/docker/awsdeepracercommunity/deepracer-simapp) as `awsdeepracercommunity/deepracer-simapp:<VERSION>-cpu` (CPU) and `awsdeepracercommunity/deepracer-simapp:<VERSION>-gpu` (CUDA GPU). Both support OpenGL acceleration.

When it gets to the Disk Management part, to make space for your Ubuntu installation, followed this guide and specifically look at the 2nd method (MiniTool Partition Wizard):
During installation DRfC will automatically pull the latest image based on whether you have a GPU or CPU installation.

https://win10faq.com/shrink-partition-windows-10/?source=post_page---------------------------
## Documentation

=======
##### * Installing the AWS CLI
Full documentation can be found on the [Deepracer-for-Cloud GitHub Pages](https://aws-deepracer-community.github.io/deepracer-for-cloud).

pip install -U awscli

Then Follow this: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
## Support

##### * Installing Docker-ce (steps from https://docs.docker.com/install/linux/docker-ce/ubuntu/ )

sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Verify docker works

sudo docker run hello-world

##### 3. Installing Docker-compose (from https://docs.docker.com/compose/install/#install-compose )

curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Verify installation

docker-compose --version

###### NOTE: You can also choose to install docker-compose via another package manager (i.e. pip or conda), but if you do, make sure to do so in a virtual env. Many OS’s have python system packages that conflict with docker-compose dependencies. ######

Additionally, make sure your user-id can run docker without sudo (from https://docs.docker.com/install/linux/linux-postinstall/ )

sudo groupadd docker
sudo usermod -aG docker $USER

Log out and log back in so that your group membership is re-evaluated.

And configure Docker to start on boot.

sudo systemctl enable docker

##### * Preparing for nvidia-docker

The NVIDIA Container Toolkit allows users to build and run GPU accelerated Docker containers.
Nvidia-docker essentially exposes the GPU to the containers to use: https://github.com/NVIDIA/nvidia-docker

You may want to note what you have installed currently.

sudo apt list --installed | grep nvidia

Then prepare for clean installation of Nvidia drivers.

sudo apt-get purge nvidia*

##### Installing nvidia-docker runtime (from https://github.com/NVIDIA/nvidia-docker/wiki/Installation-(version-2.0) )

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install nvidia-docker2
sudo pkill -SIGHUP dockerd

##### * Installing the proper nvidia drivers

Check for driver version here according to your GPU(s): https://www.nvidia.com/Download/index.aspx?lang=en-us
In the dropdown for OS, choose “show all OS’s” to see if there are Ubuntu specific choices. Otherwise choose Linux.
If you get a dropdown for “cuda toolkit”, choose 10.0)

sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt install nvidia-driver-410 && sudo reboot

###### NOTE: 410 is a driver version that is compatible with the GPU I selected on the Nvidia website. ######

Verify the driver installation:

nvidia-smi
nvcc --version

##### * Installing VNC viewer on your local machine

This doc is straight forward: https://www.techspot.com/downloads/5760-vnc-viewer.html

##### * Installing the Nvidia deep learning libraries (CUDA/CUDNN) for GPU hardware:

This guide goes through how to install CUDA & CUDNN : https://medium.com/@zhanwenchen/install-cuda-and-cudnn-for-tensorflow-gpu-on-ubuntu-79306e4ac04e

###### NOTE: You can apparently use Anaconda instead to install CUDA/CUDNN. I have not tried this, however some users have and have reported that this method is much easier. If you use this approach, you will need to first install Anaconda. Once installed you can then use the conda package manager to install the desired versions of CUDA and cuDNN. The following installation configuration has been reported to work together successfully ######

##### Downloading Anaconda

sudo apt-get update -y && sudo apt-get upgrade -y
cd /tmp/
sudo wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh

##### Installing Anaconda

bash Anaconda3-2019.03-Linux-x86_64.sh
"yes" for using the default directory location
“yes” for running conda init

##### Activating Anaconda

source ~/.bashrc

##### Verifying the conda package manager works

conda list

##### Installing CUDA/CUDNN

conda install cudnn==7.3.1 && conda install -c fragcolor cuda10.0


#### Initialization (After all prerequisites have been installed)


##### 11. Run Init.sh from this repo (refer to the rest of this doc for script details)

In a command prompt, simply run "./init.sh".
This will set everything up so you can run the deepracer local training environment.


**init.sh** performs these steps so you don't have to do them manually:
1. Clones Chris's repo: https://github.com/crr0004/deepracer.git
2. Does a mkdir -p ~/.sagemaker && cp config.yaml ~/.sagemaker
3. Sets the image name in rl_deepracer_coach_robomaker.py to "crr0004/sagemaker-rl-tensorflow:nvidia”
4. Also sets the instance_type in rl_deepracer_coach_robomaker.py to “local_gpu”
5. Copies the reward.py and model-metadata files into your Minio bucket


To start or stop the local deepracer training, use the scripts found in the scripts directory.

Here is a brief overview of the available scripts:

#### Scripts

* training
* start.sh
* starts the whole environment using docker compose
* it will also open a terminal window where you can monitor the log output from the sagemaker training directory
* it will also automatically open vncviewer so you can watch the training happening in Gazebo
* stop.sh
* stops the whole environment
* automatically finds and stops the training container which was started from the sagemaker container
* upload-snapshot.sh
* uploads a specific snapshot to S3 in AWS. If no checkpoint is provided, it attempts to retrieve the latest snapshot
* set-last-run-to-pretrained.sh
* renames the last training run directory from ***rl-deepracer-sagemaker*** to ***rl-deepracer-pretrained*** so that you can use it as a starting point for a new training run.
* delete-last-run.sh
* (WARNING: this script deletes files on your system. I take no responsibility for any resulting actions by running this script. Please look at what the script is doing before running it so that you understand)
* deletes the last training run including all of the snapshots and log files. You will need sudo to run this command.


* evaluation
* start.sh
* starts the whole environment using docker compose to run an evaluation run
* it will also open a terminal window where you can monitor the log output from the sagemaker training directory
* it will also automatically open vncviewer so you can watch the training happening in Gazebo
* stop.sh
* stops the whole environment
* automatically finds and stops the training container which was started from the sagemaker container

* log-analysis
* start.sh
* starts a container with Nvidia-Docker running jupyter labs with the log analysis notebooks which were originally provided by AWS and then extended by Tomasz Ptak
* the logs from robomaker are automatically mounted in the container so you don't have to move any files around
* in order to get to the container, look at the log output from when it starts. You need to grab the URL including the token query parameter and then paste it into the brower at **localhost:8888**.
* stop.sh
* stops the log-analysis container


#### Hyperparameters

You can modify training hyperparameters from the file **rl_deepracer_coach_robomaker.py**.

#### Action Space & Reward Function

The action-space and reward function files are located in the **deepracer-for-dummies/docker/volumes/minio/bucket/custom_files** directory

#### Track Selection

The track selection is controled via an environment variable in the **.env** file located in the **deepracer-for-dummies/docker** directory
* For general support it is suggested to join the [AWS DeepRacing Community](https://deepracing.io/). The Community Slack has a channel #dr-training-local where the community provides active support.
* Create a GitHub issue if you find an actual code issue, or where updates to documentation would be required.
Loading