I have copied Blender.exe
and all associated files into Azure API App
then try to run it with my custom Python script like this (using System.Dianostics.Process
()):
blender.exe --background --python myscript.py
But can not get it run properly. Note that it works fine in my local IIS.
So the question is does Azure App support to run Blender? (as Blender may need to have GPU support machine to run, and Azure does not support GPU yet)
And if yes, so how to see what error return from the blender.exe
command? (I am unable to remote desktop to Azure Api App
to run the command manually unfortunately)
UPDATED:
I can run blender script above successfully using Azure Console
command line by hand.
But when run the script using code System.Diagnostics.Process
() it got this error from StandardError stream:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
OSError: [WinError 6] The handle is invalid
@MinhNguyen, According to the wiki page of Kudu, Azure App Services which include Api App are not support scenarios using GDI+ because of Win32k.sys (User32/GDI32) Restrictions, but blender works with gdi32
. So unfortunately blender can not work on Azure Api App, please consideration for Azure Cloud Service or Virtual Machine for blender.
Update: As @MinhNguyen comments said, blender can be run manually in Kudu console, although it seems blender works with GDI because of compiling blender need gdi32.lib. So the solution for the issue is that package blender.exe and related python script as a webjob to run on Azure.