feat: mount local DLS-filesystem mirror into dev backend for image serving#223
Merged
Merged
Conversation
…rving The backend image endpoints read atlas/grid-square files off disk using the absolute /dls/... paths stored in the DB, but a DB dump has no files. Mount a local mirror of Diamond's /dls filesystem into the dev API pod so those endpoints resolve. - smartem-workspace scaffolds testdata/dls-filesystem/ as the convention dir (a local mirror of /dls; populated by hand with imagery). Bump 0.6.1 -> 0.7.0. - dev-k8s.sh ensure_image_mount patches smartem-http-api with a hostPath <workspace>/testdata/dls-filesystem -> /dls (readOnly), overridable via SMARTEM_DLS_FILESYSTEM_DIR, skipped when absent. hostPath must be absolute and kustomize can't template, so this mirrors the existing ensure_* post-apply patch pattern. API service only: the worker never reads image files from disk.
This was referenced Jun 8, 2026
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
The backend image endpoints (
get_grid_atlas_image,get_gridsquare_image) read atlas/grid-square files off disk using the absolute/dls/...paths stored in the DB. Against a DB dump those files aren't present, so images fall back to placeholders. This mounts a local mirror of Diamond's/dlsfilesystem into the dev API pod so the endpoints resolve, giving us real imagery in local dev.Changes
testdata/dls-filesystem/as the convention dir — a local mirror of Diamond's/dlsDFS root, populated by hand with microscopy imagery. Version bump0.6.1 -> 0.7.0.ensure_image_mountstep patchessmartem-http-apiwith a hostPath<workspace>/testdata/dls-filesystem -> /dls(readOnly), overridable viaSMARTEM_DLS_FILESYSTEM_DIR, skipped silently when the dir is absent.Why a script patch and not the static manifest
hostPathmust be absolute, and the dev stack applies manifests withkubectl apply -k(kustomize, no templating), so a portable per-developer path can't live in the committed YAML. This mirrors the existing post-apply patch pattern (ensure_app_configmap,ensure_ghcr_secret,ensure_local_image) and keeps any machine-specific path out of the repo.Scope
mrcfile/tifffile/PIL reads in the backend are the two API image endpoints; the worker is a pure MQ->DB consumer)./dlsNFS mount is a separate PR.Notes
maintriggers an RC release of smartem-workspace (paths-filtered workflow); a stable0.7.0would need the tag/workflow_dispatch.