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"}
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:
Workaround is to ensure user has UID <= 1001.