Nvidia-docker: OpenCL support

Created on 3 Dec 2015  路  17Comments  路  Source: NVIDIA/nvidia-docker

It seems, that the symlink to /usr/local/cuda/include/CL is missing, once it is manually set up, OpenCL examples build properly.

Equally, /usr/local/cuda/lib64 must be added to /etc/ld.so.conf (or a corresponding file), to ensure that libOpenCL* can be found

I guess, it might be a good idea to try to build the CUDA/OpenCL examples as part of the update/release process ?

Thanks

new feature

Most helpful comment

We just published the OpenCL images on DockerHub (finally!).
https://hub.docker.com/r/nvidia/opencl/

All 17 comments

We don't support OpenCL currently, we will probably add it in a future release though.

CUDA libraries are in fact included in ld.so.conf (see https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-14.04/cuda/7.5/runtime/Dockerfile#L29)

We provide few CUDA samples images in samples

thanks for clarifying, it would be great if OpenCL could be supported "out of the box", and it may make sense to run a few CUDA/OpenCL examples as regression tests when building/updating the docker image, i.e. as part of the release process

Yes, we definitely need to add more tests; I will try to do that simultaneously with #18

regarding clinfo, I really suggest to check out this version, which seems to support all major ICDs, including parallel installations: https://github.com/Oblomov/clinfo

I have been using this, to test different ICDs (nvidia, amd and intel) with different hardware: https://github.com/elhigu/opencl-testsuite

You can see the results, which are published at: http://elhigu.github.io/opencl-testsuite/

There is a "send-report" make target which will automatically send a JSON request to update the test matrix

I'd like to see this too, but my workaround is minimal, I have success running
nvidia-docker run nvidia/cuda:7.5 /bin/bash -exc "apt-get update && apt-get install -y clinfo nvidia-opencl-icd-352 && clinfo"

Here you go (pushed in the opencl branch):
https://github.com/NVIDIA/nvidia-docker/blob/opencl/ubuntu-14.04/opencl/runtime/Dockerfile

If you need devel files just install ocl-icd-opencl-dev

Thank you very much for taking care of this, much appreciated !!

we definitely need to add more tests;

@flx42, how about including some of the more popular OpenCL related libraries/platforms, e.g. things like pyOpenCL, numpy or arrayfire etc ?

Most of these already contain a bunch of unit tests using OpenCL, so that would be a straightforward way to grow a library of OpenCL unit tests without having to write them from scratch ?

@UniqueFool This should not be included in the base image, but feel free to build your own images :)

It seems OpenCL support has not been included in the latest cuda-8.0 runtime dockerfiles for centos 6/7 and ubuntu-16.04.

@3XX0 : Any update on OpenCL support for the latest cuda-8.0 runtime dockerfiles?

@3XX0 : OpenCL support is missing. I was trying CentOS image and Davinci Resolve software, which requires both Cuda and OpenCL to run.

@3XX0 : I have the same request as @juliandroid . Would like nvidia-docker, Centos 6, and OpenCL.

Thank you

We don't plan to publish OpenCL images for now. We will revisit after 2.0 is out.
In the meantime, creating your own Dockerfile should be too difficult, see:
https://gitlab.com/nvidia/opencl/blob/ubuntu14.04/runtime/Dockerfile

We just published the OpenCL images on DockerHub (finally!).
https://hub.docker.com/r/nvidia/opencl/

@flx42 PyOpenCL seems to be not working, this throwing some errors, here is the post describing the problem (https://devtalk.nvidia.com/default/topic/1047065/need-pyopencl-nvidia-docker-container/) can you please help us ?

Hi, I am trying to user nvidia opencl docker on GKE, clinfo doesn't detect plateform. The driver seems to be well instaled and the GPU seems detected.

/# /usr/local/nvidia/bin/nvidia-smi
Mon Jun 17 13:43:21 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.79 Driver Version: 410.79 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 |
| N/A 36C P0 27W / 250W | 0MiB / 16280MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

ldd /usr/bin/clinfo
linux-vdso.so.1 => (0x00007fff933e0000)
libOpenCL.so.1 => /usr/local/nvidia/lib64/libOpenCL.so.1 (0x00007fb60b652000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb60b34e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb60b138000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb60ad6f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb60ab6b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb60a94d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb60a647000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb60b859000)

Was this page helpful?
0 / 5 - 0 ratings