Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nvidia] install cuda toolkit and drivers #73

Open
nguyenvulong opened this issue Jan 10, 2024 · 0 comments
Open

[nvidia] install cuda toolkit and drivers #73

nguyenvulong opened this issue Jan 10, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@nguyenvulong
Copy link
Owner

nguyenvulong commented Jan 10, 2024

Note: for a complete guide, refer to this #75
If you just want it to work, read on

1. cuda toolkit

If you are a pytorch user (Source).

you don’t need to download a full CUDA toolkit and would only need to install a compatible NVIDIA driver, since PyTorch binaries ship with their own CUDA dependencies.

That means you do not need to install cuda toolkit system-wide. You only need to install cuda drivers in step 2 then proceed to step 3 to install pytorch.

Refer to this official guide from nvidia.
Select suitable settings and install cuda toolkit, then look below and install proper cuda drivers if you have not done so.

nvcc
Refer to this guide from stackoverflow, there are instruction that recommend using apt to install the toolkit
sudo apt install nvidia-cuda-toolkit but for Pytorch users, you may want to start from step 2 first.

nvcc might have been already installed during cuda toolkit installation, make sure to find it first in /usr/local/cuda/bin/nvcc before reinstalling a new one. Normally nvcc is not in the PATH.

image

2. cuda drivers

See the official guide from NVIDIA
Note that Driver Installer section only shows up after you have selected your settings for cuda toolkit

Of use these commands
For 535
sudo aptitude install nvidia-driver-535 nvidia-dkms-535

For 555

sudo apt-get install -y nvidia-driver-555-open
sudo apt-get install -y cuda-drivers-555

3. pytorch

Refer to this official URL from pytorch.
You do not need to find a pytorch version compatible with the cuda toolkit version in step 1. pytorch installation will find and install the compatible cuda toolkit itself locally (in conda environment, for example).

4. read more

Compatibility Matrix (official URL from nvidia)
image

nvidia ecosystem https://docs.nvidia.com/datacenter/tesla/drivers/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant