安装软件

查看是哪个 cat /etc/X11/default-display-manager

https://www.linuxidc.com/Linux/2020-01/162142.htm

PS1=’${debian_chroot:+($debian_chroot)}[\033[01;35m]\u[\033[01;35m]@[\033[01;32m]\h[\033[01;31m]:[\033[01;35m]\w [\033[01;32m]\$ [\033[01;36m]‘

  • 挂载硬盘

    sudo mount /dev/sda1 /home/guojia/ee

  • 查看内核与已有内核

    uname -a Linux guojia-ThinkStation-P720 5.4.0-105-generic #119~18.04.1-Ubuntu SMP Tue Mar 8 11:21:24 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 510.47.03 Mon Jan 24 22:58:54 UTC 2022 GCC version: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

dpkg —get-selections | grep linux-image linux-image-5.4.0-105-generic install √ linux-image-5.4.0-42-generic install linux-image-generic-hwe-18.04 install

gcc —version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  • 安装nvidia显卡驱动,如下

    ubuntu-drivers devices ##查看版本## == /sys/devices/pci0000:16/0000:16:00.0/0000:17:00.0 == modalias : pci:v000010DEd00001C30sv000010DEsd000011B3bc03sc00i00 vendor : NVIDIA Corporation model : GP106GL [Quadro P2000] 显卡 driver : nvidia-driver-450-server - distro non-free driver : nvidia-driver-470 - distro non-free driver : nvidia-driver-390 - distro non-free driver : nvidia-driver-418-server - distro non-free driver : nvidia-driver-510-server - distro non-free recommended 推荐驱动 driver : nvidia-driver-470-server - distro non-free driver : nvidia-driver-510 - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin ##查看版本或者## sudo apt list nvidia-driver* sudo apt install ##安装##

  • 装高了,删除

    • 装上驱动后,可以用“nvidia-smi”,可查看推荐的cuda版本
    • 装上cuda后,可以用“nvcc -V”,可查看实际安装的cuda版本

    sudo apt-get —purge remove “nvidia“ sudo apt-get purge nvidia#删除驱动(20.04用过这个代码过后可能会导致简便方法无法使用) sudo apt-get —purge remove “cuda“ “cublas#删除cuda 不好用

    1. cd /usr/local/cuda/bin
    2. sudo ./uninstall_cuda_x.x.pl
    3. sudo ./cuda-uninstaller
  • 安装cuda 貌似装高了

https://zhuanlan.zhihu.com/p/143429249 【好用】
https://zhuanlan.zhihu.com/p/72298520
https://blog.csdn.net/weixin_54424184/article/details/122654844 【好用,结合使用】

  • 验证cuda找不到—-安装g++
  • 验证cudnn找不到 ——-sudo apt-get install libfreeimage3 libfreeimage-dev
  • 安装cudnn

https://www.cnblogs.com/gcxblogs/p/14669522.html
官网,装有三个lib包,for ubuntu18的

创建环境失败,修改condarc https://blog.csdn.net/liamkiki/article/details/123499598

conda内容

torch3

  1. python 3.8.13
  2. torch 1.11.0+cu102、、、1.10.2
  3. numpy 1.22.3
  4. tensorboard 1.15.0