You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a Dockerfile for building a Docker image with ROS2 and the OpenVINO toolkit. The image is based on the `osrf/ros:humble-desktop` base image and includes additional tools and libraries for working with OpenVINO and librealsense.
- Network connection & correct proxy settings for downloading base images and dependencies
16
+
17
+
## Building the Docker Image
18
+
19
+
To build the Docker image, use the following command. You can specify the OpenVINO version using the `--build-arg` option. The default version is `2025.0.0`.
-i: Runs the container in interactive mode, keeping the standard input open.
81
+
-t: Allocates a pseudo-TTY, which is useful for interactive applications.
82
+
-d: Runs the container in detached mode, allowing it to run in the background.
83
+
84
+
* -e DISPLAY=$DISPLAY
85
+
86
+
###### Sets the DISPLAY environment variable inside the container to match the host's DISPLAY variable. This is necessary for GUI applications to display on the host's screen.
87
+
88
+
* -v /tmp/.X11-unix:/tmp/.X11-unix
89
+
90
+
###### Mounts the X11 Unix socket from the host to the container. This is required for GUI applications to communicate with the X server on the host.
91
+
92
+
* -v /dev:/dev
93
+
94
+
###### Mounts the /dev directory from the host to the container, allowing the container to access hardware devices. This is often necessary for applications that interact with hardware, such as cameras or GPUs.
95
+
96
+
* -v /opt:/opt
97
+
98
+
###### Mounts the /opt directory from the host to the container, allowing the container to access the models installed from OpenVINO Model Zoo.
99
+
100
+
* -v /data:/data
101
+
102
+
###### Mounts the /data directory from the host to the container, that contains the images and labels. Replace this with the folder of your images and labels.
103
+
104
+
* --privileged=true
105
+
106
+
###### Grants the container extended privileges, allowing it to access all devices on the host and perform operations that are typically restricted. This is necessary for certain applications that require direct hardware access.
107
+
108
+
* --name ros2_openvino_container
109
+
110
+
###### Assigns the name ros2_openvino_container to the running container, making it easier to reference in subsequent Docker commands.
111
+
112
+
* ros2_openvino_image
113
+
114
+
###### Specifies the name of the Docker image to run. Replace this with the actual name of your built image if it differs.
115
+
116
+
### Notes
117
+
118
+
* Ensure that your host's X11 server is configured to allow connections from the Docker container. You may need to run xhost +local:docker on the host to permit this.
119
+
120
+
* The --privileged flag provides the container with elevated permissions, which can pose security risks. Use it only when necessary and understand the implications.
0 commit comments