Reputation: 55
sudo docker run --gpus all -it --rm tensorflow/tensorflow:latest-gpu
python -c "import tensorflow as tf; tf.config.list_physical_devices('GPU')"
2020-06-27 10:14:59.618701: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-06-27 10:14:59.618726: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (-1)
2020-06-27 10:14:59.618744: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: fd26039ac692
2020-06-27 10:14:59.618752: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: fd26039ac692
2020-06-27 10:14:59.618821: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:200] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program
2020-06-27 10:14:59.618853: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:204] kernel reported version is: 440.82.0
Docker version 19.03.12, build 48a66213fe
NVIDIA 440.82
I install nvidia-container-toolkit
In my host it works,but in docker I get "was unable to find libcuda.so DSO "
Upvotes: 0
Views: 722
Reputation: 55
modify /etc/nvidia-container-runtime/config.toml from "@/sbin/ldconfig" to "/sbin/ldconfig"
Upvotes: 1