Skip to content

Conversation

@axion9
Copy link
Contributor

@axion9 axion9 commented Nov 10, 2025

Description

This change adds missing Intel GPU, OpenCL, and Level Zero packages to the base Docker image to ensure the system can properly run OpenVINO and GPU-accelerated workloads. The packages include intel-igc-core, intel-igc-opencl, intel-level-zero-gpu, intel-opencl-icd, and libigdgmm12, along with clinfo for verifying OpenCL devices. These packages were previously omitted, which prevented GPU workloads from functioning correctly.

Any Newly Introduced Dependencies

Requires network access to Intel’s GitHub releases and APT repositories for downloading and installing the .deb packages.

How Has This Been Tested?

The changes have been tested by building the Docker image locally and verifying that all Intel GPU packages were successfully installed. Running clinfo confirms that the Intel GPU and OpenCL drivers are recognized by the system.

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes.
  • I have not introduced any 3rd party components incompatible with APACHE-2.0.
  • I have not included any company confidential information, trade secret, password or security token.
  • I have performed a self-review of my code.

@jouillet
Copy link
Contributor

jouillet commented Nov 12, 2025

Thanks - This is a good suggestion. I believe we may have an APT repo we can use to install these packages as opposed to downloading them directly from GitHub. Let me confer with a colleague on this.

@jb-balaji jb-balaji force-pushed the fix/add-intel-gpu-packages branch from a19a23e to 451bca9 Compare November 13, 2025 10:26
&& rm -f *.deb \
&& apt-get update \
&& apt-get install clinfo

Copy link

@Pirouf Pirouf Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wouldn't recommend to use any the github alien unstable packages that often lead to dpkg install package conflicts and dependencies deadlocks w/ the Canonical official Ubuntu packages.

i would instead suggest one of the following two alternatives :

  • Leverage Ubuntu official kobuk-team PPA the official 24.04, 25.10, ... libze1, libigc1, libigc2, intel-opencl-icd, ... dpkg ported maintained by Canonical community stable or testing
  • Leverage Intel ECI Ubuntu 22.04 or 24.04 backport of the Canonical officially maintained libze1, libigc1, libigc2, intel-opencl-icd, ... eci-3.3

As this microservice is ROS_DISTRO=humble based, i suppose it expects 22.04 jammy compat.
The Canonical Ubuntu official kobuk-team PPA provides from 24.04 onward only, where as Intel ECI does provide backport down-to 22.04.x. For more details, please see [Enable Intel® Level Zero and OpenCL™ Graphics Compute Runtime](https://eci.intel.com/docs/3.3/development/tutorials/enable-graphics.html ) and and following command :

sudo -E wget -O- https://eci.intel.com/repos/gpg-keys/GPG-PUB-KEY-INTEL-ECI.gpg | sudo tee /usr/share/keyrings/eci-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/$(source /etc/os-release && echo $VERSION_CODENAME) isar main" | sudo tee /etc/apt/sources.list.d/eci.list
sudo bash -c 'echo -e "Package: *\nPin: origin eci.intel.com\nPin-Priority: 1000" > /etc/apt/preferences.d/isar'
sudo apt update
sudo apt install clinfo intel-opencl-icd libigdgmm12 libze1 libze-intel-gpu1 libigc1 libigdfcl1 

FYI, eci.intel.com APT repo will very soon redistribute the Canonical official and latest stable packages backports for Ubuntu 22.04.x and 24.04.x :

Copy link
Contributor

@jouillet jouillet Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axion9 Considering this microservice is based on Ubuntu 22.04, the ECI APT repo would work:

# Add ECI APT repo and install graphics related packages
RUN bash -c 'echo "deb [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/$(lsb_release -sc) isar main" | tee /etc/apt/sources.list.d/eci.list' \
&& bash -c 'echo "deb-src [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/$(lsb_release -sc) isar main" | tee -a /etc/apt/sources.list.d/eci.list' \
&& bash -c 'echo -e "Package: *\nPin: origin eci.intel.com\nPin-Priority: 1000" | tee /etc/apt/preferences.d/isar' \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
libigdgmm12
intel-opencl-icd
libze-intel-gpu1
libigc1
libigdfcl1 \
&& rm -rf /var/lib/apt/lists/*

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jouillet I tried this, and though the installation succeeds, the functionality breaks within RVC. @dariorusso1972, can you take a look when you have some time? As committed, the libraries install and RVC works. If I use the suggested ECI APT, vision no longer works with the main (of many) complaints:

[component_container_mt-1] [INFO] [1763156278.763808080] [OD]: run_inference_pipeline FAILED [component_container_mt-1] onednn_verbose,v1,primitive,error,gpu,reusable_simple_concat: scalar kernel argument #1 (_long) is different from the type of the given scalar (_ulong) [component_container_mt-1] [INFO] [1763156278.798037246] [Yolox]: Exception Exception from src/inference/src/cpp/infer_request.cpp:245: [component_container_mt-1] Exception from src/plugins/intel_gpu/src/runtime/ocl/ocl_common.hpp:51: [component_container_mt-1] could not execute a primitive [component_container_mt-1]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed last jouillet recommendation and rvc started for me with no errors. I also totally agree with him, i experience breakage when i install the deb file out of repositories, even now, i had to do a "dpkg -r intel-level-zero-gpu" before "apt full-upgrade" to use the eci drivers.

Copy link
Contributor Author

@axion9 axion9 Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dariorusso1972, interesting. First, I 100% agree that this is a great suggestion, but if I use the below in place of what I committed (and then rebuild the container), the vision composition dies. Thus, the camera does not load. I took what @jouillet suggested and wrote this into the build and then ran the build script again:

# Install Intel GPU/Level Zero packages
RUN bash -c 'wget -O- https://eci.intel.com/repos/gpg-keys/GPG-PUB-KEY-INTEL-ECI.gpg | sudo tee /usr/share/keyrings/eci-archive-keyring.gpg > /dev/null' \
  && bash -c 'echo "deb [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/$(source /etc/os-release && echo $VERSION_CODENAME) isar main" | sudo tee /etc/apt/sources.list.d/eci.list' \
  && bash -c 'echo -e "Package: *\nPin: origin eci.intel.com\nPin-Priority: 1000" > /etc/apt/preferences.d/isar' \
  && apt-get update \
  && apt-get install -y intel-opencl-icd \ 
  libigdgmm12 libze1 \ 
  libze-intel-gpu1 \
  libigc1 libigdfcl1 \
  clinfo 

Looking at the vision composition logs all looks normal, the device is found, etc. But then the process dies every time after "Sync Mode: On":

ros@system76:/$ ros2 launch rvc_vision_main vision.composition.launch.py
[INFO] [launch]: All log files can be found below /home/ros/.ros/log/2025-11-17-13-51-25-623494-system76-158
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container_mt-1]: process started with pid [170]
[component_container_mt-1] [INFO] [1763387485.938700341] [ipc.rvc_container]: Load Library: /opt/ros/humble/lib/librealsense2_camera.so
[component_container_mt-1] [INFO] [1763387485.978712200] [ipc.rvc_container]: Found class: rclcpp_components::NodeFactoryTemplate<realsense2_camera::RealSenseNodeFactory>
[component_container_mt-1] [INFO] [1763387485.978767194] [ipc.rvc_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<realsense2_camera::RealSenseNodeFactory>
[component_container_mt-1] [INFO] [1763387485.983813324] [ipc.camera.cameraipc]: RealSense ROS v4.56.4
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/ipc/camera/cameraipc' in container '/ipc/rvc_container'
[component_container_mt-1] [INFO] [1763387485.983841469] [ipc.camera.cameraipc]: Built with LibRealSense v2.56.4
[component_container_mt-1] [INFO] [1763387485.983846915] [ipc.camera.cameraipc]: Running with LibRealSense v2.56.4
[component_container_mt-1]  17/11 13:51:25,984 WARNING [124782721959488] (backend-hid.cpp:1285) Failed to read busnum/devnum. Custom HID Device Path: /sys/bus/platform/drivers/hid_sensor_custom/HID-SENSOR-2000e1.3.auto
[component_container_mt-1]  17/11 13:51:25,984 WARNING [124782721959488] (backend-hid.cpp:1285) Failed to read busnum/devnum. Custom HID Device Path: /sys/bus/platform/drivers/hid_sensor_custom/HID-SENSOR-2000e1.2.auto
[component_container_mt-1] [INFO] [1763387485.986203597] [ipc.rvc_container]: Load Library: /rvc/install/rvc_object_detection_engine/lib/librvc_object_detection_composable_plugin.so
[component_container_mt-1] [INFO] [1763387485.987820872] [ipc.rvc_container]: Found class: rclcpp_components::NodeFactoryTemplate<RVC::ObjectDetection>
[component_container_mt-1] [INFO] [1763387485.987834503] [ipc.rvc_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<RVC::ObjectDetection>
[component_container_mt-1] [INFO] [1763387485.990359838] [ipc.object_detection]: 	 publish_inference_images 1
[component_container_mt-1] [INFO] [1763387485.990377843] [ipc.object_detection]: 	 model_name yoloxorange
[component_container_mt-1] [INFO] [1763387485.990387236] [ipc.object_detection]: Intra-Process is ON
[component_container_mt-1] [INFO] [1763387486.000054369] [ipc.object_detection]: Trying to load Inference plugin...
[component_container_mt-1] [INFO] [1763387486.000573554] [ipc.object_detection]: Trying to load Inference plugin name RVC_AI::YoloxInference...
[component_container_mt-1] [INFO] [1763387486.007113352] [ipc.object_detection]: Yolox plugin: Looking for OpenVino Model Files /rvc/install/rvc_use_case_binaries/share/rvc_use_case_binaries/ai_models/yoloxorange.xml
[component_container_mt-1] [INFO] [1763387486.007135833] [ipc.object_detection]:  OpenVINO yolox plugin: Model Version: 5
[component_container_mt-1] [INFO] [1763387486.007148474] [ipc.object_detection]: OpenVINO yolox plugin: loading Model /rvc/install/rvc_use_case_binaries/share/rvc_use_case_binaries/ai_models/yoloxorange.xml
[component_container_mt-1] [INFO] [1763387486.025062343] [Yolox]:     inputs
[component_container_mt-1] [INFO] [1763387486.025088700] [Yolox]:         input name: image
[component_container_mt-1] [INFO] [1763387486.025094786] [Yolox]:         input type: f32
[component_container_mt-1] [INFO] [1763387486.038896368] [Yolox]:         input shape (reshaped): [1,3,416,416]
[component_container_mt-1] [INFO] [1763387486.041174330] [Yolox]:  PREPROC: Input "image" (color BGR):
[component_container_mt-1]     User's input tensor: [1,640,640,3], [N,H,W,C], u8
[component_container_mt-1]     Model's expected tensor: [1,3,416,416], [N,C,H,W], f32
[component_container_mt-1]     Pre-processing steps (3):
[component_container_mt-1]       convert type (f32): ([1,640,640,3], [N,H,W,C], u8, BGR) -> ([1,640,640,3], [N,H,W,C], f32, BGR)
[component_container_mt-1]       convert color (RGB): ([1,640,640,3], [N,H,W,C], f32, BGR) -> ([1,640,640,3], [N,H,W,C], f32, RGB)
[component_container_mt-1]       resize to (416, 416): ([1,640,640,3], [N,H,W,C], f32, RGB) -> ([1,416,416,3], [N,H,W,C], f32, RGB)
[component_container_mt-1]     Implicit pre-processing steps (1):
[component_container_mt-1]       convert layout [N,C,H,W]: ([1,416,416,3], [N,H,W,C], f32, RGB) -> ([1,3,416,416], [N,C,H,W], f32, RGB)
[component_container_mt-1] 
[component_container_mt-1] [INFO] [1763387486.207382330] [ipc.camera.cameraipc]: Device with serial number 220222063537 was found.
[component_container_mt-1] 
[component_container_mt-1] [INFO] [1763387486.207446274] [ipc.camera.cameraipc]: Device with physical ID /sys/devices/pci0000:00/0000:00:0d.0/usb2/2-4/2-4:1.0/video4linux/video0 was found.
[component_container_mt-1] [INFO] [1763387486.207451943] [ipc.camera.cameraipc]: Device with name Intel RealSense D415 was found.
[component_container_mt-1] [INFO] [1763387486.207554094] [ipc.camera.cameraipc]: Device with port number 2-4 was found.
[component_container_mt-1] [INFO] [1763387486.207560463] [ipc.camera.cameraipc]: Device USB type: 3.2
[component_container_mt-1] [INFO] [1763387486.207592932] [ipc.camera.cameraipc]: Intra-Process communication enabled
[component_container_mt-1] [INFO] [1763387486.207608474] [ipc.camera.cameraipc]: getParameters...
[component_container_mt-1] [INFO] [1763387486.208007341] [ipc.camera.cameraipc]: JSON file is not provided
[component_container_mt-1] [INFO] [1763387486.208016698] [ipc.camera.cameraipc]: Device Name: Intel RealSense D415
[component_container_mt-1] [INFO] [1763387486.208021011] [ipc.camera.cameraipc]: Device Serial No: 220222063537
[component_container_mt-1] [INFO] [1763387486.208024677] [ipc.camera.cameraipc]: Device physical port: /sys/devices/pci0000:00/0000:00:0d.0/usb2/2-4/2-4:1.0/video4linux/video0
[component_container_mt-1] [INFO] [1763387486.208028562] [ipc.camera.cameraipc]: Device FW version: 5.17.0.10
[component_container_mt-1] [INFO] [1763387486.208055582] [ipc.camera.cameraipc]: Device Product ID: 0x0AD3
[component_container_mt-1] [INFO] [1763387486.208065005] [ipc.camera.cameraipc]: Sync Mode: On
[ERROR] [component_container_mt-1]: process has died [pid 170, exit code -11, cmd '/opt/ros/humble/lib/rclcpp_components/component_container_mt --ros-args -r __node:=rvc_container -r __ns:=/ipc'].

My guess is the change I am building off of what @jouillet suggested is wrong, but it looks like everything is installed properly:

ros@system76:/$ dpkg -l | grep -E "libigc1|libigdfcl1|libze1|libze-intel-gpu1|intel-opencl-icd|libigdgmm12"
ii  intel-opencl-icd                                  24.52.32224.13-1                        amd64        Intel graphics compute runtime for OpenCL
ii  libigc1:amd64                                     1.0.17791.18-1                          amd64        Intel graphics compiler for OpenCL -- core libs
ii  libigdfcl1:amd64                                  1.0.17791.18-1                          amd64        Intel graphics compiler for OpenCL -- OpenCL library
ii  libigdgmm12:amd64                                 22.8.2+ds1-1                            amd64        Intel Graphics Memory Management Library -- shared library
ii  libze-intel-gpu1                                  24.52.32224.13-1                        amd64        Intel oneAPI L0 support implementation for Intel GPUs -- shared library
ii  libze1:amd64                                      1.24.1-2                                amd64        oneAPI Level Zero -- share libraries

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, when i said "works for me", it was true on gen 12th... on Core Ultra 7 definitely not...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants