mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-25 10:03:52 +08:00
* squash #24009 * Fix from other pr Add low-quality arg * Update tools/sim/test/test_carla_integration.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Updates for comments. Not finished yet * commit * fix arguments * Final changes for comments * Final fixes * increase carla client timeout to 10 * make test executable * actually wait for controlsd to send messages * Error proof test. Starting up carla at each test and closing down using docker (tried many things). * commit test carla * Removed some time.sleeps Add some more retries for bridge. * Stop while loop on shutdown * Increase teardown waiting time Co-authored-by: Willem Melching <willem.melching@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Requires nvidia docker - https://github.com/NVIDIA/nvidia-docker
|
|
if ! $(apt list --installed | grep -q nvidia-container-toolkit); then
|
|
read -p "Nvidia docker is required. Do you want to install it now? (y/n)";
|
|
if [ "${REPLY}" == "y" ]; then
|
|
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
|
|
echo $distribution
|
|
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 -y nvidia-docker2 # Also installs docker-ce and nvidia-container-toolkit
|
|
sudo systemctl restart docker
|
|
else
|
|
exit 0
|
|
fi
|
|
fi
|
|
|
|
docker pull carlasim/carla:0.9.12
|
|
|
|
docker run \
|
|
--name carla_sim \
|
|
--rm \
|
|
--gpus all \
|
|
--net=host \
|
|
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
|
|
-it \
|
|
carlasim/carla:0.9.12 \
|
|
/bin/bash ./CarlaUE4.sh -opengl -nosound -RenderOffScreen -benchmark -fps=20 -quality-level=High
|