You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
train.py gives off CUDA warning when trying to use docker with cpu only.
To Reproduce (REQUIRED)
Start latest docker container without gpus
Run python train.py --device cpu --epoch 2
Output:
root@641d4b75809c:/usr/src/app# python train.py --device cpu --epoch 2
/opt/conda/lib/python3.8/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:100.)
returntorch._C._cuda_getDeviceCount() > 0
YOLOv5 v4.0-6-g6ab5895 torch 1.8.0a0+1606899 CPU
🐛 Bug
train.py
gives off CUDA warning when trying to use docker with cpu only.To Reproduce (REQUIRED)
python train.py --device cpu --epoch 2
Output:
Program runs as expected afterwards.
Expected behavior
No warning given
Environment
Additional context
Offending line is
yolov5/utils/torch_utils.py
Line 64 in 6ab5895
A simple fix would be to change to
PR that changed this: #1826
I checked the CI and noticed that they don't receive this warning which is confusing since they should not have any GPUs too.
The text was updated successfully, but these errors were encountered: