-
Notifications
You must be signed in to change notification settings - Fork 4
How to start the training
Running this stack requires you to open multiple terminal windows. If you are using local machine, you are fine. If you are using SSH to access remote machine, I recommend you to use tmux
to create multiple session
This guide is for Ubuntu Linux. There may be some difference for other OS
-
Clone the repository
cd ~ git clone https://github.com/richardfan1126/deepracer.git cd deepracer git checkout -b 2020_version origin/2020_version git submodule update --init --recursive
-
Install Minio
cd ~ wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio sudo mv minio /usr/local/bin/
-
Setup virtualenv / Create required folders
cd ~ sudo apt update sudo apt install -y virtualenv python3 virtualenv --python=python3 venv source ~/venv/bin/activate cd deepracer/ pip install PyYAML==3.11 pip install urllib3==1.21.1 pip install -U sagemaker-python-sdk/ awscli ipython pandas cd ~ mkdir ~/data deactivate
-
Install Docker
cd ~ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install -y docker-ce sudo usermod -aG docker $USER
After installing, logout from the current user, or exit from SSH session and re-login
-
Pull docker images
docker pull richardfan1126/sagemaker-rl-tensorflow:console_v2.0 docker pull richardfan1126/deepracer_robomaker:console_v2.0
-
Setup Minio
-
Open a new terminal window, or new
tmux
session if you are using SSHcd ~ minio server data/
Markdown the
AccessKey
andSecretKey
shown, and exit from the current session (Make sure you are not terminating the session. Keep Minio running on background) -
Put
AccessKey
andSecretKey
into config files~/deepracer/rl_coach/env.sh
~/deepracer/robomaker.env
-
Create a new bucket
-
Open browser, and go to
http://<machine_ip>:9000
-
Use the
AccessKey
andSecretKey
to login -
Click the button on the bottom right corner and click
Create bucket
-
Name the bucket
bucket
, then pressEnter
-
Close the browser, you don't need it anymore
-
-
Copy pre-defined custom files into the bucket
Go back to the terminal
cp -r ~/deepracer/custom_files/ ~/data/bucket/
-
-
Start Minio (If you haven't started during setup)
-
Open a new terminal window, or new
tmux
session if you are using SSHcd ~ minio server data/
-
Exit from the current session (Make sure you are not terminating the session. Keep Minio running on background)
-
-
Start SageMaker
-
Open a new terminal window, or new
tmux
session if you are using SSHsource ~/venv/bin/activate cd ~/deepracer/rl_coach/ source env.sh ipython rl_deepracer_coach_robomaker.py
-
Exit from the current session (Make sure you are not terminating the session. Keep SageMaker running on background)
-
-
Start RoboMaker
-
Write machine IP into environment variable (Only for the first time)
echo "S3_ENDPOINT_URL=http://$(hostname -I | cut -d' ' -f1):9000" >> ~/deepracer/robomaker.env
-
Open a new terminal window, or new
tmux
session if you are using SSHsource ~/venv/bin/activate cd ~/deepracer/ docker run --rm --name dr --env-file ./robomaker.env -v $(pwd)/simulation/aws-robomaker-sample-application-deepracer/simulation_ws/src:/app/robomaker-deepracer/simulation_ws/src --network sagemaker-local -p 8080:5900 -it richardfan1126/deepracer_robomaker:console_v2.0
-
Exit from the current session (Make sure you are not terminating the session. Keep RoboMaker running on background)
-