HowTo prepare a public docker agent for racing diyrobocars on Unity simulator to avoid high latency issues.
This version only works with version 4.x! Lidar is configured but does not work. Please see newest docker repo of Altex, as well!
- clone this repo & cd diyrobocars_docker_agent_pln
- set your teamname (to avoid conflicting container names on the Unity server) in https://github.com/connected-autonomous-mobility/diyrobocar_docker_agent_pln/blob/main/pln-docker-compose.yml
...
container_name: diyrobocars_agent0_teamname
...
- donkey createcar --path ./myrace
- add ./myrace/data/* into .gitignore
- adjust myconfig.py, please do not forget to set mode to "local", see example in race7/myconfig.py
WEB_INIT_MODE = "local"
- drive & train
- copy your model into ./myrace/models following docs.diyrobocars.com
- add your data in agent_pln.Dockerfile at the spot marked with arrows
COPY ./myrace /root/myrace
- adjust entrypoint in file pln-docker-compose.yml to call your model mymodel.h5
...
entrypoint: python3 /root/myrace/manage.py drive --model=/root/myrace/models/mymodel.h5
...
- add your user & docker image name in https://github.com/connected-autonomous-mobility/diyrobocar_docker_agent_pln/blob/main/pln-docker-compose.yml
...
image: yourusername/racexx:version_0.1
...
- add your user & docker image name in file runcar.sh
...
docker run -it --rm --network host \
yourusername/racexx:version_0.1\
bash -c "cd /root/myrace/ && $cmd_line"
...
This will create a docker image <yourusername/racexx:version_0.1> on your machine and start it.
./start_pln.sh
docker push yourusername/racexx:version_0.1
This will load your docker image <yourusername/racexx:version_0.1> on your or any machine (with docker installed) and start it.
./runcar.sh
docker exec -it diyrobocars_agent0_teamname bash
docker run --gpus all nvidia/cuda:10.1-base nvidia-smi
hint: use gpu 1