This repo contains a scripts and Jupyter notebook to build MaterialX from source.
The buildMaterialX.ipynb notebook contains the steps required to:
-
Clone the MaterialX repo
-
Install the required dependencies
-
Create a build environment
-
Build MaterialX
-
Run the MaterialX
The repo can be cloned or forked from and either run locally or in a GitHub Codespace
. The snapshots above are from a GitHub Codespace
.
The notebook can be opened and run in Google Colab
directly.
Note that the "basic" tier does not give you access to a command line (unlike
Codespaces
). As all commands are run through "system" calls from Python the same notebook can be used unmodified for bothColab
andCodespaces
.
Below are snapshots from the execution of various steps (cells) of the notebook.
-
Clone and Submodule Update
Note that this step is much faster than when performed from within a codespace, but this is incidendental and may not a reflection of the general performance of the codespace.
-
OS and Cmake setup
This step also appears to be very fast, but it could be due to caching or pre-install of some OS elements.
-
Build The times to build appears to be faster for codespace from the single sample test which took about 15 minutes using
Codespaces
and 25 minutes usingColab
. While not comparable to desktop build times, this with the caveat that this was attempted with resources available with the "free" tier of each service.Note that it was useful to be able to see resource usage in
Colab
while building. The build log is shown on the right. -
Testing
For both Codespaces
and Colab
, the cells of the notebook can be (re)run as needed with the caveat that the package imports and the utility to print the logged output be run.
All output is logged to "log" files for later inspection.
Files can be modified in the source directory and the build rerun to test changes. Note that this will not update the cloned repo.
Remote Codespaces
and Colab
may not support GPU rendering (vs compute) as such trying to execute rendering may result in an error. For example the MaterialX Viewer and Graph Editor cannot be run remotely.