1.查看显卡型号
2.在https://en.wikipedia.org/wiki/CUDA上查看显卡算力,这里显卡为1650,算力为7.5
3.查看显卡算力对应的cuda版本
4slurm上该怎么办?
查看slurm上计算节点cuda版本
查看cuda版本
srun -A 2022099 -J job1 -p Gnode --gres=gpu:1 time nvidia-smi
srun: job 1307539 queued and waiting for resources
srun: job 1307539 has been allocated resources
Sun Oct 20 20:36:04 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 520.61.05 Driver Version: 520.61.05 CUDA Version: 11.8 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA A800-SXM... On | 00000000:AD:00.0 Off | 0 |
| N/A 27C P0 52W / 400W | 0MiB / 81920MiB | 0% Default |
| | | Disabled |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
0.00user 0.13system 0:00.13elapsed 95%CPU (0avgtext+0avgdata 15132maxresident)k
0inputs+0outputs (0major+4008minor)pagefaults 0swaps
在pytorch官网(https://pytorch.org/)查看pytorch安装命令,选择适合自己的cuda版本
#新建虚拟环境
conda create -n yolov8 python=3.8
#激活
conda activate yolov8
#安装torch,
按上面的pytorch安装
#conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.7 -c pytorch -c nvidia
#下载源码
git clone https://github.com/ultralytics/ultralytics.git
cd ultralytics
可以看到没有requirements.txt
但是有pyproject.toml
#如下命令安装依赖
pip install .