This repository is used to create a Docker image with Webots already pre-installed. To use the already available image please follow the Webots installation instructions.
Use the following command to build the docker container from the Dockerfile:
docker build . --file dockerfiles/Dockerfile.nvidia --tag cyberbotics/webots:latest --build-arg BASE_IMAGE=nvidia/cuda:11.8.0-base-ubuntu22.04 --build-arg WEBOTS_VERSION=R2023b --build-arg WEBOTS_PACKAGE_PREFIX=_ubuntu-22.04
Use the following command to build the docker container from the Dockerfile Webots Cloud:
docker build . --file dockerfiles/Dockerfile.cloud --tag cyberbotics/webots.cloud:latest --build-arg BASE_IMAGE=cyberbotics/webots:latest --build-arg WEBOTS_VERSION=R2023b
docker run --gpus=all -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix cyberbotics/webots:latest webots --stdout --stderr --batch --mode=realtime
docker run --gpus=all -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix cyberbotics/webots:latest /bin/bash
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix cyberbotics/webots:latest /bin/bash
You can run the following command to remove all temporary images:
docker system prune