-
Notifications
You must be signed in to change notification settings - Fork 2
Installing CUDA (Ubuntu)
This post is here in case anyone ever has to deal with setting up CUDA, which can easily become a massive pain. Following these steps, you should be able to set up a working environment with CUDA in only a few minutes. It has been tested only with Ubuntu 22.04.
sudo apt update && sudo apt upgrade
sudo apt autoremove nvidia* --purge
ubuntu-drivers devices
You will install the NVIDIA driver whose version is tagged with recommended
sudo ubuntu-drivers autoinstall
My recommended version is 525, adapt to yours
sudo apt install nvidia-driver-525
reboot
after restart verify that the following command works
nvidia-smi
sudo apt update && sudo apt upgrade
sudo apt install nvidia-cuda-toolkit
nvcc --version
You can download cuDNN file here. You will need an Nvidia account. Select the cuDNN version for the appropriate CUDA version, which is the version that appears when you run:
nvcc --version
sudo apt install ./<filename.deb>
sudo cp /var/cudnn-<something>.gpg /usr/share/keyrings/
My cuDNN version is 8, adapt the following to your version:
sudo apt update
sudo apt install libcudnn8
sudo apt install libcudnn8-dev
sudo apt install libcudnn8-samples
sudo apt-get install python3-pip
sudo pip3 install virtualenv
virtualenv -p py3.10 venv
source venv/bin/activate
pip3 install torch torchvision torchaudio
import torch
print(torch.cuda.is_available()) # should be True
t = torch.rand(10, 10).cuda()
print(t.device) # should be CUDA
Install the nvidia-container-runtime
for compatibility with Docker containers. Follow this installation guide, don't forget to do the configuration steps.
- Warthog Teach and Repeat (ROS1)
- Warthog Teach and Repeat (ROS2)
- Time Synchronization
- Deployment of Robotic Total Stations (RTS)
- Deployment of the backpack GPS
- Warthog Emlid GPS
- Atlans-C INS
- How to use a CB Radio when going in the forest
- IP forwarding
- Emlid Data Postprocessing (PPK)
- Lessons Learned
- Robots' 3D Models
- Order Management
- Fast track Master → PhD
- Intellectual Property
- Repository Guidelines
- TF Cheatsheet
- Montmorency Forest Wintertime Dataset
- RTS-GT Dataset 2023
- Deschenes2021 Dataset
- TIGS Dataset
- DRIVE Datasets
- BorealHDR
- TimberSeg 1.0
- DARPA Subterranean Challenge - Urban Dataset
- How to upload a dataset to VALERIA
- ROS1 Bridge
- Migrating a repository to ROS2 (Humble)
- ROS2 and rosbags
- MCAP rosbags
- DDS Configuration (work in progress)
- Using a USB Microphone with ROS2
- ROS2 in VSCode
- ROS2 Troubleshooting