Docker accessing GPU for Pytorch error

Hi, I am trying to get an GPU access inside Docker. I can use CUDA without any problem outside the docker and my app is working correctly;however when I try to run the image I created I get the following error.

" docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0
:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request: unknown."

Below is my Dockerfile.

FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04

RUN apt-get update && apt-get install -y python3 python3-pip sudo

WORKDIR /myapp

ADD . /myapp

RUN pip3 install torch tensorflow transformers numpy Flask

COPY . .

CMD [ “python3”,"./app.py" ]

Could you please help ?