Private Gitlab Runner not working with GPU

I have registered a private gitlab runner with a machine which is CUDA capable with 1080Ti Nvidia GPU installed. The .gitlab-ci.yml is setup with nvidia cuda docker image with few test jobs which are supposed to run on the GPU attached to the gitlab runner.
I have set the following configuration in the /etc/gitlab-runner/config.toml:
gpus = “all”

The test job is not able to pick the GPU somehow.

My current .gitlab-ci.yml file:

When I run the aforementioned nvidia cuda docker image separately with the flag “–gpus all”
, it works perfectly fine but not with the gitlab runner.