I have two Windows 10 computers in the same network. I installed OpenSSH and can remotely connect from one computer from another.
I have a blend file that is set to render by GPU. If I use ssh to log in another computer and then render the file by command line, blender in the remote computer will use GPU for rendering. E.g.,
blender -b test.blend -f 1
However, if I send the same command in the ssh call directly, blender will use CPU. E.g.,
ssh remote_computer blender -b test.blend -f 1
I tried to use a python script, as recommended elsewhere, and call a batch file instead. However, blender still use CPU. E.g.,
ssh remote_computer gpu.bat
The content of gpu.bat is something like
blender -b test.blend -E CYCLES -t 0 -P gpu.py -f 1
The gpu.py is from this question: How do I force the netrender to render everything on GPU?
In short, the remote computer can render using GPU. It will also render using GPU if I use ssh to log in a shell and then call blender in the shell. However, if I use ssh to send a command directly, either in ssh or through a batch file, Blender uses CPU for rendering.
How to force Blender in the remote computer to use GPU for rendering, without logging in and call it inside the shell?