I'm trying to run this simple line of code in a docker container that comes with Pytorch.
import torch torch.cuda.set_device(0) I get this error:
RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at torch/csrc/cuda/Module.cpp:32 Running torch.cuda.is_available() returns False.
The host machine has the most up-to-date Nvidia drivers. Pytorch ships with Cuda, so there should be no incompatibility issues.
What could cause this problem?
Edit: @Patel Sunil's answer to this question answers my question, but I didn't come across this question in my search because their question is broad, while my question is specific to the cuda runtime/driver error. I posted this as a separate question for those who come across this error but don't know what it is a symptom of (namely, forgetting to use nvidia-docker).
nvidia-dockeris only the last answer. Probably mainly because the answer was written way after the question was asked.