[OpenMMLab]基于WSL2搭建OpenMMLab调试环境

基于WSL2搭建OpenMMLab调试环境

WSL2安装

https://learn.microsoft.com/zh-cn/windows/wsl/install-manual#step-4—download-the-linux-kernel-update-package

WSL2安装完毕后,打开windows store(关闭VPN),搜索Ubuntu18.04并进行安装

需要注意的是:由于cuda对ubuntu的版本有要求,所以一般安装18.04或者20.04

安装vs code

https://learn.microsoft.com/zh-cn/windows/wsl/tutorials/wsl-vscode
vscode安装调试python所需的相应拓展:
Python
Python Extension Pack

wsl2与windows代理设置

https://zhuanlan.zhihu.com/p/153124468

wsl2安装conda

https://www.anaconda.com/products/distribution#Downloads
安装完conda后需要重启WSL2

pip挂载清华源

https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

安装cuda 11.3

https://developer.nvidia.com/cuda-11.3.0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local
注意Distribution中选择,WSL-Ubuntu

wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
chmod 777 Anaconda3-2022.10-Linux-x86_64.sh
bash Anaconda3-2022.10-Linux-x86_64.sh
vim ~/.bashrc
# 在最后一行添加export PATH="/usr/local/cuda/bin:$PATH"
source ~/.bashrc

配置OpenMMLab的Conda虚拟环境

安装pytorch

https://pytorch.org/get-started/previous-versions/
建议安装1.11版本

git clone以下源码:
mmyolo
mmdetection 3.x
mmengine
mmcv 2.x
mmcv需要根据环境完成编译:https://mmcv.readthedocs.io/en/latest/get_started/build.html
为方便查看源码,完成软连接:
cd mmyolo
ln -s …/mmengine/mmengine/ mmengine
ln -s …/mmdetection/mmdet mmdet
ln -s …/mmcv/mmcv/ mmcv\

根据官网教程进行安装其余库(不要安装软连接的库):
https://mmyolo.readthedocs.io/zh_CN/latest/get_started.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值