Install headless Chrome in Docker image for QC plot rendering - #27
Merged
m-reuter merged 1 commit intoAug 6, 2026
Merged
Conversation
kaleido>=1.0 dropped its bundled Chromium and now requires an external Chrome/Chromium binary to render QC plots, which the Docker image did not provide (Kaleido requires Google Chrome to be installed). Install Chrome via plotly_get_chrome into a fixed, world-readable location and point to it via BROWSER_PATH, since the image is meant to be run with an arbitrary --user; also default HOME to a writable directory, since Chrome needs a writable profile/user-data directory. Verified by building the image from this Dockerfile and running the full pipeline (mesh/profile/hull QC stages) both as root and as an arbitrary non-root --user, producing valid PNGs in all three cases with no warnings. Refs Deep-MI#24
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #24 / #26, per @m-reuter's suggestion to fix the Docker image directly as a stopgap until a kaleido replacement is decided on.
kaleido>=1.0(currently pinned askaleido>=0.2.1, and1.3.0in the published0.10.1image) dropped its bundled Chromium and now requires an external Chrome/Chromium binary, whichdocker/Dockerfilenever installed.plotly_get_chromehelper into a fixed, world-readable location (/opt/chrome-for-testing), and points to it via theBROWSER_PATHenv var kaleido/choreographer respects.HOME=/tmp.Both of these are needed specifically because this image is documented to be run with an arbitrary
--user XXXX:YYYY(seedocker/Docker.md): installing Chrome to the default$HOME(root's, at build time) is unreadable to an arbitrary non-root UID at runtime, and Chrome needs a writable profile/user-data directory, which an arbitrary UID won't have without a saneHOMEdefault.docker/Docker.md: removed the now-stale--no-qcfrom the example command and the note saying QC isn't supported under Docker/Singularity, and added a short note for local (non-Docker) installs on how to get Chrome viaplotly_get_chrome.Test plan
Built the image from this
Dockerfilefrom scratch and ran the full pipeline against a real hippocampal segmentation, both as root and as an arbitrary non-root--user(matching the documented invocation):docker buildrun_hipsta) completes withHipsta finished without errors.--user UID:GIDwith no manual-e HOME=...override (i.e. out-of-the-box with just the Dockerfile changes)