Blender Cycles runs inside Docker cannot find any device in #72550
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#72550
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Ubuntu 18.04.3
Graphics card: NVIDIA Quadro P6000
Docker version: 19.03.5
Driver version: 435.21
CUDA version: 10.1
OpenGL version string: 4.6.0 NVIDIA 435.21
Blender Version
Broken: 2.80, 2.81, 2.81a from this URL
Worked: 2.79b
Short description of error
Cycles Engine does not find any render device in Docker.
len(bpy.context.preferences.addons['cycles'].preferences.devices) = 0
Tried on any
nvidia/cuda
tag ubuntu18.04 version 10+ image.Exact steps for others to reproduce the error
nvidia-container-toolkit
docker run --gpus=all ...
docker exec -it <container-name> bash
blender
in headless mode with this script:0
.The script above runs outside the container (in the same host machine) returns
2
(my GPU and CPU)This equivalent script:
runs in Blender 2.79b in the same condition also returns
2
UPDATE
Run this command then blender will correctly find all the devices:
This is the table describe what I was doing:
...preferences.device
...get_device()
then print...device
2
2
0
2
2
2
So I have to manually run
...get_device()
on Docker? Might this be a bug or just a minor limitation?Added subscriber: @aperture147
Added subscriber: @StephenSwaney
I wonder if this is related to OpenGL versions. What version does your Docker gpu report?
There's no XServer inside Docker, so I cannot get the OpenGL version inside it. But I got this in my host machine:
OpenGL version string: 4.6.0 NVIDIA 435.21
The docker container share the same kernel and driver. Hope this will help you to debug.
I also updated my system information, hope it will help you.
Added subscriber: @Jeroen-Bakker
Please get the system info from inside the docker container. That will show you what the docker image provides and blender is able to detect. You can test this with the minimum requirement and find out that this setup is supported or not.
At this point this feels more a support question and should perhaps be discussed in support channels first and once an actual bug on blender is found a ticket here can be created.
I've just found that use those command will make blender to find my device:
This is the table describe what I was doing:
...preferences.device
...get_device()
then print...device
2
2
0
2
2
2
So I have to manually run
...get_device()
on Docker? Might this be a bug or just a minor limitation?Added subscriber: @Blendify
Changed status from 'Needs User Info' to: 'Archived'
I am assuming this is a minor limitation due to Blender not being able to generate the preferences file which runs
get_device()
from the actual UIAdded subscriber: @pampa
This comment was removed by @pampa
I had the same problem
and the script solved it
import bpy
bpy.context.preferences.addons['cycles'].preferences.get_devices()
print(len(bpy.context.user_preferences.addons['cycles'].preferences.devices)) # Now it's 2, not zero
thanks @aperture147