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 »

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: 916
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Per Job Environment Var Overrides

Post by timurhai »

Hi.
Yes, it is:
http://cgru.info/afanasy/job#block_environment
( per a job block )
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, 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 »

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: 916
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Per Job Environment Var Overrides

Post by timurhai »

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 3.3.1, Ubuntu 20.04, 22.04, 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 »

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: 916
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Per Job Environment Var Overrides

Post by timurhai »

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 3.3.1, Ubuntu 20.04, 22.04, 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 »

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