Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender 2.93.5: Node not using GPUs even with correct Cuda version and devices found #11

Open
ghost opened this issue Nov 15, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 15, 2021

I built a new image based on this repo's Dockerfile.cuda11 and https://github.com/zocker-160/blender-docker/blob/master/Dockerfile.cuda11 to use Blender 2.93.5 (latest at this moment). I only modified the major/minor version numbers and set the "local" flag to "true".

My cards are recognized on the host and use Cuda 11
image

The container also reports those devices:

found following CUDA devices:
[<bpy_struct, CyclesDeviceSettings("NVIDIA GeForce RTX 2080 Ti") at 0x7f6ff663a408>, <bpy_struct, CyclesDeviceSettings("NVIDIA GeForce RTX 2080 Ti") at 0x7f6ff663a488>, <bpy_struct, CyclesDeviceSettings("Intel Core i9-9900KF CPU @ 3.60GHz") at 0x7f6ff663a508>]
dodgy, but trying to unregister anyway
using workaround for source CR version...
starting crowdrender server in LOCAL MODE.....................

I am using a docker-compose file to run the service as such:

services:
  blender-crowd:
    build:
      context: .
    network_mode: host
    environment:
      - token=<redacted>
    container_name: blender-crowd
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

When i run a network render on my master machine, I notice that the docker container on the remote node is only using the cpu to render. Is there a way to use the two GPUs instead or additionally?

If yes, how so?

Best,
Val

EDIT: I had forgotten to setup the node to use Cuda, which is now done, but it doesn't help

image

@ghost
Copy link
Author

ghost commented Nov 15, 2021

I tried to only enable devices that contain "NVIDIA" in the name which makes sure that the CPU is not enabled for Cuda rendering.
Edited activate_gpu.py like so:

for device in bpy.context.preferences.addons['cycles'].preferences.devices:
        if 'nvidia' in device.name.lower():
                print('Using ' + device.name)
                device.use = True

Output is as expected but the GPU(s) still don't get used.

I reverted to activate all 3 devices. The render DOES happen very slowly on the CPU (maybe using Cuda?) if I enable it both in python file and in UI.

GPUs get a blip of utilization for 1 second at the very start then go quiet.

@ghost ghost changed the title Blender 3.93.5: Node not using GPUs even with correct Cuda version and devices found Blender 2.93.5: Node not using GPUs even with correct Cuda version and devices found Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants