Skip to content

Install with Docker

cambel edited this page Feb 9, 2021 · 1 revision

Install basic dependencies and tools

 sudo apt-get install git htop vim curl bindfs

Install docker

Ubuntu 16.04 or 18.04

 sudo apt-get install 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 "deb [arch=amd64] https://download.docker.com/linux/ubuntu  $(lsb_release -cs)  stable" 
 sudo apt-get update
 sudo apt-get install docker-ce

Fix docker permissions

 sudo groupadd docker
 sudo usermod -aG docker $USER
 newgrp docker 

may require log out to recognize permissions

Install nvidia-docker

 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 && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2
 sudo systemctl restart docker

Clone this repo

$ git clone https://github.com/cambel/ur_openai_gym

Build the dockerfile image

 cd ur3
 docker build -t ros-ur3 .

If everything builds right, use the launch_docker.sh script to start the environment

bash launch_docker.sh

Then enter the docker environment on each new terminal using the command

docker exec -it ros-ur3 bash
Clone this wiki locally