-
Update your package index:
sudo apt-get update
-
Install necessary packages:
sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release
-
Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
-
Set up the stable repository:
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
-
Update the package index again:
sudo apt-get update
-
Install Docker Engine:
sudo apt-get install docker-ce docker-ce-cli containerd.io
-
Verify the Docker installation:
sudo docker run hello-world
- Docker installed (see above)
- NVIDIA driver installed on your system
-
Add the package repositories:
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 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
-
Install the
nvidia-docker2
package:sudo apt-get install -y nvidia-docker2
-
Restart the Docker daemon to complete the installation:
sudo systemctl restart docker
-
Test the installation with a CUDA container:
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
docker pull luckydogry/openpilot:1.0
- Start the CARLA simulator(0.9.13) by downloading and running the simulator:
./CarlaUE4.sh
- Start the docker by running:
./launch_openpilot_docker.sh
- Launch the openpilot by running the following command inside the docker:
cd /home/batman/openpilot/tools/sim && ./launch_openpilot.sh
- Launchu the openpilot_bridge by running:
docker exec openpilot_client /bin/bash -c 'cd /home/batman/openpilot/tools/sim && ./bridge.py --town {town} --spawn_location \'{location}\' --auto-engage >/dev/null \'&"
The location and town parameters should be formatted as '147,-371,2,0,0,0', "Town04."
- Wait for 10 seconds, and the simulation should start.