Skip to content

Install headless Chrome in Docker image for QC plot rendering - #27

Merged
m-reuter merged 1 commit into
Deep-MI:mainfrom
karl-koschutnig:fix/dockerfile-install-chrome
Aug 6, 2026
Merged

Install headless Chrome in Docker image for QC plot rendering#27
m-reuter merged 1 commit into
Deep-MI:mainfrom
karl-koschutnig:fix/dockerfile-install-chrome

Conversation

@karl-koschutnig

Copy link
Copy Markdown
Contributor

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 as kaleido>=0.2.1, and 1.3.0 in the published 0.10.1 image) dropped its bundled Chromium and now requires an external Chrome/Chromium binary, which docker/Dockerfile never installed.
  • Installs Chrome via kaleido's own plotly_get_chrome helper into a fixed, world-readable location (/opt/chrome-for-testing), and points to it via the BROWSER_PATH env var kaleido/choreographer respects.
  • Also sets a default writable HOME=/tmp.

Both of these are needed specifically because this image is documented to be run with an arbitrary --user XXXX:YYYY (see docker/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 sane HOME default.

  • Updated docker/Docker.md: removed the now-stale --no-qc from 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 via plotly_get_chrome.

Test plan

Built the image from this Dockerfile from 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):

  • Image builds successfully from a clean docker build
  • Full pipeline (run_hipsta) completes with Hipsta finished without errors.
  • All three QC stages (mesh/profile/hull) render valid, non-empty PNGs with no warnings, as root
  • Same result running as a non-root --user UID:GID with no manual -e HOME=... override (i.e. out-of-the-box with just the Dockerfile changes)

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
@m-reuter
m-reuter merged commit 09ebcc7 into Deep-MI:main Aug 6, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants