Skip to content

Commit

Permalink
updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Hog committed Jul 15, 2024
1 parent 69dad21 commit c6b1898
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions meshroom/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

A plugin is a set of one or several nodes that are not part of the Meshroom/Alicevision main project.
They are meant to facilitate the creation of custom pipeline, make distribution and installation of extra nodes easy, and allow the use of different level of isolation at the node level.
Each node within a plugin may use the same environnement, or use different ones.
Each node within a plugin may use the same or differents environnement.

# Making Meshroom Plugins

To make a new plugin, make your node inheriting from `meshroom.core.plugins.PipNode`, `meshroom.core.plugins.VenvNode`, `meshroom.core.plugins.CondaNode` or `meshroom.core.plugins.DockerNode`.
In your new node class, overwrite the variable `envFile` to point to the environment file (e.g. the `yaml` or `dockerfile`) that sets up your installation. The path to this file should be relative to the path of the node, and within the same folder (or subsequent child folder) as the node definition.
To make a new plugin, make your node inheriting from `meshroom.core.plugins.PluginNode`
In your new node class, overwrite the variable `envFile` to point to the environment file (e.g. the `yaml` or `dockerfile`) that sets up your installation, end `envType` to specify the type of plugin. The path to this file should be relative to the path of the node, and within the same folder (or subsequent child folder) as the node definition.

Prefixes will be added automatically to your command line to run the node in the right envireonnement.
The code in `processChunk` in your node definition will be automatically executed within the envirenoment, using `meshroom_compute`.
A new status `FIRST_RUN` denotes the stage in between the environement startup and the execution of the node.

Make sur your imports are lazy, in `processChunk`.
Several nodes share the same environment as long as they point to the same environment file.
Changing this file will trigger a rebuild on the environment.

Expand All @@ -33,5 +36,5 @@ The file must have the following structure:
]
```

The environment of the nodes are going to be build the first time it is needed (status will be 'BUILD', in purple)
The environment of the nodes are going to be build the first time it is needed (status will be `BUILD`, in purple).

0 comments on commit c6b1898

Please sign in to comment.