57
loading...
This website collects cookies to deliver better user experience
sudo apt-get update && sudo apt-get upgrade
sudo apt-get -y install pciutils software-properties-common wget g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
lspci | grep -i nvidia
sudo apt-get purge nvidia*
sudo apt remove nvidia-*
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*
gcc --version
sudo apt-get -y install gcc
sudo apt-get -y install linux-headers-4.19.0-16-cloud-amd64
# download drivers
wget https://us.download.nvidia.com/tesla/460.73.01/NVIDIA-Linux-x86_64-460.73.01.run
# make it executable
chmod u+x NVIDIA-Linux-x86_64-460.73.01.run
# install the drivers
sudo ./NVIDIA-Linux-x86_64-460.73.01.run
nvidia-smi
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/ /"
sudo add-apt-repository contrib
sudo apt-get update
sudo apt-get -y install cuda-11-2
nvidia-smi
# install useful package
sudo apt-get -y install python3-venv
# creates venv
python3 -m venv myvenv
# activate it
source myvenv/bin/activate
# upgrade pip
pip install --upgrade pip
# install spacy
pip install -U spacy
# download the trf model
python -m spacy download en_core_web_trf
# install other pip packages and dependencies
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
# point to the correct cuda folder
export CUDA_PATH="/usr/local/cuda-11"
# install spacy transformers info
pip install -U spacy[cuda113,transformers]
# and install the correct version of cupy
# here more info: https://docs.cupy.dev/en/stable/install.html#installing-cupy
pip install cupy-cuda113
python
>>> import spacy
>>> spacy.require_gpu()
True
>>> import cupy
>>> a = cupy.zeros((1,1))
57