This tutorial aim is to provide instructions for installation and use of Librealsense Docker. Current version of the docker includes the following capabilities:
- use of librealsense devices
- use of librealsense API
- installation of the basic examples for use of librealsense
It does not include (may be enabled later on):
- graphic examples
- use of IMU devices
This version of Intel® RealSense™ SDK 2.0 is modified to support FRAMOS D400e cameras. Please refer to the file librealsense2/scripts/Docker_FRAMOS/readme_d400e.md for instructions on how to install and use the docker with D400e cameras.
Install docker in the environemnt using the following tutorial (adjust for the OS): https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
- Ubuntu base system (Ubuntu 20.04 by default)
- librealsense-builder stage - builds the binaries and has all the build dependencies
- librealsense stage - contains only the built binaries and the required runtime dependencies (~60MB)
- Support for Python bindings (python not included) and networking
- Binaries are stripped from debug symbols during build stage to minimize image size
- Support scripts for building and running the image are also included
- Next steps - TODO: python version, openGL, self info to be printed
In order to use the built container by our latest Dockerfile, run the command:
docker pull librealsense/librealsense
This will pull librealsense docker saved in Docker Hub.
Please pay attention that librealsense Docker is available only for x86 at this stage.
Before running the container, make sure that when running the command: docker images
, the docker librealsense/librealsense appears.
Then, the container can be ran by one of the following ways:
Remark: In each of the alternative ways, the aim of the lines:
--device-cgroup-rule "c 81:* rmw" \ --device-cgroup-rule "c 189:* rmw" \
is to grant access for the docker to the USB and UVC resources of the host PC (needed to use realsense devices).
-
Running the container with default command:
docker run -it --rm \ -v /dev:/dev \ --device-cgroup-rule "c 81:* rmw" \ --device-cgroup-rule "c 189:* rmw" \ librealsense/librealsense
The default command that will run is:
rs-enumerate-devices --compact
-
In order to run some arbitrary command (run of the rs-depth demo in the following example), one can run for example:
docker run -it --rm \ -v /dev:/dev \ --device-cgroup-rule "c 81:* rmw" \ --device-cgroup-rule "c 189:* rmw" \ librealsense/librealsense rs-depth
Then, the realsense depth will be displayed as in the following video:
-
Use the following command in order to interact with the Docker via shell interface:
docker run -it --rm \ -v /dev:/dev \ --device-cgroup-rule "c 81:* rmw" \ --device-cgroup-rule "c 189:* rmw" \ librealsense/librealsense /bin/bash
The librealsense's docker image can be built locally using the Dockerfile. This is done by running the image building script - run it in the following way:
./build_image.sh
Then, running the container is done as described above .