I use a headless Xubuntu Server 18.04.3 with two GTX 970 cards as a render farm. This has worked with Blender up to 2.79 but is now broken in 2.80.
Basic command to that used to work:
blender -b foo.blend -o foo_ -E CYCLES -F AVIJPEG -P cuda0m.py -x 1 -a
import bpy, _cycles bpy.context.scene.cycles.device = 'GPU' prefs = bpy.context.user_preferences.addons['cycles'].preferences prefs.compute_device_type = 'CUDA'
I fixed one API error (
user_preferences is now
preferences in 2.8) and the render runs but not on the cards. I'm thinking I'm not pointing Blender to use the GPUs correctly.
If the python is correct, it could be another issue: I installed 2.80 with:
apt remove blender snap install blender --classic
...and I'm seeing a warning line when I run the script that could conceivably be the culprit:
/run/user/1000/snap.blender/gvfs/ non-existent directory