Per Job Environment Var Overrides

General discussions and questions.
Post Reply
Platon
Posts: 1
Joined: Tue Nov 07, 2017 9:24 am

Per Job Environment Var Overrides

Post by Platon » Mon Apr 09, 2018 9:07 am

Hi,
Is there any built-in way of having environment overrides loaded/executed per job?
my previous experience is with royal render
http://www.royalrender.de/help7/index.h ... nment.html
But I do believe same can be achieved with other managers, I might be mistaken thou.

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

Re: Per Job Environment Var Overrides

Post by timurhai » Mon Apr 09, 2018 10:30 am

Hi.
Yes, it is:
http://cgru.info/afanasy/job#block_environment
( per a job block )
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

LichiMan
Posts: 3
Joined: Thu Jan 03, 2019 3:57 pm

Re: Per Job Environment Var Overrides

Post by LichiMan » Thu Jan 03, 2019 4:05 pm

Hi Timur,

is there a way to add paths to existing environments instead of overriding them with setEnv?
I mean, if I want to add a path to the environment PATH of each render machine instead of overriding it, is this possible?

I can add the path to my existing PATH environment variable and then override the render machine PATH variables but every computer has a different PATH environment variable.

Thank you.

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

Re: Per Job Environment Var Overrides

Post by timurhai » Tue Jan 08, 2019 6:22 pm

Hi.
For such environment fine tuning better to use wrapper scripts.
Do not launch soft directly. Write a script with the same name in PATH that will setup environment first (PATH) and then launch soft.
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

LichiMan
Posts: 3
Joined: Thu Jan 03, 2019 3:57 pm

Re: Per Job Environment Var Overrides

Post by LichiMan » Wed Jan 09, 2019 9:57 am

Hi,

we launch the software through a custom QT-UI launcher that makes that exactly. As every project and department has different environment variables, we don't create wrapper scripts, we just do it on the fly with python and the QT-UI.
So, we want to launch jobs through python to afanasy from our Maya session with our custom environment variables but adding to the existing ones on each computer client instead of overriding them.

Surely there's an easy way to do this that I don't know...

Thank you.

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

Re: Per Job Environment Var Overrides

Post by timurhai » Wed Jan 09, 2019 10:52 am

LichiMan wrote:
Wed Jan 09, 2019 9:57 am
...
As every project and department has different environment variables
...
We have the same. We are using working directory to setup everything.
Artist do not just run some "maya" by double clicking some icon on the desktop, artist run some "maya" from the specific location (project, asset).
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

LichiMan
Posts: 3
Joined: Thu Jan 03, 2019 3:57 pm

Re: Per Job Environment Var Overrides

Post by LichiMan » Wed Jan 09, 2019 11:39 am

I think I already understand you. Thanks!
I'll try to get it working. Maybe I get more problems after get this part working... I'll let you know :)
Thanks for your help.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests