- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are able to start a docker with the `--privileged` flag and get this:
sycl-ls
[opencl:acc:0] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device 1.2 [2022.15.12.0.01_081451]
[opencl:cpu:1] Intel(R) OpenCL, Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz 3.0 [2022.15.12.0.01_081451]
[opencl:gpu:2] Intel(R) OpenCL HD Graphics, Intel(R) UHD Graphics [0x9bc4] 3.0 [22.28.23726.1]
[opencl:acc:3] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device 1.2 [2022.15.12.0.01_081451]
Note that the Intel(R) OpenCL HD Graphics
is available, which is my coffee lake iGPU. But `--privileged` is a collosal hammer of a flag. We should be able to get the gpu with just `--device=/dev/dri`. Indeed, with this flag only, i can get the nvidia card, but not the iGPU. With --device=/dev/dri
only, I get:
[opencl:acc:0] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device 1.2 [2022.15.12.0.01_081451]
[opencl:cpu:1] Intel(R) OpenCL, Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz 3.0 [2022.15.12.0.01_081451]
[opencl:acc:3] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device 1.2 [2022.15.12.0.01_081451]
Note that the iGPU is missing.
What do i need to do to get the iGPU in there?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In addition to this,
If i mount the folder directly:
--volume=/dev/dri:/dev/dri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, so you need device, but you also need the render group. This was very hard to find out.
getent group render
render:x:109:
So you add
--group-add=109
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel communities.
You can get the GPU in docker by installing GPU drivers in the Docker file using the below commands
RUN curl -fsSL https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -
RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main" > /etc/apt/sources.list.d/intel-graphics.list
and then install intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev through apt-get command
Hope this resolves your issue. If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without this, it would not have even worked with the --privileged. The answer is not what you posted, it is the combination of
--volume=/dev/dri:/dev/dri
and
--group-add=109
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for providing the details.
You can mount the folder while starting the Docker container and it will find the GPU as you have mentioned.
If you use a Docker file then you can install a GPU driver using the below commands as mentioned in my previous post.
RUN curl -fsSL https://repositories.intel.com/graphics/intel-graphics.key | apt-key add -
RUN echo "deb [trusted=yes arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main" > /etc/apt/sources.list.d/intel-graphics.list
Could you please confirm whether your issue is resolved? If yes, can we go ahead and close this issue?
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have not heard back from you, so I will close this inquiry now. If you need further assistance, please post a new question.
Thanks & Regards,
Noorjahan.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page