Skip to main content

简单记录📝

OpenVisualLabAbout 2 min

Low Latency Automotive Vision with Event Cameras paperopen in new windowcodaopen in new window知乎open in new window微信公众号open in new window

安装系统及基础软件

参考链接🔗open in new window (很久很久没更新,简单看看就行)

安装基础软件

sudo apt update
sudo apt install vim net-tools openssh-server git tmux -y
# net-tools 然后 ifconfig用来看IP地址
# 安装完openssh-server就可以远程使用ssh来配置啦

安装CUDA及驱动

https://developer.nvidia.com/cuda-downloadsopen in new window

wget https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux.run
sudo sh cuda_12.6.1_560.35.03_linux.run

历史版本:https://developer.nvidia.com/cuda-toolkit-archiveopen in new window

11.3.1open in new window

wget https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
sudo sh cuda_11.3.1_465.19.01_linux.run

写入vim ~/.bashrc

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

使用nvcc -V查看版本

显示版本号表示正常,例如

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0

配置ubuntu源(建议在软件更新中使用GUI界面设置)

https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/open in new window

配置虚拟环境及镜像源

安装miniconda

https://docs.anaconda.com/miniconda/#quick-command-line-installopen in new window

mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh

初始化(重开终端生效,显示(base)表示成功)

~/miniconda3/bin/conda init bash
~/miniconda3/bin/conda init zsh

配置Conda源

https://mirror.tuna.tsinghua.edu.cn/help/anaconda/open in new window

写入 vim ~/.condarc

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

设置PyPi源

https://help.mirrors.cernet.edu.cn/pypi/open in new window

python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.cernet.edu.cn/pypi/web/simple

镜像源合集

https://mirrors.cernet.edu.cn/site/CQUPTopen in new window

重邮镜像源,不登录电信移动账号也能用

镜像配置及使用帮助参考文档: https://help.mirrors.cernet.edu.cn/open in new window

开工(配置代码环境)

https://github.com/uzh-rpg/dagr/tree/masteropen in new window

按其README.md来, 下面只记录不同的地方

mkl找不到版本,加 -c conda-forge

conda install -y setuptools==69.5.1 mkl==2024.0 pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch -c conda-forge 

https://anaconda.org/conda-forge/mkl/filesopen in new window

git clone Permission denied (publickey)

# 生成密钥
ssh-keygen -t rsa -b 4096 -C "chs-ll"
# 查看密钥
cat ~/.ssh/id_rsa.pub

复制显示的内容到github个人账户的 [setting]->[SSH and GPG keys]->[New SSH key]

torch-geometric 和 torch-sparse 可能与 PyTorch 1.11.0 不完全兼容

pip install --force-reinstall torch-geometric torch-sparse -f https://data.pyg.org/whl/torch-1.11.0+cu113.html --proxy="http://10.16.0.81:8888"

下载没有网络

export https_proxy='http://10.16.0.81:8888'

其他

远程连接服务器open in new window

conda 常用命令open in new window

ubuntu常用命令open in new window