随笔 - 27  文章 - 16  评论 - 1  阅读 - 36828

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 update
sudo apt install openssh-server
sudo apt upgrade
sudo apt install nvidia-driver-550
sudo apt install python3.10-venv python3-pip
cd /usr/local
mkdir gpu
python3 -m venv gpu
source gpu/bin/activate
vim /etc/bash.bashrc #alias gpu='source /usr/local/gpu/bin/activate'
pip install -i https://mirrors.bfsu.edu.cn/pypi/web/simple numpy pandas scipy matplotlib jupyter notebook scikit-learn scikit-image librosa seaborn opencv-python
pip install -i https://mirrors.bfsu.edu.cn/pypi/web/simple torch torchvision torchaudio
pip install -i https://mirrors.bfsu.edu.cn/pypi/web/simple tensorflow wfdb tqdm dill
apt install libopencv-dev python3-opencv
vim /etc/inputrc #history-search
vim /etc/sudoers #Cmnd_Alias SHUTDOWN_CMDS = /sbin/poweroff, /sbin/reboot, /sbin/halt, /sbin/shutdown
            #ALL ALL=(ALL) NOPASSWD:SHUTDOWN_CMDS
crontab -e #20 1,6 * * 1,4,6,0 /usr/bin/python3 /home/XX/Documents/check.py

mkdir ~/.pip
cd ~/.pip
sudo gedit ~/.pip/pip.conf

[global]
index-url=https://mirrors.bfsu.edu.cn/pypi/web/simple
extra-index-url=
https://pypi.tuna.tsinghua.edu.cn/simple
https://pypi.mirrors.ustc.edu.cn/simple


[install]
trusted-host=mirrors.bfsu.edu.cn
pypi.tuna.tsinghua.edu.cn
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 apt-get remove --purge nvidia*

dkms status
sudo update-initramfs -u

reboot...

install the driver again:

sudo apt install nvidia-driver-525

(do not add anything else)

posted on   medsci  阅读(205)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
历史上的今天:
2019-01-13 some bash commands
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示