-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[core] Runtime-specific environments support #2747
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
Merged
Merged
Conversation
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
43b5b05
to
50bbef7
Compare
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## develop #2747 +/- ##
===========================================
- Coverage 78.57% 77.87% -0.71%
===========================================
Files 48 48
Lines 6577 6671 +94
===========================================
+ Hits 5168 5195 +27
- Misses 1409 1476 +67 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
More specific classes will inherit from it.
This class handles processes without a specific environment as well as those using Conda or a VirtualEnv.
The command's prefix and suffix are correctly set, but Meshroom still needs to be injected to the list of rez packages in order to be available in the `PYTHONPATH`.
Instead of a distinguishing the type of `DirTreeProcessEnv`, simply use it whenever the process environment differs from rez.
50bbef7
to
2a2b695
Compare
2a2b695
to
4693676
Compare
90f26a5
to
ccf82d0
Compare
…odePlugin` Otherwise, `node.nodeDesc.plugin` will evaluate to `None` after the node has been reloaded.
Ensures that the packages installed in a local virtualenv is taken before the propagation of the global Meshroom environment to avoid version conflicts. Note: We tried to avoid checking files/folders on disk at startup for performance reasons, but here we are forced to use glob as there is no way to know the python version of the plugin in advance.
fabiencastan
approved these changes
Jun 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR builds on top of #2703 and #2733, which respectively added the notion of local isolated computations for nodes, and the concept of plugins. This pull request adds the notion of runtime-specific environment, allowing nodes to be executed in a dedicated environment that contains their required dependencies independently from Meshroom's.
Two types of execution environments are added in this PR:
Based on the root folder of the plugin, it sets up the environment (
PYTHONPATH
,PATH
andLD_LIBRARY_PATH
environment variables). It assumes the plugin has a standard hierarchy:To declare a plugin using the DirTree, set the env variable
MESHROOM_PLUGINS_PATH
.Based on a Rez package that's provided through a dedicated environment variable, it gathers all the requirements to execute the process within that Rez environment.
To declare plugins using Rez for their execution, use the
MESHROOM_REZ_PLUGINS
environment variable.Rez plugins need to be provided to
MESHROOM_REZ_PLUGINS
with the following syntax:packageName=/path/to/root
. Theirpackage.py
also need to follow a certain structure. An example is given below for a package named "mrExample":Features list
MESHROOM_REZ_PLUGINS
environment variable to load Rez plugins;Implementation remarks
For Rez plugins, a few things are to be noted:
MESHROOM_REZ_PLUGINS
.env.MRNAME_SUBREQUIRES
in the Rez package'spackage.py
is necessary, as it is used by Meshroom to list the dependencies.PYTHONPATH
environment variable, strictly within the Rez environment.