From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: [Q+A] How do I make the submit scripts load show-specific environment
   Date: Mon, 29 Jan 2007 20:27:04 -0500
Msg# 1461
View Complete Thread (4 articles) | All Threads
Last Next
Robert Minsk wrote:
Here is what I do to capture the users environment at submission time.
The will only work on *nix type machines.

/bin/env | /bin/egrep -v '^(TERM|DISPLAY|_|SHELLOPTS|BASH_VERSINFO|EUID|GROUPS|PPID|UID)=' | /bin/sed -e "s/^\([^=]*\)=\(.*\)/\1='\2'; export \1/"

    Under Windows you can do similar things with e.g. the 'set' command from DOS,
    and using perl to parse out the variables.

    But in general I advise against 'snapshotting' the user's workstation environment
    in favor of having a 'clean' environment be derived at render time, so weird
    platform specific variables (like PATH and LD_LIBRARY_PATH) aren't propagated
    to other machines/platforms during rendering.

    Also, snapshotting environments can cause trouble when doing handoffs between
    TDs or when render wranglers have to resubmit jobs.

    'Snapshotting' only works in very special circumstances where either there's
    a tight reign on the user's environments, or a very homogenous rendering
    environment where workstations and render farm machines are all precisely
    configured the same way, or when the person writing the scripts and doing admin
    really knows what they're doing. (Robert qualifies for the latter, so I won't
    question his reasons for doing this.. ;)

    Usually the best situation is to have the submit scripts establish a 'pristine'
    environment related to the show/shot. Sometimes unix-y companies have shell
    level aliases that set eg. SHOW and SHOT environment variables to keep track of
    what show you're on, and it's desirable to pass such variables on to the
    submit scripts so they can determine the show/shot that way for environment
    settings.

--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)

Last Next