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
RoyalRender: environment injection on the server #6160
RoyalRender: environment injection on the server #6160
Conversation
Maybe AYON_BUNDLE_NAME should be used instead of Version if it would be possible to parse it out.
This should be added only to render jobs.
This should be added only to render jobs.
Was adding env vars from client not rendering worker. Limitation on 2k characters.
Stored to rrEnvList just to be saved to .json from where it is parsed. Hopefully there would be a way how to parse it directly from RR job and not reaching to .json
Task linked: OP-7687 Environments in RoyalRender |
Doesn't work on each/separate job. Added some needed env vars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this isn't working in OP, we should not load it either. We need to add something like:
from openpype import AYON_SERVER_ENABLED
...
enabled = AYON_SERVER_ENABLED
or something similar
It seems that previous implementation is triggered too early and on submission machine. Still bit WIP as `tcp.jobList_GetInfo` might not be available in Demo license. In that case this all will be unusable and should be scrapped.
…cement/OP-7687_Environments-in-RoyalRender
…ncement/OP-7687_Environments-in-RoyalRender
…-in-RoyalRender' into enhancement/OP-7687_Environments-in-RoyalRender
|
||
# print("Set up server and login info") | ||
tcp = rr._rrTCP("") | ||
tcp.setServer(rrGlobal.rrServer(), 7773) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'rrGlobal'
|
||
def _is_required_environment(self): | ||
if (not os.environ.get("AYON_API_KEY") or | ||
not os.path.exists(os.environ.get("AYON_EXECUTABLE_PATH", ""))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
|
||
modPath = rrGlobal.rrModPyrrPath() | ||
sys.path.append(modPath) | ||
import libpyRR39 as rr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
import uuid | ||
import argparse | ||
|
||
modPath = rrGlobal.rrModPyrrPath() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'rrGlobal'
Currently blocked as required methods from SDK are not available with Demo licenses. |
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
@@ -3,6 +3,9 @@ | |||
import os | |||
import openpype.modules | |||
from openpype.modules import OpenPypeModule, IPluginPaths | |||
from openpype import AYON_SERVER_ENABLED | |||
from openpype.lib import Logger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'openpype.lib.Logger' imported but unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from openpype.lib import Logger |
…ncement/OP-7687_Environments-in-RoyalRender
Cannot attach in pre load script later, only fill non-existent file.
Cannot figure out how to attach rrEnv file to existing job, submission already points to nonexistent file which gets filled by this cript.
…-in-RoyalRender' into enhancement/OP-7687_Environments-in-RoyalRender
import os | ||
import sys | ||
import json | ||
import glob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'glob' imported but unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import glob |
This is currently implemented and (hopefully) working solution. |
openpype/modules/royalrender/plugins/publish/create_publish_royalrender_job.py
Outdated
Show resolved
Hide resolved
…yalrender_job.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Changelog Description
Previously env vars were injected directly on the client during submission. That could have issues when environment on client machines is different than on workers.
This PR tries similar approach as on DL when before job is rendered it queries Ayon to get environment variables for context.
These variables are used to create
.rrEnv
file and attach it to the job. That should provide rendering environment controlled by Ayon.Additional info
It expects installed Ayon on worker machines with these env vars (for now):
ayon_console
on the worker(s) - should be parsed from renderApps config in the futureExpects redeployment of RR plugins from
openpype/modules/royalrender/rr_root
to RR_ROOTThis PR still uses old OP (because of customer environment), needs to be converted for
ayon-core