Giter VIP home page Giter VIP logo

webots-docker's Introduction

Webots-Docker

Dockerhub Test Docker Image CI

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.

Build the Image

Use the following command to build the docker container from the Dockerfile:

docker build . --file Dockerfile --tag cyberbotics/webots:latest --build-arg WEBOTS_PACKAGE_PREFIX=_ubuntu-22.04

Build the Webots.Cloud Images

Use the following command to build the docker container from the Dockerfile_webots_cloud:

docker build . --file Dockerfile_webots_cloud --tag cyberbotics/webots.cloud:latest

Run a Docker container from the Image

You can run the previously built image with:

docker run -it cyberbotics/webots:latest /bin/bash

Clean the temporary Images

You can run the following command to remove all temporary images:

docker system prune

webots-docker's People

Contributors

davidmansolino avatar jean-eudes-le-retour avatar lukicdarkoo avatar omichel avatar ygoumaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webots-docker's Issues

Card Driver Not See

Screenshot from 2023-11-04 15-32-32

x@harunkurt-dev:~/opensource$ docker run -it --rm \
    --net=host \
    --env="DISPLAY" \
    --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
    cyberbotics/webots:latest /bin/bash
root@harunkurt-dev:/usr/local# export QT_X11_NO_MITSHM=1
webots
MESA: error: Failed to query drm device.
libGL error: glx: failed to create dri3 screen
libGL error: failed to load driver: iris
libGL error: failed to open /dev/dri/card0: No such file or directory
libGL error: failed to load driver: iris

Devcontainer over Vscode

How logical would it be to produce a study that will support vscode with a devcontainer study?

devcontainer will directly support our controllers, world and proto files that we wrote, and will also bring support such as ros and ros2.

/usr/local/webots/bin/webots-bin: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory

Hello,

I am encountering an issue while trying to run Webots using the Docker image cyberbotics/webots:R2023a-ubuntu20.04. When I attempt to start Webots, I receive the following error message:

/usr/local/webots/bin/webots-bin: error while loading shared libraries: libQt6Core.so.6: cannot open shared object file: No such file or directory

I cannot install anything on the system as I am using High Performance PC over SSH. The High Performance PC specifications are

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

For reference, here is my complete Singularity container code.


Bootstrap: docker
#FROM: cyberbotics/webots:R2023a-ubuntu20.04
FROM: cyberbotics/webots:latest


%environment
    export SINGULARITY_GEOGRAPHIC_AREA=Europe/London
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    export LANGUAGE=en_US.UTF-8
    export LD_LIBRARY_PATH=/usr/local/webots/lib/webots:$LD_LIBRARY_PATH


%files
    /user/home/yf23868/SafeAIControlledDrones /home/workspace/

%post
   
    apt-get -y update
    apt-get -y upgrade
    apt-get install -y fuse2fs
    apt-get install -y apt-utils
    apt-get install -y wget
    apt-get install -y python3-pip python3-dev
    apt-get update && apt-get install -y git


    # Set locale to en_US.UTF-8
    apt-get install -y locales
    locale-gen en_US.UTF-8
    update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
   
    # Install dependencies
    apt-get install -y python3-pip
    apt-get install -y libgl1-mesa-glx  # For GUI applications
    apt install -y libcanberra-gtk-module libcanberra-gtk3-module
    apt-get install -y xvfb
    python3 -m pip install --upgrade pip

    # Install TensorFlow, Keras, Matplotlib, Gym
    #pip3 install tensorflow==2.4.1 keras==2.4.3 matplotlib==3.4.2 gym==0.21
    
    pip3 install tensorflow==2.12.0 keras==2.12 matplotlib gym==0.25 imageio scipy
    pip3 install -i https://test.pypi.org/simple/ deepbots

    apt-get update && apt-get install -y python3
    #apt-get update --fix-missing

%runscript
    # Define the default behavior when running the container
    /bin/bash
    #exec /bin/bash
    #exec echo "The runscript is the containers default runtime command!"
    #exec python3 "$@"

Any help is highly appreciated. Thank you so much.

Reduce Image Size

You can reduce each layer size by deleting aptitude files at the end of each big RUN command with && rm -rf /var/lib/apt/lists/

Optimize Layering System

You can optimize docker layering system by concatenating a maximum of commands in a single RUN command

run webots,throw an error

屏幕截图 2021-07-08 222718
run docker ,then run command in /bin/bash : webots
throw an error: qt error.
Also I run the Dockfile command in Dock image 'ros melodic ubuntu18.04' , it also throw the same error. How to solve this error?

Error with 'undefined' node or PROTO in Webots R2023a

Hello Cyberbotics team,

I am currently encountering an issue with using certain PROTO files in Webots R2023a. The error messages I'm receiving indicate a problem with 'undefined' nodes or PROTOs and unknown base types. These errors occur with several PROTO files from the Webots library.

The specific error messages I'm encountering are as follows:

ERROR: Missing declaration for 'undefined', unknown node.
ERROR: Skipped unknown 'undefined' node or PROTO in several PROTO files including TexturedBackground.proto, TexturedBackgroundLight.proto, Parquetry.proto, Floor.proto, and SimpleBuilding.proto.

I'm using a simple file with EXTERNPROTO declarations as shown below:


#VRML_SIM R2023a utf8
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/floors/protos/Floor.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/appearances/protos/Parquetry.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/buildings/protos/SimpleBuilding.proto"
EXTERNPROTO "https://cyberbotics.com/doc/protos/Sensors/BumperSensor.proto"

Could you please help me understand the cause of these errors and suggest a solution? I am using Webots R2023a and have not made any significant changes to the base setup.

Thank you for your assistance!

Test suite failures on docker

These tests appear to be failing on a docker-run instance of webots, as can be seen here:

  • FAILURE with pen_mesh_scaled: The pixel (46,26) should not be gray at last step
  • FAILURE with distance_sensor_infra-red_vs_mesh: Distance sensor 'B' doesn't return the right distance when hitting an object
  • FAILURE with speaker: wb_speaker_is_speaking should return true when TTS is running.

Use of a smaller base image

I am wondering whether we should use a smaller base image for our docker as we don't need CUDA and we don't need the devel version since we embed a pre-compiled webots distribution.

nvidia/cudagl:11.4.2-devel-ubuntu20.04:

  • weights 2.95 GB
  • contains CUDA

nvidia/opengl:1.2-glvnd-runtime-ubuntu20.04:

  • weights 123 MB (about 24 times lighter!)

That would make the resulting image significantly lighter.

Note 1: In some rare cases, CUDA might be needed if some controllers use hardware accelerated machine learning libraries such as pytorch. However, in such cases, it would be better run Webots inside its own docker and the controllers in their own CUDA derived dockers.

Note 2: I suppose the -devel- version (137 MB) contains gcc, make, etc. which may be needed if we want to be able to recompile controllers. But this shouldn't be needed in case the controllers are running inside their own docker container. Thus the -runtime- version may be sufficient in this case. However currently, we often recompile the controller in the webots docker, so the -devel- version may be better until we separate the controllers and webots in different dockers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.