Create a background thread in do_before_launch or do_launch to do the work. Use on_timer to poll until the result is available.
The SDK headers are baked into the docker image along with the build tools. Once you've loaded the image with docker load < spark_sdk.img
you can run this command to copy them out to your local file system docker run --rm -it -v $PWD:/out spark_sdk /bin/tar -cvf /out/headers.tar /sdk/include
This will copy the headers to the current directory in headers.tar. We still recommend doing the actual build inside the docker environment but having a copy of the headers can be useful for setting up your development environment.