ai-dock / comfyui

ComfyUI docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
650 stars 224 forks source link

Found no NVIDIA driver on your system. #6

Closed minifisk closed 1 year ago

minifisk commented 1 year ago

I'm getting the error " Found no NVIDIA driver on your system." when spinning up this image on my Mac M1, any ideas on how to fix it?

Traceback (most recent call last):
  File "/opt/ComfyUI/main.py", line 72, in <module>
    import execution
  File "/opt/ComfyUI/execution.py", line 12, in <module>
    import nodes
  File "/opt/ComfyUI/nodes.py", line 20, in <module>
    import comfy.diffusers_load
  File "/opt/ComfyUI/comfy/diffusers_load.py", line 4, in <module>
    import comfy.sd
  File "/opt/ComfyUI/comfy/sd.py", line 5, in <module>
    from comfy import model_management
  File "/opt/ComfyUI/comfy/model_management.py", line 114, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "/opt/ComfyUI/comfy/model_management.py", line 83, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "/opt/micromamba/envs/comfyui/lib/python3.10/site-packages/torch/cuda/__init__.py", line 674, in current_device
    _lazy_init()
  File "/opt/micromamba/envs/comfyui/lib/python3.10/site-packages/torch/cuda/__init__.py", line 247, in _lazy_init
    torch._C._cuda_init()
RuntimeError: 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
Starting ComfyUI...
** ComfyUI start up time: 2023-10-31 10:39:32.162144

Prestartup times for custom nodes:
   0.0 seconds: /opt/ComfyUI/custom_nodes/ComfyUI-Manager

Traceback (most recent call last):
  File "/opt/ComfyUI/main.py", line 72, in <module>
    import execution
  File "/opt/ComfyUI/execution.py", line 12, in <module>
    import nodes
  File "/opt/ComfyUI/nodes.py", line 20, in <module>
    import comfy.diffusers_load
  File "/opt/ComfyUI/comfy/diffusers_load.py", line 4, in <module>
    import comfy.sd
  File "/opt/ComfyUI/comfy/sd.py", line 5, in <module>
    from comfy import model_management
  File "/opt/ComfyUI/comfy/model_management.py", line 114, in <module>
    total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
  File "/opt/ComfyUI/comfy/model_management.py", line 83, in get_torch_device
    return torch.device(torch.cuda.current_device())
  File "/opt/micromamba/envs/comfyui/lib/python3.10/site-packages/torch/cuda/__init__.py", line 674, in current_device
    _lazy_init()
  File "/opt/micromamba/envs/comfyui/lib/python3.10/site-packages/torch/cuda/__init__.py", line 247, in _lazy_init
    torch._C._cuda_init()
RuntimeError: 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
Starting ComfyUI...
robballantyne commented 1 year ago

Hi

Unfortunately I have no hardware to test builds for Apple, so I don't yet support them. I would like to, but for now I can only build for amd64 with NVIDIA and ROCm.

franckdsf commented 10 months ago

@robballantyne I am having the same issue but I'm on Windows with a RTX 3080. I cloned the repository and ran a docker compose up command with the following .env file

CF_TUNNEL_TOKEN=
CF_QUICK_TUNNELS=false
COMFYUI_BRANCH="master"
COMFYUI_FLAGS=
COMFYUI_PORT=8188
DIRECT_ADDRESS="localhost"
DIRECT_ADDRESS_GET_WAN=false
GPU_COUNT=1
PROVISIONING_SCRIPT=
SKIP_ACL=true
SSH_PORT_LOCAL=22
SSH_PUBKEY=
WEB_ENABLE_AUTH=false
WEB_USER="user"
WEB_PASSWORD="password"
WORKSPACE="/workspace/"
WORKSPACE_SYNC=false

Changing the WORKSPACE_SYNC=true removes this error but I'm stuck on the supervisor portal with the following log :

supervisor-1  | ==> /var/log/sync.log <==
supervisor-1  | Waiting for workspace mamba sync...
robballantyne commented 10 months ago

I believe it's not removing the error but rather it's delaying the error until the workspace sync completes - It's a slow process that's only really meant to be used with cloud provider network storage.

When that process completes you'll encounter the same issue as ComfyUI begins it's startup procedure.

If the Nvidia drivers are not found it's likely that the Nvidia container runtime is not installed correctly.