doe300 / VC4CL

OpenCL implementation running on the VideoCore IV GPU of the Raspberry Pi models
MIT License
726 stars 79 forks source link

Running on Docker #118

Open Dall127 opened 10 months ago

Dall127 commented 10 months ago

Is there a kind soul that has used this to get video acceleration on a docker image? I'm currently working on trying to get hardware acceleration for Obico's 3D printing machine learning model. Ive got a darknet build that supports opencl and specifically will run on the raspberry pi via this package, but every time I've tried to bring up the GPU, I've been getting CL_INVALID_CONTEXT. My best hypothesis is that I'm not passing through the correct devices in the docker image, or incorrectly configured settings on the raspberry pi (model 3a+) to bring up the gpu and make it accessible. Any help would be greatly appreciated!

doe300 commented 10 months ago

VC4CL directly accesses hardware registers and memory-maps GPU memory, so I doubt it will run in any container. But at least it will need access to (some of the) following:

Dall127 commented 10 months ago

Thank you so much! I believe that docker has a mode called privileged that gives lower level access to the hardware, so I'll map those devices and set that flag and give it a try. I'll report back to this issue on the success of it. Thank you again!