I downloaded a docker image from the NVIDIA website (specifically: nvcr.io/nvidia/pytorch:19.04-py3
) in order to ensure I have automatic compatibility between CUDA and torch (since I have CUDA version 12.2 but I want to use past versions of torch). I ran the container
docker run -it --rm --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -v .:/
workspace nvcr.io/nvidia/pytorch:19.04-py3 bash
and then, after opening the Python shell, I typed these simple operations:
>>>import torch
>>>torch.cuda.is_available()
True
>>>torch.arange(5)
tensor([0, 1, 2, 3, 4])
>>>torch.arange(5, device='cuda:0')
tensor([0, 1, 2, 3, 4], device='cuda:0')
The problem is that the last operation ran for 15 whole minutes before giving me the output.
What could be the issue in your opinion?