dlstreamer / pipeline-server

Home of Intel(R) Deep Learning Streamer Pipeline Server (formerly Video Analytics Serving)
BSD 3-Clause "New" or "Revised" License
123 stars 50 forks source link

Error when trying to run pipeline on GPU #94

Closed antoniomtz closed 2 years ago

antoniomtz commented 2 years ago

Hello,

I've been trying to run a pipeline on GPU on a 11th Gen Intel(R) Core(TM) i9-11900H and getting the following error:

{"levelname": "ERROR", "asctime": "2021-11-08 23:45:18,245", "message": "Error on Pipeline 1: gst-library-error-quark: base_inference plugin intitialization failed (3): /root/gst-video-analytics/gst/inference_elements/base/inference_singleton.cpp(136): acquire_inference_instance (): /GstPipeline:pipeline2/GstGvaDetect:detection:\n\nFailed to construct OpenVINOImageInference\n\tFailed to create plugin /opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libclDNNPlugin.so for device GPU\nPlease, check your environment\n[CLDNN ERROR]. clGetPlatformIDs error -1001\n", "module": "gstreamer_pipeline"}

I was able to run the openVINO DLStreamer samples on GPU with no problem. Also, I'm able to run this VAS pipeline on GPU using a different computer with i5.

It is worth mentioning that this i9 computer also has Nvidia GPU. Could it be any issues with Docker confusion the mounted GPU?

We are using the following directive in the compose file:

    devices:
      - /dev/dri:/dev/dri

Thanks.

akwrobel commented 2 years ago

@antoniomtz Have you tried building on the same machine that you are running on? Also can you please try running VA Serving's /docker/run.sh.
Please attach the output.

antoniomtz commented 2 years ago

@akwrobel I tried running docker/run.sh and the sample pipelines on GPU and they worked.

I took a look at the variables you guys are using when running the docker run command and added them to my docker-compose file.

After adding these variables, I was able to run the pipeline on GPU through the docker-compose.

   group_add:
      - 109
      - audio
      - users
    device_cgroup_rules:
      - c 189:* rmw

Thanks.

whbruce commented 2 years ago

group_add 109 is the magic - it comes from this GPU docker guide. Heads up this value may vary with host platform.

device_cgroup_rules is only required for NCS2. group_add audio is only for microphone support. You can remove them both.

antoniomtz commented 2 years ago

@whbruce thanks!