ubuntu2204

 

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo gedit /etc/apt/sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
sudo apt update
sudo apt upgrade
sudo apt-get install build-essential

 

sudo apt-get remove --purge nvidia*
sudo apt autoremove
sudo gedit /etc/modprobe.d/blacklist.conf
    blacklist nouveau
    options nouveau modeset=0
sudo update-initramfs -u
sudo reboot

 

#cuda
https://developer.nvidia.com/cuda-toolkit-archive
wget https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
sudo sh cuda_11.7.1_515.65.01_linux.run

 

#cudnnsudo dpkg -i cudnn-local-repo-ubuntu2204-8.5.0.96_1.0-1_amd64
The public CUDA GPG key does not appear to be installed.
sudo cp /var/cudnn-local-repo-ubuntu2204-8.5.0.96/cudnn-local-7ED72349-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpg

 

sudo apt install python3.10-venv python3-pip
python3 -m venv <DIR>
source <DIR>/bin/activate

mkdir ~/.pip
cd ~/.pip
sudo gedit ~/.pip/pip.conf
[global]
index-url=http://pypi.douban.com/simple
extra-index-url=http://mirrors.aliyun.com/pypi/simple/
extra-index-url=https://pypi.tuna.tsinghua.edu.cn/simple/
extra-index-url=http://pypi.mirrors.ustc.edu.cn/simple/

[install]
trusted-host=pypi.douban.com
trusted-host=mirrors.aliyun.com
trusted-host=pypi.tuna.tsinghua.edu.cn
trusted-host=pypi.mirrors.ustc.edu.cn

 

 Could not load dynamic library 'libnvinfer.so.7'

cd /usr/lib/x86_64-linux-gnu
ln -s libnvinfer.so.8 libnvinfer.so.7
ln -s libnvinfer_plugin.so.8 libnvinfer_plugin.so.7
ln -s libnvonnxparser.so.8 libnvonnxparser.so.7
ln -s libnvparsers.so.8 libnvparsers.so.7

cd /usr/local/cuda-12.0/lib64
ln -s libcufft.so.11 libcufft.so.10
ln -s libcusparse.so.12 libcusparse.so.11

cd env/lib/python3.10/site-packages/tensorrt 
$ export LD_LIBRARY_PATH = $LD_LIBRARY_PATH:~env/lib/python3.10/site-packages/tensorrt 

 

no module named '_tkinter'

sudo apt-get install python3-tk

 

jupyter nbconvert --to notebook --execute --inplace filter.ipynb

nvidia drivers not working

Remove all the nvidia packages... then update the kernel...

sudo update-initramfs -u

reboot...

install the driver again:

sudo apt install nvidia-driver-525

(do not add anything else)

posted on 2023-01-13 20:54  medsci  阅读(175)  评论(0编辑  收藏  举报