Skip to content

Instantly share code, notes, and snippets.

@p1nox
Last active February 7, 2022 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p1nox/f76aba3dcfeff18a1d51a982f14cfd0c to your computer and use it in GitHub Desktop.
Save p1nox/f76aba3dcfeff18a1d51a982f14cfd0c to your computer and use it in GitHub Desktop.
nVidia cuda
# version 11.3.0-465.19.01
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-3-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

https://lambdalabs.com/blog/install-tensorflow-and-pytorch-on-rtx-30-series/

https://lambdalabs.com/lambda-stack-deep-learning-software

https://github.com/lambdal/lambda-stack-dockerfiles/

https://lambdalabs.com/blog/set-up-a-tensorflow-gpu-docker-container-using-lambda-stack-dockerfile/

# after installation
sudo apt install containerd
sudo apt-get install docker.io nvidia-container-toolkit
# https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo dockerd &
# install ubuntu
# update drivers

sudo apt install nvidia-driver-470
sudo apt-get install wget curl vim git htop nvtop

# https://developer.nvidia.com/cuda-downloads
#    https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_local
sudo bash cuda.sh

/usr/local/cuda/bin/nvcc --version
nvcc --version

# extra
# https://developer.nvidia.com/cudnn

# install conda
# create conda env and activate
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia

Official conda pytorch:

https://ngc.nvidia.com/catalog/containers/nvidia:pytorch

Notes:

# gtk error
sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment