12. linux 只下在github的某一文件夹
# install subversion
apt install subversion
# /tree/master/ ---> /trunk/
# or ---> /branches/branchname/
svn checkout https://github.com/mindspore-ai/models/trunk/research/cv/ManiDP
11. 安装低版本cuda(cuda-8.0 ubuntu 18)
安装低版本的cuda如果出现以下问题
Can’t locate InstallUtils.pm in @INC (you may need to install the InstallUtils module)
解决方法
sh ./cuda_8.0.61_375.26_linux.run --tar mxvf
sudo cp cuda/InstallUtils.pm /usr/lib/x86_64-linux-gnu/perl-base
10. nvidia驱动失效
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Make sure that the latest NVIDIA driver is installed and running.
# 使用 gcc-7.5
sudo apt-get install dkms #DKMS全称是Dynamic Kernel Module Support,它可以帮我们维护内核外的这些驱动程序,在内核版本变动之后可以自动重新生成新的模块。
sudo dkms install -m nvidia -v 版本号
查找驱动版本
ls /usr/src | grep nvidia
9. 卸载apt-get
安装
# 删除软件及其配置文件
apt-get --purge remove <package>
# 删除没用的依赖包
apt-get autoremove <package>
# 此时dpkg的列表中有“rc”状态的软件包,可以执行如下命令做最后清理:
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
8. conda activate 失效问题
在账户的.bashrc
添加:
# added by Anaconda3 5.3.1 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/home/user/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/user/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/user/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
export PATH="/home/user/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
7. jupyter notebook 切换虚拟环境
在虚拟环境中执行:
conda activate envs_name
pip install ipykernel
python -m ipykernel install --user --name=envs_name
在jupyter中切换kernel
6. 服务器调用可视化界面方法
方法一:配置远程 jupyter notebook
方法二:下载 MobaXterm https://mobaxterm.mobatek.net/
进入账户 .bashrc
文件添加
LC_ALL=C
export LC_ALL
5. 升级cmake
(3.20)问题
卸不卸载旧版本都可
下载源码:https://cmake.org/download/
tar xf cmake-x.xxx
cd cmake-x.xxx
./configure
cmake 如果没有makefile文件,先cmake一下,可能会报错,根据提示关掉openssl
make
sudo make install
sudo ln -sf /usr/local/bin/* /usr/bin/ (先去/usr/local/bin/看看是不是只有cmake的东西)
cmake -version 查看版本
4. filename.whl文件安装失败
根据环境下载对应版本的.whl文件
pip/pip3 install filename.whl
3. 服务器本地传输文件
配置Xshell:属性-文件传输-Zmodem
安装lrzsz:
sudo apt-get install lrzsz
上传 rz
先定位到文件夹,再上传
下载 sz filename
2. wget
出现 403 Forbidden
下载上传
1. 安装软件提示:[Error 13] 权限不够
软件要写入的文件owner错误
chown -R user file