dizcza/docker-hashcat

CL_PLATFORM_NOT_FOUND_KHR

peckerle opened this issue · 8 comments

Running hashcat command works on my mac but errors out on clGetPlatformIDs(): CL_PLATFORM_NOT_FOUND_KHR when running on ubuntu 18.04 Bionic. I have tried both intel-cpu and latest tagged images and both have the same errors. I see this is related to #2, is the fix the same?

UPDATE 08.06.22

nvidia-full is a deprecated (and misleading) tag created at the time when Hashcat had no CUDA support whatsoever. nvidia-full is an old build of Hashcat with OpenCL (not CUDA!).

Original response below


Do you have GPUs? :latest and :nvidia-full tags run only on GPU containers. Please try :nvidia-full tag as I've described in #4 .
If you don't have nvidia GPUs, the steps to alleviate the problems are different. Let me know.

No I do not have GPUs. I'm still having the same issue with the :nvidia-full tag. I have removed the other images as described in the previous ticket as well.

Then it means OpenCL driver is not properly installed for your graphics card or hashcat simply does not support your graphics card -- or rather it cannot/does not know how to talk with linux Intel OpenCL driver in :intel-cpu image (because you mentioned it works with Mac OS). That happens to me with new amazon AWS simple CPU instances.

Is your graphics card integrated Intel? Otherwise, :intel-cpu won't work.

If yes, try installing Intel OpenCL driver as described here hashcat/hashcat#1207 or building the driver manually https://software.intel.com/en-us/articles/opencl-drivers#latest_CPU_runtime. Make sure you're running Ubuntu 16.x -- driver complains that it does not support Ubuntu 18.x, however, in my case, it either works for both 16.x and 18.x or works for neither of them (as I currently experience with AWS CPU instances).

After installing Intel CPU OpenCL runtime, please download hashcat-v5.1.0 archived source code, extract it and build hashcat manually. It's very straightforward - make && make install.

Just a small question, when I run the command "nvidia-smi" it shows me CUDA version: 11.0 instead of 10.2
do you know why?

@fa1rid maybe because you've installed CUDA 11 on your host system, which is shared with docker containers, and then a docker container picks 11 in favor of installed 10.2 at runtime.

Confirmed fixed using :nvidia-full instead of :cuda ???

nvidia-full is a deprecated (and misleading) tag created at the time when Hashcat had no CUDA support whatsoever. It's is an old build of Hashcat with OpenCL (not CUDA!).

CL_PLATFORM_NOT_FOUND_KHR means that Hashcat could find neither CUDA nor OpenCL backend. Try running the containers in the following order until you succeed:

  • if you have a GPU card: cuda, latest;
  • if you don't have GPU cards: intel-gpu, intel-cpu, pocl

POCL should be the last resort.