pointnext ubuntu20.04环境配置
为什么选择20.04: 因为华硕吹雪z790A主板ubuntu不能识别网卡,为了方便选择20.04。
github仓库配置
https://zhuanlan.zhihu.com/p/628727065
链接: link
- 生成SSH密钥
ssh-keygen -t ed25519 -C "<your github email>"
一路默认即可 - 复制公钥
cat ~/.ssh/id_ed25519.pub
- 添加到github当中
new ssh key 即可 添加刚刚复制的。 - 测试
ssh -T git@github.com
#Hi zmwcj! You've successfully authenticated, but GitHub does not provide shell access.
看到这个就是配置成功了
cuda安装
https://developer.nvidia.com/cuda-11.3.0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04
链接: link
注意:
- 这里选择runfile(local)安装 避坑最后安装时没有指定版本而安装了最新的cuda
- 安装时如果已经安装了驱动,把驱动安装的x弄掉。
环境变量配置:
#cuda path
export PATH="/usr/local/cuda-11.3/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH"
export CUDA_HOME=/usr/local/cuda-11.3
测试
nvcc -V
#
#nvcc: NVIDIA (R) Cuda compiler driver
#Copyright (c) 2005-2021 NVIDIA Corporation
#Built on Sun_Mar_21_19:15:46_PDT_2021
#Cuda compilation tools, release 11.3, V11.3.58
#Build #cuda_11.3.r11.3/compiler.29745058_0
gcc安装
新机器直接安装gcc-9
sudo apt-get install gcc-9 g++-9
有多个gcc,指定gcc
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
sudo update-alternatives --config gcc
手动设置
#验证
gcc -v
g++ -v
git Pointnext
注意: install前必须装好cuda
git clone git@github.com:guochengqian/PointNeXt.git
cd PointNeXt
source install.sh
数据集
s3dis
链接: link
运行
这里为了方便测试使用vpdb 生成配置文件
安装pip install vpdb
vpdb CUDA_VISIBLE_DEVICES=0 python examples/segmentation/main.py \
--cfg cfgs/s3dis/pointnext-s.yaml mode=train