nytimes/rd-blender-docker

Trying to run blender headless and access the interactive python interpreter

taranlu-houzz opened this issue · 1 comments

Hello,

I am trying access Blender's python interpreter within the container. I am running your docker image like this: docker run -ti --rm nytimes/blender:latest, but then when I try to run Blender like this: blender --python-console it fails like this:

root@46216929c17c:/# blender --python-console
Unable to open a display
Aborted (core dumped)
root@46216929c17c:/#

Starting Blender like this appears to work locally on my laptop (I am able to get to the interactive Python shell and import bpy, etc.). Do you happen to know how I can get around this error? I suppose I can just use -b and pass it a Python script directly, but I wanted to be able to access the console interactively for development.

Thanks!

Turns out the solution is to just add the -b flag (as in, blender -b --python-console). Not sure why that is required when running within the container (I don't need the -b flag locally).

Anyway, that appears to solve my issue.