Skip to content

Docker functions

David Cardinal edited this page Oct 11, 2021 · 7 revisions

While the overall data management and some computations are managed by Matlab, the critical rendering code uses a modified version of the physically-based ray tracing program (PBRT, version 3). The modifications include support for hyperspectral scenes. Development work is underway to support pbrt-v4.

Installation and compilation of the C-code for pbrt is challenging. To ensure that users can run PBRT-V3 on any platform, Andy, Trisha, Henryk Blasinski and Michael Perry created a docker image. To run on any platform (we have tried Apple, Ubuntu, and Windows), you only need to have docker installed.

Three small functions in Matlab check that Docker is configured to run from your Matlab environment. Their names express what they do.

piDockerExists - Does the docker command exist on your path?

piDockerTest - Can we run a small docker container (Hello World!)

piDockerConfig - On some systems (notably the Apple platform), bringing up Matlab by clicking on an icon does not run the user's standard terminal scripts (.bashrc or .bash_profile). This script contains critical information for docker to run. Consequently, if you bring up Matlab by clicking on an icon, docker may not run correctly. This configuration script sets the docker environmental variables, as near as we can tell, for most configurations. (If you bring up Matlab through the terminal docker will run from the Matlab prompt.)

Currently the docker image used is vistalab/pbrt-v3-hyperspectral, but that information is already in the iset3d code, so it will be retrieved automatically.

Windows Note: For best results use WSL2 and a recent version of Docker that has full support for it. Performance and compatibility are much better than with Docker's older VM technology.

Clone this wiki locally