dlstreamer / pipeline-server

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

Run script fails to detect GPU if UID > 1001 #64

Closed whbruce closed 3 years ago

whbruce commented 3 years ago

The container has two users with permission to access GPU: openvino (UID 1000) and vaserving (UID 1001). The run scripts takes UID from host to avoid volume mounting permission issues, so if this UID > 1001, the container cannot access GPU.

Under this condition, if a request sets device to "GPU", the server will show an error as follows:

$ docker/run.sh
Found /dev/dri - enabling for GPU
<snip>
{"levelname": "ERROR", "asctime": "2021-02-17 02:44:47,904", "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(137): acquire_inference_instance (): /GstPipeline:pipeline7/GstGvaDetect:detection:\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\n", "module": "gstreamer_pipeline"}

Workaround is to ensure user has UID <= 1001.

whbruce commented 3 years ago

Fixed in v0.5