是的,CentOS 上的 PyTorch 完全支持 CPU。
你可以在 PyTorch 官网选择 CUDA = None,或者用 pip 直接安装:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
或用 conda:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
import torch
print(torch.__version__)
print(torch.cuda.is_available()) # False 表示使用的是 CPU 版
如果你有 具体 CentOS 版本 或 Python 版本,我可以给你更精确的安装建议。