Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple versions of Software #263

Closed
cg-cnu opened this issue Jul 12, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@cg-cnu
Copy link

commented Jul 12, 2016

I have both Maya 2015 and 2016 installed.
By default any job submitted to cgru picks up 2016.

I can provide the Task Executable in Afanasy Starter to a particular maya executable. But, I want 2015 to be the default and only point new jobs(which will be few in number) at 2016.

This might be applied to other software. How to approach this situation.

@timurhai

This comment has been minimized.

Copy link
Member

commented Jul 14, 2016

Lots of ways to do it.
I think that one of the best (and i use it at work) is to have a custom command maya (executable script), this command will setup all needed environment (not only maya version) depending on location. For example project_A can use nuke9, maya2015, arnold x.x, and project_B can use nuke10, maya2016, arnold x.y and so on. Different projects can use different MAYA_SCRIPT_PATH and some old project can work with an old script on farm at the same time as some new project can use new versions.

( this is the main reason that afanasy uses working directory )

@cg-cnu

This comment has been minimized.

Copy link
Author

commented Jul 21, 2016

Hey @timurhai, Thanks for the reply...

I got what you are trying to explain. I tried exploring in the direction.
But frankly, I got lost in figuring out what's happening. I might be missing something...

I will try to explain what I understood and tell me if am wrong anywhere...
First thing, if no executable is mentioned in the afstarter and if the job is maya* the command name is choosen as "mayarender". Now, where is the mayarender? On start, cgru will source the setup.sh which will setup all the env vars. In which it will source software_setup/bin/mayarender which will again source software_setup/setup_maya.sh. Now the meat is here. setup_maya.sh will determine what software version to use based on some gawk.

Now as you mentioned...

I think that one of the best (and i use it at work) is to have a custom command maya (executable script), this command will setup all needed environment (not only maya version) depending on location.

After some googling around, I found this nice tool called direnv.net, which I think will help in doing this kind of stuff.
I would like to know how you are doing that. Any tool / script ? Any practical advice ?

@timurhai

This comment has been minimized.

Copy link
Member

commented Jul 24, 2016

Hi.
It can be just a small bash (cmd) script.
maya searches in a current folder .settings/maya.sh, if there is no such file, it goes one folder up and does the same.
This loop ends when it reaches / folder, and in this case it sources some default /defaults/settings/maya.sh (for example).
This way any project (folder, sub-project, asset) can have own environment.

@timurhai timurhai changed the title Multiple versions of Maya Multiple versions of Software Aug 30, 2016

@timurhai

This comment has been minimized.

Copy link
Member

commented Jan 26, 2017

Now there is a forum for such discussions:
http://forum.cgru.info

@timurhai timurhai closed this Jan 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.