scripts/Docker/readme.md
This tutorial aim is to provide instructions for installation and use of Librealsense Docker. Current version of the docker includes the following capabilities:
It does not include (may be enabled later on):
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
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 .