开发喵星球

cmd

gsettings set org.gnome.desktop.interface text-scaling-factor 1.25

背景:我们在ubuntu系统下写程序时,文件夹及文档的字体太小,看起来很累眼,现将字体调大方法记录如下,只需2分钟即可解决!!

sudo apt-get install openssh-server
sudo /etc/init.d/ssh start

sudo service ssh start
sudo systemctl enable –now ssh
sudo apt-get install net-tools
sudo ps -e | grep ssh

sudo ufw allow ssh

sudo apt install gnome-tweaks
gnome-tweaks

nvidia-smi

ubuntu-drivers devices

wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
sudo sh cuda_11.8.0_520.61.05_linux.run

nvcc –version
nano ~/.bashrc

source ~/.bashrc

import torch

查看torch版本

print(‘— torch版本 —‘)
print(torch.version)

查看cuda版本

print(‘— cuda版本 —‘)
print(torch.version.cuda)

GPU是否可用

print(‘— GPU是否可用 —‘)
print(torch.cuda.is_available())

返回gpu数量

print(‘— GPU数量 —‘)
print(torch.cuda.device_count())

返回gpu名字,设备索引默认从0开始

print(‘— GPU名称 —‘)
n = 0
while n < torch.cuda.device_count():
print(torch.cuda.get_device_name(n))
n += 1

代码测试

print(‘— PyTorch代码测试 —‘)
print(torch.rand(3,3))
print(‘— PyTorch代码测试(在GPU上测试PyTorch代码) —‘)
print(torch.rand(3,3).cuda())

conda create -n langchain python=3.11.7

conda activate langchain

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

pip3 install torch torchvision torchaudio –index-url https://download.pytorch.org/whl/cu118

sudo apt install git

Beautiful and sexy girl

sudo chmod +x /etc/init.d/start.sh

   
分类:未分类 作者:吃我一拂尘 发表于:2024-03-30 13:48:52 阅读量:104
<<   >>


powered by kaifamiao