So it’s said I have to install nvidia-container-toolkit:

On versions including and after 19.03, you will use the nvidia-container-toolkit package and the --gpus all flag

my docker -v:
Docker version 19.03.11
I was trying to install sudo apt-get install -y nvidia-container-runtime as said in the guide 3 but this occured:
cuda-drivers is already the newest version (470.57.02-1).
cuda-drivers set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cuda-drivers-470 : Depends: libnvidia-gl-470 (>= 470.57.02) but it is not going to be installed
 libnvidia-ifr1-470 : Depends: libnvidia-gl-470 but it is not going to be installed
 nvidia-driver-470 : Depends: libnvidia-gl-470 (= 470.57.02-0ubuntu1) but it is not going to be installed
                     Recommends: nvidia-prime (>= 0.8) but it is not going to be installed
                     Recommends: libnvidia-compute-470:i386 (= 470.57.02-0ubuntu1) but it is not installable
                     Recommends: libnvidia-decode-470:i386 (= 470.57.02-0ubuntu1) but it is not installable
                     Recommends: libnvidia-encode-470:i386 (= 470.57.02-0ubuntu1) but it is not installable
                     Recommends: libnvidia-ifr1-470:i386 (= 470.57.02-0ubuntu1) but it is not installable
                     Recommends: libnvidia-fbc1-470:i386 (= 470.57.02-0ubuntu1) but it is not installable
                     Recommends: libnvidia-gl-470:i386 (= 470.57.02-0ubuntu1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I was trying different ways to install and reinstall nvidia drivers and cuda but I guess I did some mistake, but this what I see when I’m trying installing it with other installer:

image2024×646 71.8 KB

So I’m not sure how to fix “unmet dependencies” issue, because uninstalling and reinstalling again doesn’t solve it…
and still have:

docker: Error response from daemon: exec: "nvidia-container-runtime-hook": executable file not found in $PATH.
ERRO[0000] error waiting for container: context canceled 


when running docker run --gpus all -it tensorflow/tensorflow:latest-gpu bash