Code Monkey home page Code Monkey logo

rd-blender-docker's Introduction

Blender in Docker

A collection of Docker containers for running Blender headless or distributed ✨

Python version License Build status
Wiki 📝 • Docker tags 🏷️ • Contributing 🛠 • Docker Hub 🐋

Getting started

The images in this repository are autogenerated by running the generate.py script. The script uses manifest.json image definitions to define different versions and capabilities. To quickly get started with using the images head over to our wiki page.

Docker tags

  • nytimes/blender:latest - Latest GPU image with latest Blender version

3.3.1

  • nytimes/blender:3.3.1-cpu-ubuntu18.04
  • nytimes/blender:3.3.1-gpu-ubuntu18.04

3.2

  • nytimes/blender:3.2-cpu-ubuntu18.04
  • nytimes/blender:3.2-gpu-ubuntu18.04

3.1

  • nytimes/blender:3.1-cpu-ubuntu18.04
  • nytimes/blender:3.1-gpu-ubuntu18.04

3.0

  • nytimes/blender:3.0-cpu-ubuntu18.04
  • nytimes/blender:3.0-gpu-ubuntu18.04

2.93

  • nytimes/blender:2.93-cpu-ubuntu18.04
  • nytimes/blender:2.93-gpu-ubuntu18.04

2.92

  • nytimes/blender:2.92-cpu-ubuntu18.04
  • nytimes/blender:2.92-gpu-ubuntu18.04

2.91

  • nytimes/blender:2.91-cpu-ubuntu18.04
  • nytimes/blender:2.91-gpu-ubuntu18.04

2.90

  • nytimes/blender:2.90-cpu-ubuntu18.04
  • nytimes/blender:2.90-gpu-ubuntu18.04

2.83

  • nytimes/blender:2.83-cpu-ubuntu18.04
  • nytimes/blender:2.83-gpu-ubuntu18.04

2.82

  • nytimes/blender:2.82-cpu-ubuntu18.04
  • nytimes/blender:2.82-gpu-ubuntu18.04

2.81

  • nytimes/blender:2.81-cpu-ubuntu18.04
  • nytimes/blender:2.81-gpu-ubuntu18.04

2.80:

  • nytimes/blender:2.80-cpu-ubuntu18.04
  • nytimes/blender:2.80-gpu-ubuntu18.04

Contributing

To contribute a new image make sure you:

  • Add the image definition in the manifest.json
  • Add the image to this README in the Docker tags section
  • run the generate.py script (for instance using docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3.8-slim python generate.py)
  • ensure that you can build by running docker build -t blender . in the folders where the new Dockerfile were generated
  • ensure that containerized blender can run docker run -it blender blender --version
  • add the pipelines in .drone.yml
  • PR your change and if the change is approved, we will deploy it Docker Hub

This repository is maintained by the Research & Development team at The New York Times and is provided as-is for your own use. For more information about R&D at the Times visit rd.nytimes.com

rd-blender-docker's People

Contributors

flask avatar jrbeaudoin avatar juniorxsound avatar nagtechie avatar oliverpool avatar smoores-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rd-blender-docker's Issues

Headless rendering?

Hello,

I have a linux server without a display attached. I try running blender -b <file>.blend -a which from the documentation, should run the render in the background. Instead I keep getting the following:

root@blender-test:~# blender -b file.blend -a
Blender 2.91.0 (hash 0f45cab862b8 built 2020-11-25 08:51:08)
found bundled python: /bin/2.91/python
Read blend: /root/file.blend
Unable to open a display
Aborted (core dumped)

Is there a way to run this headless using your container image?

GPU support in DockerFile

Hello,

I want to use this image via DockerFile but I wonder how to get GPU support.

FROM nytimes/blender:3.0-gpu-ubuntu18.04

...

If I run blender cli inside my container I can't access the gpu devices: The command 'bpy.context.preferences.addons["cycles"].preferences.get_devices()' returns None.

Please guide me here.

Thank you!

Wiki: Using with VS Code and Remote-Containers

I use your images with VS Code and the Remote-Containers add-on. This requires some setup which includes a devcontainer.json file to specify the run command. I thought that someone else might find this useful, so here's a short instruction that you could add to the wiki pages.

I've also added the functionality of having the Blender configuration persist between runs.

Cheers :)

Instructions

  1. Create a project folder and open it in VS Code. Add a .devcontainer folder.
  2. Create a devcontainer.json file inside it with the content as shown below.
  3. Also create an empty .config/blender folder.
  4. Execute the container by pressing Ctrl+⇧Shift+P and run the command Remote-Containers: Reopen in Container.
  5. From the integrated terminal, run blender.

Folder structure

This is the folder structure before running the container.

.
├── .devcontainer
│   └── devcontainer.json
│   ├── .config
│   │   └── blender
├── Docker (Not required)
│   └── Dockerfile
Folder structure after execution After running the container once, including running Blender, the folder structure should look something similar to this:
 .
├── blender_file.blend
├── .devcontainer
│   ├── .config
│   │   └── blender
│   │       └── 2.92
│   │           └── config
│   │               ├── platform_support.txt
│   │               ├── recent-files.txt
│   │               └── userpref.blend
│   └── devcontainer.json
├── Docker
│   └── Dockerfile

devcontainer.json

{
	"name": "blender",
	//// Use this if you use a custom image.
	//"build": {
	//	"dockerfile": "../Docker/Dockerfile",
	// },
	// Use this if you only need to run the image directly. 
	"image": "nytimes/blender:latest",
	"settings": {
		"terminal.integrated.shell.linux": "/bin/bash"
	},

	"workspaceMount": "source=${localWorkspaceFolder},target=/root/${localWorkspaceFolderBasename},type=bind", 
	"workspaceFolder": "/root/${localWorkspaceFolderBasename}",
	// We also mount the config folder from the host system. This way, settings 
	// inside the container are kept between runs.
	"mounts": [
		"source=${localWorkspaceFolder}/.devcontainer/.config/blender,target=/root/.config/blender/,type=bind"
	],
	"runArgs": [
		"-it", 
		"--rm", // Removes the container on exit. Remove this if you want the container to keep running.
		"--gpus", "all",
		"-v", "/tmp/.X11-unix:/tmp/.X11-unix:rw", 
		"-v", "/tmp/.docker.xauth:/tmp/.docker.xauth:rw", 
		"-e", "DISPLAY=${localEnv:DISPLAY}", 
		"-e", "XAUTHORITY=/tmp/.docker.xauth", 
		"--device", "/dev/dri/card0:/dev/dri/card0"
	],
	"extensions": []
}

Issues

I've tried doing this is VS Codium (the open source version of VS Code), and I couldn't get it to work.

Running blender container with GUI

First of all, thank you for this useful repo! :)

  1. Is it possible to run blender with GUI in the container? if so how can that been done?
  2. If (1) is possible can you please upload an image version of blender 2.79b?

Thank you in advance!

Support for Optix

Hi,

First of all, thanks for the great work you've made. The images you provide are very useful. However I'm currently trying to render frames using Nvidia OptiX but the container does not seem to be able to locate any other OptiX device than the CPU. It works perfectly with CUDA. Also, if I run it directly on the host machine, the OptiX device gets properly located (Nvidia T4).

Do you have any hints ?

Thanks in advance

"Unable to open a display" when rendering with Eevee

Hi,

So I've been working lately on my own Dockerfile trying to get blender setup in a container. I was successful to get it containerized, but I noticed that when I entered my container to render my Monkey.blend file using this command blender --background Monkey.blend --render-output /tmp --render-frame 1 it gave me the following error:

Blender 2.82 (sub 7) (hash 375c7dc4caf4 built 2020-03-12 05:30:40)
AL lib: (EE) ALCplaybackOSS_open: Could not open /dev/dsp: No such file or directory
found bundled python: /usr/bin/blender-2.82a-linux64/2.82/python
Read blend: /usr/bin/blender-2.82a-linux64/Monkey.blend
Unable to open a display
Aborted (core dumped)

So I thought maybe my Dockerfile was faulty, so I gave this repo (nytimes) a try, specifically this Dockerfile.

Build command I used: docker build -t nytimes .
Run command I used: docker run -d -t --name nytimes.container nytimes

Afterwards I saw that it was running, so I then entered the container with docker exec -it nytimes.container /bin/bash

I then proceeded to use the following command to render my Monkey.blend (as a test) that I copied to the /tmp folder in the container.
blender --background /tmp/Monkey.blend --render-output /tmp --render-frame 1

But I receive the same error as my other container.
Blender 2.82 (sub 7) (hash 77d23b0bd76f built 2020-02-12 17:14:50)
AL lib: (EE) ALCplaybackOSS_open: Could not open /dev/dsp: No such file or directory
found bundled python: /bin/2.82/python
Read blend: /tmp/Monkey.blend
Unable to open a display
Aborted (core dumped)

Clearly I'm doing something wrong, or misunderstand how I need to correctly use the container. I double checked the /tmp folder but nothing was present in it, only the Monkey.blend file.

What is the correct way of doing this?

System & version:
host OS Ubuntu 18.04
Docker engine 19.03.8

apt update failed, because of "CUDA Linux Repository Key Rotation"

# apt update
W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is no longer signed.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100

Refrence:
https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212772
NVIDIA/nvidia-container-toolkit#258

Hard time to find how to start it

docker run --net=host -it --privileged --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v "$HOME/.Xauthority:/root/.Xauthority:rw" --device=/dev/dri/card0:/dev/dri/card0 docker.io/nytimes/blender:latest /bin/blender

Cycles & EEVEE:not using GPU rendering

Thanks for providing blender docker images. I was trying to render a video with GPU support on a linux server using your pre-build image(nytimes/blender:2.82-gpu-ubuntu18.04)
I use the following command to render my project.

Firstly, I create the docker via:
nvidia-docker run -it -v /home/myProjec/myProject -p 9678:22 nytimes/blender:2.82-gpu-ubuntu18.04 /bin/bash the Docker version of my server is 19.02, for Docker 19.03 or later, one can use docker run --gpus all -it xxx to launch the container.

Then, I enter the container and change the dir to myProject. I have already prepared *.blend, *.py under myProject. Thus, I call blender to get the rendering result via:
blender -b *.blend -P *.py -o output -a


What confused me is that blender is not using CUDA for rendering.

  1. For Cycles Render Engine, it took 2 seconds to render each frame locally on my windows PC with RTX 1080Ti. However, it took 9 seconds for each frame in the docker with RTX 2080Ti . When I call nvidia-smi to check the GPU memory usage on Linux server, there is no process running. To force CUDA rendering, I select GPU COMPUTE in *.blend file and add bpy.context.preferences.addons['cycles'].preferences.compute_device_type = 'CUDA' in *.py file, but neither operation works.
  2. For EEVEE Render Engine, I receive this error Unable to open a display Aborted (core dumped). If I use vnc or xvfb to generate a virtual display, then OpenGL won't be call while rendering(https://yigityakupoglu.home.blog/)

Is there a way to fix Cycles/EEVEE CUDA rendering?
Thx!

Stop building and deploying pre-LTS images

What?

Right now we build and deploy all images (in manifest.json) on every push to main branch which consumes resources and is prawn to surfacing errors for legacy images that we no longer maintain. As suggested in #43 it'd be good to move to a model where we build and deploy

Add-ons

Hi,

Thanks for this useful repos! Is it possible for you to add a guide about how to use add-ons in this docker image? Thanks!

What is the port the blender ?

Hello I have created the docker container from the Docker file that you provides but I can't able to access the software from the browser can you please let me know in what port I should map my docker container to access the application as you didn't mentioned the EXPOSE in the docker file

Difficult to access the software

Thanks for the information but when I run the docker container from the image it is showing that "WARNING: IPv4 forwarding is disabled. Networking will not work."

How can I fix this issue?

I have the requirement to deploy the blend software inside the docker and want to access the software through browser by mapping the ports from the host to container

Trying to run blender headless and access the interactive python interpreter

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!

Leaner release process

Hi, after making a couple of PRs (#34 #39 #43) I thought that the process for releasing new images could be simplified.

I ended up creating a new repo for CPU images: https://github.com/oliverpool/blender-cpu-image/pkgs/container/blender-cpu-image

Main differences:

  • the release process is much easier: I just have to push a tag (corresponding to a blender version)
  • the build happens via github actions so anyone can see the log
  • the docker image is stored on github infrastructure ghcr.io/oliverpool/blender-cpu-image:3.3.0
  • the tag contains the patch version (3.3.0 and not 3.3)
  • the base image is (currently) ubuntu 22.04
  • it is limited to CPU rendering

I also simplified the Dockerfile:

  • python is shipped with blender, so no need for a separate install (I just add a symlink to /bin/python to ease its use)
  • numpy is a recent version (so no reinstalling)

Feel free to have a look. I would really like to have some feedback!

Eevee Headless Rendering - Help

I have come here with lots of hopes:)

I have used blender gpu image(3.3) version inside my docker.
My cluster is own aws and have good amount of gpu , cpu and ram.

My first question is :

  • Is there any optimized way to render eeve in headless mode inside my docker container.
  • My blender automatically killed inside the middle of rendering. Dont know the issue..why this is happening.
  • Cycle rendering is to slow. I am exporting video of 30 second which takes around half an hour in 30 samples only. so cycle is not the way i would like to follow. Eeve is so much fast as compared to cycle but not supported in headless mode.

Any help would be much appriciated.

FR: Blender 2.90

Great containers! When will 2.90 and future releases be added?

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

On ubuntu 21.04 :

root@Z390-AORUS-PRO:/home/ziomario/Scaricati/blender-cont# docker run --gpus all nytimes/blender:2.82-gpu-ubuntu18.04 nvidia-smi
Unable to find image 'nytimes/blender:2.82-gpu-ubuntu18.04' locally
2.82-gpu-ubuntu18.04: Pulling from nytimes/blender
d519e2592276: Pull complete
d22d2dfcfa9c: Pull complete
b3afe92c540b: Pull complete
13a10df09dc1: Pull complete
4f0bc36a7e1d: Pull complete
cd710321007d: Pull complete
514c7cd6e78a: Pull complete
44874f59d9f6: Pull complete
14971d62f48e: Pull complete
b608b01371f0: Pull complete
c8c606e5e9fd: Pull complete
5d4f90d0e554: Pull complete
c4d0341b3546: Pull complete
809b064dc084: Pull complete
08b51053f4e9: Pull complete
2a4b7a552e0c: Pull complete
Digest: sha256:7b1994a22eeff37116d9f76719e49f345522aafb2d41fbcb536a2eddfd9733e7
Status: Downloaded newer image for nytimes/blender:2.82-gpu-ubuntu18.04
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
ERRO[0052] error waiting for container: context canceled

Blender 3.4

Can we have a Blender 3.4 image?

It introduces Eevee headless render which is highly needed.

There's a PR but no activity: #51

EEVEE not working on Azure VM docker container - Unable to open a display

@juniorxsound
First of all thank you for the support you all are providing through this repo. When i tried mounting the device on Azure VM i ran into below error. I'm using Ubuntu 18.04, blender 2.92 and Docker version 20.10.5, build 55c4c88.

Below shows the GPU setup of my remote server.
image

Initially when i ran the sh file (here) it showed below error:
xauth: file /root/.Xauthority does not exist
xauth: (argv):1: unable to read any entries from file "(stdin)"

Then i created .Xauthority file using below commands

touch ~/.Xauthority
xauth generate $DISPLAY . trusted

But it gives an error ===> xauth: (argv):1: unable to open display "."
Could you please help me on why these errors are generated and also on how to create a DISPLAY for the remote server?

GPU could not be enabled in blender 3.0

Hi:
Many thanks for your help on blender 3.0 docker images.

Recently we have been working on upgrading the docker image, but somehow we failed to run it in CUDA mode(which do work with blender 2.9* images).

We want to enable GPU with the following function(which works before):

def enable_gpus():
    cycles_addon = bpy.context.preferences.addons['cycles']
    cycles_addon.preferences.compute_device_type = 'CUDA'
    bpy.context.scene.render.engine = "CYCLES"
    bpy.context.scene.cycles.device = "GPU"

But we don't why, bpy.context.preferences.addons['cycles'].preferences.devices returns an empty list. as a result , we are not managed to change compute_devide_type.

As a workaround, we run blender 3.0 in graphics mode, and edit => preference => system, choosing CUDA manually. then we are able to see more than 1 devices in bpy.context.preferences.addons['cycles'].preferences.devices

Doesn't seem to support GPUs assigned through python script

With a headless blender it is normally possible to use a python script to assign specific devices before rendering, but for some weird reasons, all the version (2.83, 2.90, 2.91) containerized with this repo that I tried seems to ignore the instructions given by the file. For example, if I use the following command

docker run --gpus all --ipc=host -v /mnt/vol_b/blender_input:/volume/blender_input -v /mnt/vol_b/blender_output:/volume/output nytimes/blender:2.90-gpu-ubuntu18.04 blender -b /volume/blender_input/water_sim.blend -E CYCLES -P /volume/blender_input/device_select.py -a

The expected behavior is that a render will be started with the script device_select.py (shown below) activating only the CUDA graphics card.

import re
import bpy
import time
from datetime import datetime
scene = bpy.context.scene
scene.cycles.device = 'GPU'
print("~~~~~> scene device: {}".format(scene.cycles.device))
prefs = bpy.context.preferences
cprefs = prefs.addons['cycles'].preferences
cuda, opencl = cprefs.get_devices()
print("~~~~~> cprefs: {}".format(cprefs))
print("~~~~~> cuda devices: {}".format(cuda))
for compute_device_type in ('CUDA'):
  try:
    cprefs.compute_device_type = compute_device_type
    print('~~~~~> compute device found type set', compute_device_type)
    break
  except TypeError:
    pass
for device in cuda:
    print('~~~~~> Activating', device)
    device.use = (device.type != 'CPU')
    print("~~~~~> device {} usage status: {}".format(device, device.use))

for device in opencl:
    print('~~~~~> Deactivating', device)
    device.use = (device.type != 'CPU')
    print("~~~~~> device {} usage status: {}".format(device, device.use))

Unfortunalety, this doesn't work with the dockerized blender found in this repo. But it does locally on my machine.

Here’s all the things I verified and confirmed are:

  • The cuda drivers are properly loaded in the docker container
  • I tested with a different project (simple default cube project) and I get the same results
  • I loaded and tried different versions of blender using the following containers nytimes/blender:2.83-gpu-ubuntu18.04, and nytimes/blender:2.91-gpu-ubuntu18.04 with the same problem
  • Blender runs fine otherwise and renders properly on CPU
  • The script print the modifications made before launching the animation render and the parameters are as expected

Any help would be appreciated.

Cheers!

Headless Rendering with Eevee

My goal is to generate some images using the Eevee renderer on google cloud run. There is no GPU device, so I believe I need to fake one (as mentioned in #3 )

Here is what my Dockerfile looks like:

FROM nytimes/blender:3.0-cpu-ubuntu18.04
WORKDIR /flask_app
RUN apt-get update && apt-get install xvfb mesa-utils x11-utils python-opengl -y
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN pip install gunicorn pyglet pyvirtualdisplay

COPY * ./
RUN chmod a+x boot.sh

ENTRYPOINT ["./boot.sh"]

I have a python script that builds my scene and renders it (works as expected when run locally). To the top of this file I added:

from pyvirtualdisplay import Display
Display().start()

However I am still not able to get the image to render. Is there anything else I need to do to get Eevee working?

Import issue after latest numpy release

numpy 1.24.0 got release on 18 Dec 2022 (https://pypi.org/project/numpy/#history).

Since we are not specifying the fixed version of numpy in the build (https://github.com/nytimes/rd-blender-docker/blob/master/generate.py#L107) it installs the latest one automatically.

GLTF import is failing with the latest numpy version and Blender 3.3:

AttributeError: module 'numpy' has no attribute 'bool'. Did you mean: 'bool_'?
    raise AttributeError("module {!r} has no attribute "
  File "/usr/bin/3.3/python/lib/python3.10/site-packages/numpy/__init__.py", line 284, in __getattr__
    poly_smooths = np.empty(num_polys, dtype=np.bool)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py", line 607, in set_poly_smoothing
    set_poly_smoothing(gltf, pymesh, mesh, vert_normals, loop_vidxs)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py", line 424, in do_primitives

    do_primitives(gltf, mesh_idx, skin_idx, mesh, tmp_ob)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py", line 46, in create_mesh
    return create_mesh(gltf, mesh_idx, skin_idx)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py", line 25, in create
    mesh = BlenderMesh.create(gltf, pynode.mesh, pynode.skin)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_node.py", line 223, in create_mesh_object
    obj = BlenderNode.create_mesh_object(gltf, vnode)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_node.py", line 51, in create_object
    obj = BlenderNode.create_object(gltf, vnode_id)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_node.py", line 30, in create_vnode
  [Previous line repeated 2 more times]
    BlenderNode.create_vnode(gltf, child)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_node.py", line 44, in create_vnode
    BlenderNode.create_vnode(gltf, child)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_node.py", line 44, in create_vnode
    BlenderNode.create_vnode(gltf, child)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_node.py", line 44, in create_vnode
    BlenderNode.create_vnode(gltf, 'root')
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_scene.py", line 36, in create
    BlenderScene.create(gltf)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py", line 40, in _create
    BlenderGlTF._create(gltf)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py", line 33, in create
    BlenderGlTF.create(gltf_importer)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/__init__.py", line 1221, in unit_import
    return self.unit_import(self.filepath, import_settings)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/__init__.py", line 1206, in import_gltf2
    return self.import_gltf2(context)
  File "/usr/bin/3.3/scripts/addons/io_scene_gltf2/__init__.py", line 1173, in execute
Traceback (most recent call last):
  poly_smooths = np.empty(num_polys, dtype=np.bool)
/usr/bin/3.3/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py:607: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.  (This may have returned Python scalars in past versions.
  bpy.ops.object.delete({"selected_objects": objs})

Question: what to copy in staged builds

Hi everyone, thanks for putting together this image! Just had a quick question, and hope it's alright to post here.

If I want to use this in a staged build, what are the minimal files I need to copy over?

For example...

# --- stage 1 ---
FROM nytimes/blender:3.2-cpu-ubuntu18.04 as blender_build

# --- stage 2 ---
FROM some-other-image/example as final_build
COPY --from=blender_build . /root/blender/  # <-- should I copy everything?
# ... rest of build script

Blender 4.1

Please could Blender 4.1 support be added? It has some fixes that are required for a project I am working on.

ARM architecture support

I was trying to build the the image for RPi4b but unfortunately end up with error.

Please add build instruction/ images for ARM/v6

opencv-python problem

Hello.

In my script that I run inside docker I have troubles with opencv-python module.
The thing is, when I install opencv in system python and use cv2.imread('/image/path') it reads image normally. Also, when I enter in /bin/blender_version/python/bin/python_version and run cv2.imread('image/path'), it also works normally.
But, when I run blender with script, such as /bin/blender --python my_script.py -b -- -a arg1 ... and when my script reaches the part with cv2.imread('/image/path') it reads empty image. To be precise cv2.imread returns None.
And to add a bit of information, it prints this warning just when attempting to cv2.imread :
libpng-1.5.13 but running with 1.6.35 opencv.

Only thing I changed with Dockerfile provided in this repo is additionally installing the opencv-python in blender provided python (and also in python provided in this repo).
Also installed this package because blender fails to even try running my script in background without it:
libgtk2.0-dev

I used version blender2.81 (cpu and gpu), blender2.82 (cpu and gpu), blender2.83(cpu and gpu).

Also, for more additional info I am currently running this on windows host. But I'll try running this on linux in few hours, but I'm writing here before because I really can't even start to think where this might me failing me.

Thanks in advance!

Edit: Forgot to add libgtk2.0-dev dependency in issue description.

Edit 2: Tested it with my arch host machine and still the same result. Also just now I remembered to add docker version. On windows host docker -v output is: Docker version 19.03.8, build afacb8b and on arch output is: Docker version 19.03.11-ce, build 42e35e61f3

Blender 3.3

Blender 3.3 is out 🎉

Are you guys going to add it as an image? I can try to provide a PR if wanted.

Unable to open display, Blender 2.92. Did you manage to run?

Hi, thanks for clean Blender Docker repo.

have you managed to run 2.92 version inside Docker?
I can't manage to make it work.
My command blender -noaudio -b --engine CYCLES standard1-16-9.360p.blend -f 20 -- --cycles-device CPU
But still getting Unable to open display

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.