forked from aws-deepracer-community/deepracer-for-cloud
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.sh
executable file
·30 lines (21 loc) · 1.46 KB
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# create directory structure for docker volumes
mkdir -p docker/volumes/minio/bucket/custom_files \
docker/volumes/robo/checkpoint
# create symlink to current user's home .aws directory
# NOTE: AWS cli must be installed for this to work
# https://docs.aws.amazon.com/cli/latest/userguide/install-linux-al2017.html
ln -s $(eval echo "~${USER}")/.aws docker/volumes/
# grab local training deepracer repo from crr0004 and log analysis repo from vreadcentric
git clone --recurse-submodules https://github.com/crr0004/deepracer.git
git clone https://github.com/breadcentric/aws-deepracer-workshops.git && cd aws-deepracer-workshops && git checkout enhance-log-analysis && cd ..
ln -s ../../aws-deepracer-workshops/log-analysis ./docker/volumes/log-analysis
# setup symlink to rl-coach config file
ln -s deepracer/rl_coach/rl_deepracer_coach_robomaker.py rl_deepracer_coach_robomaker.py
# replace the contents of the rl_deepracer_coach_robomaker.py file with the gpu specific version (this is also where you can edit the hyperparameters)
# TODO this file should be genrated from a gui before running training
cat overrides/rl_deepracer_coach_robomaker.py > rl_deepracer_coach_robomaker.py
# build rl-coach image with latest code from crr0004's repo
docker build -f ./docker/dockerfiles/rl_coach/Dockerfile -t aschu/rl_coach deepracer/
# copy reward function and model-metadata files to bucket
cp deepracer/custom_files/* docker/volumes/minio/bucket/custom_files/