nuke Run - .bat

Post Reply
cgspill
Posts: 2
Joined: Fri May 19, 2017 4:18 pm

nuke Run - .bat

Post by cgspill » Fri May 19, 2017 4:45 pm

Timur, good afternoon!
I set up Afanasy, everything works fine. If I run through Keeper (in Nuke) the farm is working faultlessly. But I want to integrate it into my pipeline and I'm not really able to write the correct .bat file.
How can this be done? That I could run a plug-in through my file. I tried to register the variables, but with the renderer an error pops up:

NukeX 10.5v1, 64 bit, built Dec 6 2016.
Copyright (c) 2016 The Foundry Visionmongers Ltd. All Rights Reserved.
File "C:\cgru\python\lib\site.py", line 176
file=sys.stderr)
^
SyntaxError: invalid syntax

Example my .bat file:
@echo off
set AF_PYTHON=C:\cgru\afanasy\python
set AF_ROOT=C:\cgru\afanasy
set CGRU_LOCATION=C:\cgru
set NUKE_CGRU_PATH=C:\cgru\plugins\nuke
set CGRU_PYTHON=C:\cgru\lib\python
set PYTHONPATH=C:\cgru\afanasy\python;C:\cgru\plugins\nuke\scripts;C:\cgru\afanasy\python;C:\cgru\lib\python

"C:\Program Files\Nuke10.5v1\Nuke10.5.exe" --nukex

User avatar
timurhai
Site Admin
Posts: 337
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: nuke Run - .bat

Post by timurhai » Sun May 21, 2017 9:42 am

Hi.
You can look at the default CGRU Nuke setup bat:
https://github.com/CGRU/cgru/blob/maste ... uke.cmd#L2
Note, that any soft setup includes this file:
https://github.com/CGRU/cgru/blob/maste ... all.cmd#L4
It reset PYTHONHOME that is used for afrender to use CGRU provided Python:
https://github.com/CGRU/cgru/blob/maste ... hon.cmd#L4
If you does not reset it, soft can try to use CGRU provided Python too, and it can be incompatible with an own Python version.
Timur Hairulin
CGRU 2.2.3 Ubuntu 14.04LTS (gcc4.8.4)

cgspill
Posts: 2
Joined: Fri May 19, 2017 4:18 pm

Re: nuke Run - .bat

Post by cgspill » Sun May 21, 2017 3:33 pm

Timur, thank you. Everything works fine. It turns out I had another problem. I created a .bat file and moved it to the hard drive (made the "Launcher" folder) and sent the shortcut to the desktop. It's very strange why this error occurs because I'm running through a shortcut, it just refers to the executing file.

А теперь на русском :)
Тимур, спасибо. Все отлично работает. Оказывается у меня была другая проблема. Я создал .bat файл и переместил его на жесткий диск (сделал папку "Launcher") и отправил ярлык на рабочий стол. Очень странно почему выходит эта ошибка из-за того что я запускаюсь через ярлык, она ведь всего лишь ссылается на исполняющий файл.
Сейчас просто оставил батник на рабочем столе и всё гуд)
Еще раз огромное спасибо.

Извиняюсь за наглость, но где я могу найти информацию от том, как выставить сколько ресурсов будет тратиться на рендер? Машины быстрые, но афанасий не использует и 50% мощности(

User avatar
timurhai
Site Admin
Posts: 337
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: nuke Run - .bat

Post by timurhai » Mon May 22, 2017 10:45 am

Better not to speak in Russian, as for most Afanasy developers and users it is not the native language.
It is very good that afrender takes less that 50% resources.
It should take less that 1% resources.
If launched software takes less than 50% resources you can find a bottleneck of this.
It can be network, for example.
If soft can`t take 100% resources for some other internal architecture reason (some caching can use only 1 core, for example),
You should use capacity mechanism.
Render with 2000 capacity can take 2 tasks with 1000 capacity, or 1 task with 1000 and 2 with 500.
See this http://cgru.info/afanasy/server#farm_setup
Timur Hairulin
CGRU 2.2.3 Ubuntu 14.04LTS (gcc4.8.4)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest