Add BridgeStan to user code Docker image#480
Conversation
This is for compatibility with BridgeStan, which requires at least Python 3.9. Note that this introduces an inconsistency with other Python libraries / applications in Chainsail.
dorranh
left a comment
There was a problem hiding this comment.
Overall this looks reasonable to me! It's a shame that BridgeStan tries to fetch dependencies at runtime, perhaps that would be worth opening as an issue upstream (e.g. to allow for an option to disable this behavior) and adding a corresponding issue here so we can keep track of it.
One question would be whether the intention is to already drop support for httpstan or if we wanted to keep it around for the time being. If the former it might be good to go ahead and drop the relevant httpstan portions of the codebase.
I'll investigate the (apparently) bug I mention in the comment in the Dockerfile more and will open an issue on BridgeStan. If that worked, then all dependencies would be available at runtime and we'd be good.
I'm not sure for now - I have tested BrigdeStan (and its wrapper in |
|
Re
Turns out it's just me being careless. 987331a works as desired 🙂 |
dorranh
left a comment
There was a problem hiding this comment.
That's great that there is a way to convince BridgeStan not to fetch stanc at runtime. LGTM!
|
@dorranh I tested this now in the full minikube deployment, too, and it works as intended (not surprising, as I had tested the user code image before already). The only thing I had to do was increase the time we wait for the user code server to be ready (the hack introduced in #382) to four minutes 😿 but it is possible that the additional time it took was related to me pulling in the BridgeStan
🤔 |
This PR adds BridgeStan (https://github.com/roualdes/bridgestan) to the user code image. Together with a PR adding a BridgeStan wrapper to the
chainsail-helperslibrary, this allows users to easily use BridgeStan instead ofhttpstanto sample from their Stan models for a ~1000x speedup 🚀Closes #424 (although the
httpstanwrapper is still available).