Код: Выделить всё
import torch
torch.cuda.is_available()
Код: Выделить всё
>>> import torch
>>> torch.cuda.is_available()
/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/torch/cuda/__init__.py:129: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 500: named symbol not found (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0
False
Код: Выделить всё
FROM nvidia/cuda:12.6.2-cudnn-devel-ubuntu24.04
RUN bash -i -c "source ~/.bashrc && python -m pip install llvmlite torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu121"
Код: Выделить всё
# nvidia-smi
Mon Nov 11 03:48:10 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.51.01 Driver Version: 565.90 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| 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 GeForce RTX 3060 Ti On | 00000000:01:00.0 On | N/A |
| 0% 44C P8 9W / 200W | 810MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
моя версия cuda — 12.7, но мой набор инструментов cuda — 12.6.2 — (я не могу найти версия 12.7)
Я запускаю это через докер, используя Windows wsl, nvidia-smi в wsl и внутри докера дают тот же результат
Подробнее здесь: https://stackoverflow.com/questions/791 ... evicecount
Мобильная версия