Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image for MicroManager and pymmcore #18

Open
oeway opened this issue Sep 10, 2020 · 7 comments
Open

Docker image for MicroManager and pymmcore #18

oeway opened this issue Sep 10, 2020 · 7 comments

Comments

@oeway
Copy link
Contributor

oeway commented Sep 10, 2020

Hi, I am making a tutorial in Jupyter notebook with pymmcore (see here), and would like to host it on Binder so people can try it easily without any local installation.

My question is, can we make a docker container for micromanager with demo devices? I have been searching around, but only find a linux installation guideline which seems to be outdated. Would be really nice to provide one officially.

@marktsuchida
Copy link
Member

Cool! To be honest I've never tried to dockerize Micro-Manager because it wouldn't (practically or easily) work for real hardware. But I don't see any problem with a demo-only docker image.

On Linux it should be possible to build Micro-Manager fully from a script, although there will probably be a few tricky parts. If you are okay with something that you will only run from pymmcore (i.e. no Java stuff), it should become pretty simple (just use an environment with no JDK so that ./configure disables MMCoreJ and MMStudio, or use --without-java). Unfortunately there is no ./configure option to select for DemoCamera only, but it should disable any device adapters whose dependencies are missing. (And the build script could delete all installed device adapters other than DemoCamera and Utilities if desired.)

@oeway
Copy link
Contributor Author

oeway commented Sep 12, 2020

@marktsuchida Thanks for the detailed tips. And following that I manage to build my docker file.

Although I had to do some patch to the code to remove two device adapters (TriggerSCope and TriggerSCopeMM).

Here is the error:

mv -f .deps/TriggerScopeMM.Tpo .deps/TriggerScopeMM.Plo
make[2]: *** No rule to make target 'TriggerSCopeMMDAC.cpp', needed by 'TriggerSCopeMMDAC.lo'.  Stop.
make[2]: Leaving directory '/home/weiouyang/workspace/micro-manager/DeviceAdapters/TriggerScopeMM'
Makefile:651: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/weiouyang/workspace/micro-manager/DeviceAdapters'
Makefile:521: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Maybe it needs to be fixed upstream?

@nicost
Copy link
Member

nicost commented Sep 12, 2020

Thanks! Capitalization typo (hence not detected on Windows or Mac). Fixed upstream.

How should we make the docker image available (maybe showing my ignorance here)? Github or website, or is their a central repo for these things>

@oeway
Copy link
Contributor Author

oeway commented Sep 12, 2020

Great! Thanks @nicost .

I think it's enough to include a docker file, e.g. in this Github repo. Optionally, you can setup automatic builds on DockerHub, so it will automatically build docker images and host there. The central repo for docker images is DockerHub, you basically build a docker image from your docker file, and generate docker image (the one I made is around 4GB), then push it to DockerHub, so other users can just download/pull that instead of building them to save time. For exmaple: I pushed the image built from my docker file here: https://hub.docker.com/r/oeway/micromanager-demo .

Worth mentioning, Github also launched container register service: https://github.blog/2020-09-01-introducing-github-container-registry/

@marktsuchida
Copy link
Member

@oeway I'd be happy to include your Dockerfile in this repo. Would you mind creating a PR?

We can go from there to an automated build; since pymmcore is already using GitHub Actions to build, it might indeed be convenient to use GitHub's registry. If you're not in too much of a hurry, I'm happy to set this up.

@oeway
Copy link
Contributor Author

oeway commented Sep 15, 2020

@oeway I'd be happy to include your Dockerfile in this repo. Would you mind creating a PR?

Here you go: #20
Feel free to adjust it.

We can go from there to an automated build; since pymmcore is already using GitHub Actions to build, it might indeed be convenient to use GitHub's registry. If you're not in too much of a hurry, I'm happy to set this up.

Sounds good, for me, this is not urgent at all. I only use the docker image to build DemoCamera device and run on Binder, it would be enough if you can ship the DemoCamera with pymmcore (#19).

@marktsuchida
Copy link
Member

@oeway Thanks!

I'll leave this issue open; remaining task is to create a public image.

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

No branches or pull requests

3 participants