Linux/Pytorch/CUDA/Jetson/Conda 常用命令

1. 判断cuda 是否可用

torch.cuda.is_available()
print(torch.cuda.is_available()) # 查看CUDA是否可用
print(torch.cuda.device_count()) # 查看可用的CUDA数量
print(torch.version.cuda) # 查看CUDA的版本号

2. 查看jtson版本

sudo apt-cache show nvidia-jetpack

3. 创建conda 环境

conda create -n smart(环境名) python=3.10


4. 修改源

conda config --remove-key channels
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

5.  

Docker 从容器拷贝文件到主机
sudo docker cp 1d318aef4c83:/root/service /home/ 

Linux 传文件到另一个服务器
scp /home/bin.tar.gz [email protected]:/home/dir

Linux 查看某个文件的checksum 
md5sum 文件名

Linux 查看历史操作记录
history | grep docker

你可能感兴趣的:(pytorch,深度学习,python)