Comments (6)
HI @fzlee i managed enable GPU with latest Blender 3.0 image, here is the additional setting beside of yours:
# Enable CUDA
pref = bpy.context.preferences
cycles_addon = pref.addons["cycles"]
cpref = cycles_addon.preferences
cpref.compute_device_type = "CUDA"
cpref.compute_device = "CUDA_0"
# Enable and list all devices, or optionally disable CPU
print("----------------------------------------------")
cpref.get_devices()
for d in cpref.devices:
d.use = True
if d.type == "CPU":
d.use = False
print("Device '{}' type {} : {}" . format(d.name, d.type, d.use))
```
from rd-blender-docker.
@indiejoseph many thanks for your help , it did help!
from rd-blender-docker.
Thanks for the information @fzlee 🙏
Would you be able to provide a little more information about this issue? OS / Docker run command / how to replicate
Also would you mind trying to set the GPU devices using this snippet to see if that helps?
from rd-blender-docker.
@fzlee did you find any solution? facing the same problem
from rd-blender-docker.
One thing that could potentially be related is the CUDA version (was reading the requirement for building Blender and it seems to point to CUDA Toolkit 11.4, 11.3, 11.2 or 11.1 here).
Just pushed an updated image for Blender 3.0 GPU here - @fzlee @Shrhawk Would you be able to test building this image to see if that solves this issue?
from rd-blender-docker.
Hi juniorxsound:
Many thanks for your help on this.
Sorry for the late reply, we tried this push, but unfortunately, we are still not able to enable GPU.
Regarding to the former question:
OS: Ubuntu 2004
How to replicate: just run the newest docker image, and invoke the following pieces of code
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"
and you will see bpy.context.preferences.addons['cycles'].preferences.devices
returns an empty list.
from rd-blender-docker.
Related Issues (20)
- Wiki: Using with VS Code and Remote-Containers HOT 2
- docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]]. HOT 1
- EEVEE not working on Azure VM docker container - Unable to open a display HOT 6
- Support for more Ubuntu versions 💾 HOT 2
- Possible support for Blender3.0?
- Headless Rendering with Eevee HOT 1
- Unable to open a display Aborted (core dumped) HOT 4
- GPU support in DockerFile HOT 1
- apt update failed, because of "CUDA Linux Repository Key Rotation" HOT 2
- Trying to run blender headless and access the interactive python interpreter HOT 1
- Stop building and deploying pre-LTS images HOT 1
- Question: what to copy in staged builds
- Leaner release process HOT 2
- Blender 3.3 HOT 1
- Eevee Headless Rendering - Help HOT 1
- Import issue after latest numpy release
- Blender 3.4 HOT 6
- Video/GIF of what this repo does? HOT 2
- Blender 4.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rd-blender-docker.