- Newest
- Most votes
- Most comments
Hello,
The AL2 AMI comes with Cuda version 11.
# nvidia-smi -q | head
==============NVSMI LOG==============
Timestamp : Tue Oct 24 06:30:45 2023
Driver Version : 450.236.01
CUDA Version : 11.0
Attached GPUs : 1
GPU 00000000:00:1E.0
Product Name : Tesla T4
Python version 3.7. However, you can upgrade to python version 3.8 using the steps here: https://repost.aws/questions/QUtA3qNBaLSvWPfD5kFwI0_w/python-3-10-on-ec2-running-amazon-linux-2-and-the-openssl-upgrade-requirement#ANJdWAfw8AQWmZyUh0RUjDVA
I installed a pytorch version that matches my CUDA version https://pytorch.org/get-started/previous-versions/
Then I verified using following commands
python3 --version
Python 3.8.16
# python3
Python 3.8.16 (default, Aug 30 2023, 23:19:34)
[GCC 7.3.1 20180712 (Red Hat 7.3.1-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>> torch.cuda.get_device_name(0)
'Tesla T4'
I believe you are facing this issue because you have a pytorch version installed that is not compatible with CUDA 11. Please install a version that is compatible.
If you would like to use a different version of CUDA, please follow the steps here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html#gpu-instance-install-cuda
If you would like to completely update the NVIDIA drivers, first completely remove the existing NVIDIA drivers using the command:
sudo yum erase nvidia cuda
Then install using the steps provided here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html#nvidia-GRID-driver
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 10 months ago