ubuntu 18.04 从零开始复现 OpenPCDet 训练kitti数据集并评估 可视化 损失函数

Posted 用券买土豆

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 18.04 从零开始复现 OpenPCDet 训练kitti数据集并评估 可视化 损失函数相关的知识,希望对你有一定的参考价值。

ubuntu 18.04 复现OpenPCDet

前言:

我已经装好了nvidia460.91.03版本驱动,并且也装了10.1版本的cuda。
但由于OpenPCDet中要装spconv(巨坑的库),10.2以上版本的cuda才能pip安装2.0版本的spconv,不然老版本的spconv太难装了(踩坑无数)。所以为了避开spconv太难安装,我选择用高版本的cuda,后续配环境的话直接pip岂不香

所以第一步就是 多版本cuda安装/切换 (非多版本cuda的谨慎借鉴哈!)

  1. 下载11.1版本的cuda run文件(官方下载网址 有其他很多版本)
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
sudo sh cuda_11.1.0_455.23.05_linux.run

(再多一句,wget不想用的话,可以直接把wget后面(即https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run)的网址复制到浏览器,就可以下载了。该方法适合任何wget带网址的下载)

然后就是安装11.1版本的cuda。首先在sudo sh cuda_11.1.0_455.23.05_linux.run后选择continue,然后输入accept,进入安装选项cuda installer
这里面的X代表选择,按enter键取消X消失(即不选择)。
我因为装过驱动了,所以驱动那个选项不选,其他全选了,然后就是选install,进行安装,一会就安装好了。

此时cuda11.1安装完毕,然后就是在~/.bashrc里面添加路径

原本只装一个版本的话,路径添加如下:

export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-10.1/bin:$PATH
export CUDA_HOME=/usr/local/cuda-10.1

多版本的话需要换种写法,如下:

export CUDA_HOME=/usr/local/cuda
export PATH=$PATH:$CUDA_HOME/bin 
export LD_LIBRARY_PATH=/usr/local/cuda/lib64$LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH

nvcc -V后还是10.1,这是因为软连接还没有变,所以接下来就是换软连接。

sudo rm -rf /usr/local/cuda                                      #删除之前创建的软链接
sudo ln -s /usr/local/cuda-11.1  /usr/local/cuda      #创建新 cuda 的软链接

此时再换个终端nvcc -V,就会变为cuda11.1。

然后就是安装cudnn (cudnn官方下载地址)
然后选择和cuda版本相匹配的版本,这里因为我要为cuda11.1装cudnn,所以我选的是cudnn-11.1-linux-x64-v8.0.5.39.tgz
下载之后解压:

tar zxvf cudnn-11.1-linux-x64-v8.0.5.39.tgz

然后就是:

sudo cp include/cudnn*.h /usr/local/cuda/include/  #没*的话后面会报错
sudo cp lib64/lib* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

然后建立cudnn的软连接

cd /usr/local/cuda/lib64/
sudo chmod +r libcudnn.so.8.0.5
sudo ln -sf libcudnn.so.8.0.5 libcudnn.so.8
sudo ln -sf libcudnn.so.8 libcudnn.so
sudo ldconfig  

若是有下面的错误:
借用下别人的图哈,我自己的忘记截图了!
解决办法:
对于不是符号链接的文件,执行以下操作:

sudo mv /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.org

sudo mv /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.org

sudo mv /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.org

sudo mv /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.org

sudo mv /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.org

sudo mv /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.org

然后再sudo ldconfig 就没问题了。

然后查看cudnn版本:

cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -A 2

但又来问题了:

解决办法是用下面的命令即可正确查看cudnn版本:

cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2


至此,多版本cuda并存/切换完成。
后面开始配OpenPCDet环境

1. 创建虚拟环境

conda create -n pcdet python=3.7

安装pytorch、torchvision和torchaudio
(注意版本匹配问题,不然容易出各种问题,尽量使用我这套版本,很多人用都没问题的,我用的版本:torch1.8.1+cu111 torchvision0.9.1+cu111 torchaudio==0.8.1):

whl轮子下载地址 推荐用
官网下载地址(但这种方法下载很慢,巨慢的,建议第一种)

我就用的是whl安装的,在whl轮子下载地址里面找到匹配版本的torch和torchvision,然后cd到下载目录pip安装他们

再安装torchaudio==0.8.1(因为我没看到它,笑死,可能眼小把!)

然后验证下成功与否和能用否:

python
import torch    # 如正常则静默
torch.__version__ #查看torch版本
import torchvision
 torchvision.__version__ #查看torchvision版本
 torch.cuda.is_available() #正常的话返回“True”
a = torch.Tensor([1.])    # 如正常则静默
a.cuda()    # 如正常则返回"tensor([ 1.], device='cuda:0')"
from torch.backends import cudnn # 如正常则静默
cudnn.is_acceptable(a.cuda())    # 如正常则返回 "True"


然后就是重头戏了!!!!安装spconv!!!

前面我们说过,10.2以上的cuda可以直接pip安装spconv如下:

pip install spconv-cu111   #我的cuda是11.1,自己根据cuda版本来选择spconv版本


安装完成(是不是很简单啊?哈哈哈!)

然后验证安装的spconv能用不:

import spconv.pytorch as spconv


哈哈,无误!!!

至此,OpenPCDet还差一小部分就OK了。

克隆OpenPCDet

git clone https://github.com/open-mmlab/OpenPCDet.git

然后安装pcdet库和一些依赖。

python setup.py develop

接下来就等把,会需要一段时间,其中scikit-image llvmlite等库 比较难下载(应该是外网的原因,科学上网应该可以轻松解决),容易超时报错(本人试了两次都超时),解决方法(拿scikit-image举个例子,其他的类同):

打开上面圈起来的网址,然后本地下载(确实好慢,下了十来分钟),下载完毕后在离线安装

再接着来

python setup.py develop

成功后如下图;

再贴一张conda list 图:

接下来就是准备训练拉!

首先就是准备数据(数据格式如下图)和生成数据的一些信息:

python -m pcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml



接下来就可以训练模型了,cd到tools下面:

python train.py --cfg_file ./cfgs/kitti_models/pointpillar_pyramid_aug.yaml  --batch_size 4 --epochs 50

训练中的亚子


训练结束后会自动评估最后一个模型,然后是下面的亚子:


训练结束后,我们来demo一下看看效果:

首先安装可视化工具mayavi(这次方法不太对,总有错误,正确方法看文章最后,有正确安装方法

pip3 install mayavi 

(可以尝试下pip install mayavi 后续的错或许就没了呢?后续发现貌似先安装VTK,在安装mayavi就好了,具体可以看我下面最后有详细介绍

静等安装完成,然后测试下能用不:

python
import mayavi


发现一切正常,心中窃喜,赶紧输入可视化命令:

python demo.py --cfg_file ./cfgs/kitti_models/pointpillar_pyramid_aug.yaml --ckpt /home/juzhen/OpenPCDet/output/cfgs/kitti_models/pointpillar_pyramid_aug/default/ckpt/checkpoint_epoch_50.pth --data_path /home/juzhen/OpenPCDet/data/kitti/testing/velodyne/000517.bin(其中的ckpt和点云数据路径根据自己的情况改下)

然后报错ModuleNotFoundError: No module named ‘importlib_resources’:
那就安装呗:pip install importlib_resources

成功后继续可视化,傻眼了,又错ModuleNotFoundError: No module named 'vtkCommonCorePython'


这次pip安装不了了,尝试解决,未果!不明白为啥,那就放弃用mayavi。 改用open3d

pip install open3d 

太慢,取消掉重新来
在后面添加镜像源

pip install open3d -i https://pypi.tuna.tsinghua.edu.cn/simple

芜湖,速度起飞!

然后安装完成测试;

没问题,继续可视化(心想总可以了把?),然而…报错ImportError: numpy.core.multiarray failed to import

那就继续克服困难把,找了半天,可算有个方法可行了(大致就是有多个numpy把)。。。。

pip show numpy
pip uninstall numpy


卸载numpy1.20.0,然后再pip show numpy


果然还有一个版本的numpy1.19.2(这个貌似是创建虚拟环境的时候安装的),后面安装pcdet0.5.2的时候,貌似又装了(依稀记得的哈!)
卸载它!远离它!!!!
这时候pip show numpy 彻底没了,那我就再装回numpy1.20.0

然后就是见证奇迹的时刻,继续可视化!!

python demo.py --cfg_file ./cfgs/kitti_models/pointpillar_pyramid_aug.yaml --ckpt /home/juzhen/OpenPCDet/output/cfgs/kitti_models/pointpillar_pyramid_aug/default/ckpt/checkpoint_epoch_50.pth --data_path /home/juzhen/OpenPCDet/data/kitti/testing/velodyne/000517.bin(再说一次,注意路径哈)

OK,可视化木得问题啦,稍微开心下!

后面我又去看了下损失函数的图像:

pip install tensorboardX
pip install tensorflow

然后在/home/juzhen/OpenPCDet/output/cfgs/kitti_models/pointpillar_pyramid_aug/default/tensorboard(也就是events.out.tfevents.文件夹下)打开终端激活pcdet的虚拟环境,输入:

tensorboard --logdir=/home/juzhen/OpenPCDet/output/cfgs/kitti_models/pointpillar_pyramid_aug/default/tensorboard


右键打开红色框网址,查看训练过程中的损失函数可视化:

从图上可以看出损失函数并没有平滑的收敛,这是因为图片上显示的是每个batch的loss,不是epoch的loss,想看epoch的loss需要自己加点代码(我还没弄),加完后如下如所示(图片是别人的借用下。上面是每个epoch的loss图,很平滑。下面是openpcdet原始loss):

至此,完结。撒花!!

注:
后续我又重装了一遍,可视化使用的是mayavi工具包。下面我记录下mayavi的使用记录!**使用了不同的安装命令**
在你的虚拟环境下

pip install vtk==8.1.2
pip install mayavi
python
import mayavi


看起来和我前面一样,估计还会有错,果然,我用的时候提示:

ImportError: Could not import backend for traitsui.  Make sure you
        have a suitable UI toolkit like PyQt/PySide or wxPython
        installed.

解决方法:

pip install pyside2


然后就再试一下:
O了,木的问题!!!

以上内容仅为自己学习记录,原创不易。转载请标明出处,拜谢!!!

Ubuntu 20.04 从零开始安装MySQL 8.0并重置root密码

步骤

  1. sudo apt-get autoremove --purge mysql*
  2. sudo apt-get update
  3. sudo apt-get install mysql-server
  4. service mysql status
    running...
  5. sudo cat /etc/mysql/debian.cnf
    # Automatically generated for Debian scripts. DO NOT TOUCH!
    [client]
    host     = localhost
    user     = debian-sys-maint
    password = tZmePZ77d177DYWR
    socket   = /var/run/mysqld/mysqld.sock

     
  6. mysql -u debian-sys-maint -p
    输入上面的密码 tZmePZ77d177DYWR
  7. mysql> SHOW VARIABLES LIKE 'validate_password%'; 
    +--------------------------------------+--------+
    | Variable_name                        | Value  |
    +--------------------------------------+--------+
    | validate_password.check_user_name    | ON     |
    | validate_password.dictionary_file    |        |
    | validate_password.length             | 8      |
    | validate_password.mixed_case_count   | 1      |
    | validate_password.number_count       | 1      |
    | validate_password.policy             | MEDIUM |
    | validate_password.special_char_count | 1      |
    +--------------------------------------+--------+
    7 rows in set (0.01 sec)

    关于 mysql 密码策略相关参数;
    1)、validate_password_length  固定密码的总长度;
    2)、validate_password_dictionary_file 指定密码验证的文件路径;
    3)、validate_password_mixed_case_count  整个密码中至少要包含大/小写字母的总个数;
    4)、validate_password_number_count  整个密码中至少要包含阿拉伯数字的个数;
    5)、validate_password_policy 指定密码的强度验证等级,默认为 MEDIUM;
    关于 validate_password_policy 的取值:
    0/LOW:只验证长度;
    1/MEDIUM:验证长度、数字、大小写、特殊字符;
    2/STRONG:验证长度、数字、大小写、特殊字符、字典文件;
  8. mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'Fuc*USA8';
    密码自己定义,默认需要:大小写字母+数字+符号+长度8位
  9. mysql> flush privileges;
  10. mysql> exit
  11. service mysql restart
  12. service mysql status
  13. mysql -uroot -p
    输入你设置的新密码即可
  14. 搞定

 

鸣谢

How To Install MySQL on Ubuntu 20.04 | DigitalOceanhttps://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04Your password does not satisfy the current policy requirements_一尘在心的博客-CSDN博客关于这个问题是在 《 基于MySQL Yum存储库在Linux-7.2上安装MySQL-5.7.21数据库服务(实战篇) 》 时遇到的问题,这是 mysql 初始化时,使用临时密码,修改自定义密码时,由于自定义密码比较简单,就出现了不符合密码策略的问题。密码策略问题异常信息:ERROR 1819 (HY000): Your password does not satisfy the cur...https://blog.csdn.net/zhanaolu4821/article/details/93622812生成随机密码 - 密码生成器生成随机密码https://suijimimashengcheng.bmcx.com/?r=@

修改Ubuntu下MySQL v8.0.26的root密码 - 解决Linux下安装MySQL 8后无法使用PASSWORD()函数修改root密码的问题_Rudon滨海渔村的博客-CSDN博客核心关键使用命令sudo apt install mysql-server mysql-client无法弹出密码设置界面,是因为最新版Mysql8需要手动去修改登录密码mysql8默认不开启用户root,默认用户是debian-sys-maint,其默认密码是存在/etc/mysql/debian.cnfmysql8已经抛弃PASSWORD()函数MySQL :: MySQL 8.0 Reference Manual :: 12.14 Encryption and Compression Funhttps://blog.csdn.net/qq285744011/article/details/120743369

完整经历

rudon@vmu:~$ mysql -uroot -p
Command 'mysql' not found, but can be installed with:
sudo apt install mysql-client-core-8.0     # version 8.0.27-0ubuntu0.20.04.1, or
sudo apt install mariadb-client-core-10.3  # version 1:10.3.31-0ubuntu0.20.04.1
rudon@vmu:~$ service mysql status
Unit mysql.service could not be found.
rudon@vmu:~$ 
rudon@vmu:~$ sudo apt-get update
[sudo] rudon 的密码: 
命中:1 http://packages.microsoft.com/repos/code stable InRelease
命中:2 https://mirrors.ustc.edu.cn/ubuntu focal InRelease                      
命中:3 https://mirrors.ustc.edu.cn/ubuntu focal-updates InRelease              
命中:4 https://mirrors.ustc.edu.cn/ubuntu focal-backports InRelease
命中:5 https://dl.google.com/linux/chrome/deb stable InRelease
命中:6 https://mirrors.ustc.edu.cn/ubuntu focal-security InRelease        
命中:7 https://mirrors.ustc.edu.cn/ubuntu focal-proposed InRelease        
忽略:8 https://deepin-wine.i-m.dev  InRelease        
命中:9 https://deepin-wine.i-m.dev  Release
忽略:10 https://deepin-wine.i-m.dev  Release.gpg
正在读取软件包列表... 完成
rudon@vmu:~$ sudo apt-get install mysql-server
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
将会同时安装下列软件:
  libaio1 libcgi-pm-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libhtml-template-perl libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils
  mysql-client-8.0 mysql-client-core-8.0 mysql-common mysql-server-8.0 mysql-server-core-8.0
建议安装:
  libipc-sharedcache-perl mailx tinyca
推荐安装:
  libcgi-fast-perl
下列【新】软件包将被安装:
  libaio1 libcgi-pm-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libhtml-template-perl libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils
  mysql-client-8.0 mysql-client-core-8.0 mysql-common mysql-server mysql-server-8.0 mysql-server-core-8.0
升级了 0 个软件包,新安装了 15 个软件包,要卸载 0 个软件包,有 7 个软件包未被升级。
需要下载 31.5 MB 的归档。
解压缩后会消耗 262 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 mysql-common all 5.8+1.0.5ubuntu2 [7,496 B]
获取:2 https://mirrors.ustc.edu.cn/ubuntu focal-updates/main amd64 mysql-client-core-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [4,423 kB]
获取:3 https://mirrors.ustc.edu.cn/ubuntu focal-updates/main amd64 mysql-client-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [22.0 kB]
获取:4 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 libaio1 amd64 0.3.112-5 [7,184 B]
获取:5 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 libevent-core-2.1-7 amd64 2.1.11-stable-1 [89.1 kB]
获取:6 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 libevent-pthreads-2.1-7 amd64 2.1.11-stable-1 [7,372 B]
获取:7 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 libmecab2 amd64 0.996-10build1 [233 kB]
获取:8 https://mirrors.ustc.edu.cn/ubuntu focal-updates/main amd64 mysql-server-core-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [18.4 MB]
获取:9 https://mirrors.ustc.edu.cn/ubuntu focal-updates/main amd64 mysql-server-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [1,313 kB]                     
获取:10 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 libcgi-pm-perl all 4.46-1 [186 kB]                                                   
获取:11 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB]                                           
获取:12 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 mecab-utils amd64 0.996-10build1 [4,912 B]                                           
获取:13 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 mecab-ipadic all 2.7.0-20070801+main-2.1 [6,714 kB]                                  
获取:14 https://mirrors.ustc.edu.cn/ubuntu focal/main amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-2.1 [4,380 B]                              
获取:15 https://mirrors.ustc.edu.cn/ubuntu focal-updates/main amd64 mysql-server all 8.0.27-0ubuntu0.20.04.1 [9,548 B]                           
已下载 31.5 MB,耗时 24秒 (1,314 kB/s)                                                                                                           
正在预设定软件包 ...
正在选中未选择的软件包 mysql-common。
(正在读取数据库 ... 系统当前共安装有 232601 个文件和目录。)
准备解压 .../0-mysql-common_5.8+1.0.5ubuntu2_all.deb  ...
正在解压 mysql-common (5.8+1.0.5ubuntu2) ...
正在选中未选择的软件包 mysql-client-core-8.0。
准备解压 .../1-mysql-client-core-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb  ...
正在解压 mysql-client-core-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在选中未选择的软件包 mysql-client-8.0。
准备解压 .../2-mysql-client-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb  ...
正在解压 mysql-client-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在选中未选择的软件包 libaio1:amd64。
准备解压 .../3-libaio1_0.3.112-5_amd64.deb  ...
正在解压 libaio1:amd64 (0.3.112-5) ...
正在选中未选择的软件包 libevent-core-2.1-7:amd64。
准备解压 .../4-libevent-core-2.1-7_2.1.11-stable-1_amd64.deb  ...
正在解压 libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
正在选中未选择的软件包 libevent-pthreads-2.1-7:amd64。
准备解压 .../5-libevent-pthreads-2.1-7_2.1.11-stable-1_amd64.deb  ...
正在解压 libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ...
正在选中未选择的软件包 libmecab2:amd64。
准备解压 .../6-libmecab2_0.996-10build1_amd64.deb  ...
正在解压 libmecab2:amd64 (0.996-10build1) ...
正在选中未选择的软件包 mysql-server-core-8.0。
准备解压 .../7-mysql-server-core-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb  ...
正在解压 mysql-server-core-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在设置 mysql-common (5.8+1.0.5ubuntu2) ...
update-alternatives: 使用 /etc/mysql/my.cnf.fallback 来在自动模式中提供 /etc/mysql/my.cnf (my.cnf)
正在选中未选择的软件包 mysql-server-8.0。
(正在读取数据库 ... 系统当前共安装有 232826 个文件和目录。)
准备解压 .../0-mysql-server-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb  ...
正在解压 mysql-server-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在选中未选择的软件包 libcgi-pm-perl。
准备解压 .../1-libcgi-pm-perl_4.46-1_all.deb  ...
正在解压 libcgi-pm-perl (4.46-1) ...
正在选中未选择的软件包 libhtml-template-perl。
准备解压 .../2-libhtml-template-perl_2.97-1_all.deb  ...
正在解压 libhtml-template-perl (2.97-1) ...
正在选中未选择的软件包 mecab-utils。
准备解压 .../3-mecab-utils_0.996-10build1_amd64.deb  ...
正在解压 mecab-utils (0.996-10build1) ...
正在选中未选择的软件包 mecab-ipadic。
准备解压 .../4-mecab-ipadic_2.7.0-20070801+main-2.1_all.deb  ...
正在解压 mecab-ipadic (2.7.0-20070801+main-2.1) ...
正在选中未选择的软件包 mecab-ipadic-utf8。
准备解压 .../5-mecab-ipadic-utf8_2.7.0-20070801+main-2.1_all.deb  ...
正在解压 mecab-ipadic-utf8 (2.7.0-20070801+main-2.1) ...
正在选中未选择的软件包 mysql-server。
准备解压 .../6-mysql-server_8.0.27-0ubuntu0.20.04.1_all.deb  ...
正在解压 mysql-server (8.0.27-0ubuntu0.20.04.1) ...
正在设置 libmecab2:amd64 (0.996-10build1) ...
正在设置 mysql-client-core-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在设置 libcgi-pm-perl (4.46-1) ...
正在设置 libhtml-template-perl (2.97-1) ...
正在设置 mecab-utils (0.996-10build1) ...
正在设置 libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
正在设置 mysql-client-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在设置 libaio1:amd64 (0.3.112-5) ...
正在设置 libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ...
正在设置 mecab-ipadic (2.7.0-20070801+main-2.1) ...
Compiling IPA dictionary for Mecab.  This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################| 
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
emitting double-array: 100% |###########################################| 
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix      : 100% |###########################################| 

done!
update-alternatives: 使用 /var/lib/mecab/dic/ipadic 来在自动模式中提供 /var/lib/mecab/dic/debian (mecab-dictionary)
正在设置 mysql-server-core-8.0 (8.0.27-0ubuntu0.20.04.1) ...
正在设置 mecab-ipadic-utf8 (2.7.0-20070801+main-2.1) ...
Compiling IPA dictionary for Mecab.  This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################| 
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
emitting double-array: 100% |###########################################| 
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix      : 100% |###########################################| 

done!
update-alternatives: 使用 /var/lib/mecab/dic/ipadic-utf8 来在自动模式中提供 /var/lib/mecab/dic/debian (mecab-dictionary)
正在设置 mysql-server-8.0 (8.0.27-0ubuntu0.20.04.1) ...
update-alternatives: 使用 /etc/mysql/mysql.cnf 来在自动模式中提供 /etc/mysql/my.cnf (my.cnf)
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 8734
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
正在设置 mysql-server (8.0.27-0ubuntu0.20.04.1) ...
正在处理用于 man-db (2.9.4-2) 的触发器 ...
正在处理用于 libc-bin (2.33-0ubuntu5) 的触发器 ...
rudon@vmu:~$ 
rudon@vmu:~$ service mysql status
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-11-03 10:05:01 CST; 22s ago
    Process: 8856 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 8864 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 19088)
     Memory: 358.1M
     CGroup: /system.slice/mysql.service
             └─8864 /usr/sbin/mysqld

11月 03 10:05:01 vmu systemd[1]: Starting MySQL Community Server...
11月 03 10:05:01 vmu systemd[1]: Started MySQL Community Server.
rudon@vmu:~$ 
rudon@vmu:~$ mysql -uroot -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
rudon@vmu:~$ 
rudon@vmu:~$ sudo mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Access denied for user 'root'@'localhost' (using password: YES)
rudon@vmu:~$ echo 'What is the password????'
What is the password????
rudon@vmu:~$ 
rudon@vmu:~$ ll /etc/mysql/debian.cnf 
-rw------- 1 root root 317 11月  3 10:04 /etc/mysql/debian.cnf
rudon@vmu:~$ 
rudon@vmu:~$ cat /etc/mysql/debian.cnf 
cat: /etc/mysql/debian.cnf: 权限不够
rudon@vmu:~$ sudo cat /etc/mysql/debian.cnf 
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = tZmePZ77d177DYWR
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = tZmePZ77d177DYWR
socket   = /var/run/mysqld/mysqld.sock
rudon@vmu:~$ 
rudon@vmu:~$ mysql -u debian-sys-maint -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \\g.
Your MySQL connection id is 11
Server version: 8.0.27-0ubuntu0.20.04.1 (Ubuntu)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified with mysql_native_password by '123456';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'tZmePZ77d177DYWR';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'http://baidu.rudon.cn';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> SHOW VARIABLES LIKE 'validate_password%'; 
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password.check_user_name    | ON     |
| validate_password.dictionary_file    |        |
| validate_password.length             | 8      |
| validate_password.mixed_case_count   | 1      |
| validate_password.number_count       | 1      |
| validate_password.policy             | MEDIUM |
| validate_password.special_char_count | 1      |
+--------------------------------------+--------+
7 rows in set (0.01 sec)

mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'Jzmt3Mcq';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'JB*mysql';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'Fuc*USA8';
Query OK, 0 rows affected (0.01 sec)

mysql> 
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> exit
Bye
rudon@vmu:~$ service mysql restart
rudon@vmu:~$ mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \\g.
Your MySQL connection id is 8
Server version: 8.0.27-0ubuntu0.20.04.1 (Ubuntu)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.

mysql> exit
Bye
rudon@vmu:~$ mysql -v
ERROR 1045 (28000): Access denied for user 'rudon'@'localhost' (using password: NO)
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ 
rudon@vmu:~$ service mysql status
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-11-03 10:36:36 CST; 3min 44s ago
    Process: 10824 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 10832 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 19088)
     Memory: 358.1M
     CGroup: /system.slice/mysql.service
             └─10832 /usr/sbin/mysqld

11月 03 10:36:35 vmu systemd[1]: Starting MySQL Community Server...
11月 03 10:36:36 vmu systemd[1]: Started MySQL Community Server.
rudon@vmu:~$ 

以上是关于ubuntu 18.04 从零开始复现 OpenPCDet 训练kitti数据集并评估 可视化 损失函数的主要内容,如果未能解决你的问题,请参考以下文章

从零开始的ROS学习之环境配置,ros安装

从零开始的ROS学习之环境配置,ros安装

从零开始的ROS学习之环境配置,ros安装

从零开始搭建深度学习环境

从零开始搭建深度学习环境

LIO-SAM:从零开始的自车实时数据复现