run_demo.bash 562 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. # Runs a docker container with the image created by build_demo.bash
  3. # Requires
  4. # docker
  5. # nvidia-docker2
  6. # an X server
  7. # Recommended
  8. # A joystick mounted to /dev/input/js0 or /dev/input/js1
  9. until nvidia-docker ps
  10. do
  11. echo "Waiting for docker server"
  12. sleep 1
  13. done
  14. mkdir -p /tmp/car_demo_rocker_venv
  15. python3 -m venv /tmp/car_demo_rocker_venv
  16. . /tmp/car_demo_rocker_venv/bin/activate
  17. pip install -U git+https://github.com/osrf/rocker.git
  18. rocker --nvidia --user --exec --devices /dev/input/js0 /dev/input/js1 -- osrf/car_demo