Skip to content

Add Docker-based Minian (Python 3.8) processing support#67

Open
kushalbakshi wants to merge 36 commits intodatajoint:main_external-storagefrom
kushalbakshi:feature/minian-docker-38
Open

Add Docker-based Minian (Python 3.8) processing support#67
kushalbakshi wants to merge 36 commits intodatajoint:main_external-storagefrom
kushalbakshi:feature/minian-docker-38

Conversation

@kushalbakshi
Copy link
Collaborator

Summary

  • Add Docker-based execution path for original Minian (Python 3.8) in Processing.make_compute(), running the minian pipeline in an isolated container via sibling container execution
  • Add MinianLoader class for loading minian zarr outputs (A, C, S, motion, summary images) without requiring minian to be installed
  • Implement minian ingestion for MotionCorrection, Segmentation, Fluorescence, and Activity tables
  • Add _run_minian_in_container() helper with host path translation for sibling container Docker execution, real-time log streaming, and configurable Dask env var passthrough
  • Add minian extras to setup.py dependencies
  • Add test_minian_pipeline.py notebook for integration testing

Test plan

  • Verified minian Docker container produces correct zarr outputs (A, C, S, motion, max_proj, mean_proj, ref_image)
  • Verified MinianLoader correctly loads all zarr arrays and exposes them via properties (masks, motion_shifts, summary images)
  • Verified ROI contour overlay visualization from minian output
  • End-to-end pipeline populate: Processing -> MotionCorrection -> Segmentation -> Fluorescence -> Activity

🤖 Generated with Claude Code

kushalbakshi and others added 6 commits February 17, 2026 09:59
When extra_dj_params.docker_image is set in ProcessingParamSet, the
make_compute() method spawns a sibling Python 3.8 container running
the original denisecailab/minian instead of the inline modernized path.
This ensures result parity with the customer team's original pipeline.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Remove the ~650 lines of inline minian processing + compatibility
patches. The minian method now always runs via the py38 sibling
container. Docker image configurable via MINIAN_DOCKER_IMAGE env var.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…tuning

- Change default image to minian-py38:latest (conda-forge based)
- Refactor _run_minian_in_container: write params as unified config JSON,
  translate container paths to host paths via HOST_S3_ROOT/HOST_OUTBOX env
  vars, pass Dask timeout and memory allocator env vars to container
- Add test_minian_pipeline.py for end-to-end Minian integration testing

Co-Authored-By: Claude Opus 4.6 <[email protected]>
MinianLoader:
- Load ref_image and mean_proj zarrs directly instead of computing
  from full varr_ref video (which was never in the final output)
- Remove dead varr_ref fallback from max_proj_image

_run_minian_in_container:
- Pass through Dask env vars from environment instead of hardcoding
- Include DASK_DISTRIBUTED__WORKER__MEMORY__* vars
- Fix MINIAN_CONTAINER_MEMORY -> MINIAN_CONTAINER_MEM_LIMIT to match
  docker-compose naming
- Remove unused /data/params/params.json CLI argument

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.

1 participant