Submit Deadline Jobs running AYON commands

Say for a Deadline submission I want to run an AYON addon command. What’s a decently “agnostic” way to access the local AYON on a farm client for e.g. a command line or Python job instead of hardcoding the path to a AYON console executable in the submission?

I’d like to just e.g. submit ayon addon myaddon mycli --arg1 hello --arg2 world.

Now what do I need to do so that the path for AYON are resolved? What does the submission need, etc.

I suppose the above question is for AYON Addon CLI commands, but likely the question also transfers to trigger just a Python script ayon my_script.py against the relevant production bundle.

  1. Do I need to set specific environment variables for the job? If so, which?

Like here, we likely need:

export USE_AYON_SERVER=1
export AYON_HEADLESS_MODE=1
export AYON_SERVER_URL=http://localhost:5000
export AYON_API_KEY=veryinsecurapikey

Is there more to it?

  1. How do I make it find the ayon executable path given e.g. ayon or ayon_console or whatever?

OpenPype (backwards compatibility)

Would that approach differ greatly for OpenPype? If so, how?

Context

The question is somewhat related to:

Actually, silly me.

I can just submit the Deadline Job as a OpenPype or Ayon plug-in submission and you can specify the arguments to run against the console or executable there.

2 Likes