This repository was archived by the owner on Sep 20, 2024. It is now read-only.
RoyalRender: environment injection on the server#6160
Merged
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
Contributor
|
Task linked: OP-7687 Environments in RoyalRender |
Doesn't work on each/separate job. Added some needed env vars.
antirotor
suggested changes
Jan 31, 2024
Member
antirotor
left a comment
There was a problem hiding this comment.
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_ENABLEDor 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) |
|
|
||
| def _is_required_environment(self): | ||
| if (not os.environ.get("AYON_API_KEY") or | ||
| not os.path.exists(os.environ.get("AYON_EXECUTABLE_PATH", ""))): |
|
|
||
| modPath = rrGlobal.rrModPyrrPath() | ||
| sys.path.append(modPath) | ||
| import libpyRR39 as rr |
There was a problem hiding this comment.
module level import not at top of file
| import uuid | ||
| import argparse | ||
|
|
||
| modPath = rrGlobal.rrModPyrrPath() |
Member
Author
|
Currently blocked as required methods from SDK are not available with Demo licenses. |
iLLiCiTiT
reviewed
Feb 9, 2024
iLLiCiTiT
reviewed
Feb 9, 2024
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
| 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.
'openpype.lib.Logger' imported but unused
Member
There was a problem hiding this comment.
Suggested change
| 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
Member
Author
|
This is currently implemented and (hopefully) working solution. |
iLLiCiTiT
reviewed
Apr 15, 2024
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>
mkolar
approved these changes
Apr 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.rrEnvfile 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_consoleon the worker(s) - should be parsed from renderApps config in the futureExpects redeployment of RR plugins from
openpype/modules/royalrender/rr_rootto RR_ROOTThis PR still uses old OP (because of customer environment), needs to be converted for
ayon-core