国外网友的方法
I found one more setting to check that sets Blender to use CPU. I rendered using this script(gpurender.py):
import bpybpy.context.scene.cycles.device = 'GPU'bpy.ops.render.render(True)
Command-line was:
blender -b file.blend -E CYCLES -t 0 -o `pwd`/outpre -P gpurender.py
If you check in python, bpy.context.scene.cycles.device will probably be CPU. I've tested and this uses the GPU on my EC2 instance.