-
Notifications
You must be signed in to change notification settings - Fork 84
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 ci #245
Docker ci #245
Conversation
@dmbrundage @ryanccarelli Can you take a look and let me know what you think? Maybe test out the container yourself to see if it works for you, and if the instructions are clear enough? |
Codecov Report
@@ Coverage Diff @@
## master #245 +/- ##
==========================================
- Coverage 84.69% 84.63% -0.06%
==========================================
Files 26 26
Lines 2430 2434 +4
==========================================
+ Hits 2058 2060 +2
- Misses 372 374 +2
Continue to review full report at Codecov.
|
Thanks @jacobrosenthaldfci I will take a look. Does it require you to have pathml locally to copy over? Also is there an image pushed to docker hub that can be pulled? |
Yes, the way it is set up is that you can build the docker container from a local clone of the repo - or, we will also publish a container to docker hub so you can just do docker pull (that's what the github action should do) |
Great! I just built it locally and can confirm that I was able to launch Jupyter Lab and load PathML. Instructions were perfectly clear, not sure if there needs to be a call out to copy the token or URL from the docker CLI. |
Ok great thanks David! I guess we need to test the github action now. Once we merge this to master, I'll make a new release so we can verify that the image is properly built and uploaded to docker hub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be so convenient to have. I found an issue with Java/Javabridge:
from pathml import VectraSlide, types
test = VectraSlide("/home/anokhiml/Documents/pathml/tests/testdata/small_vectra.qptiff", slide_type = types.IF)
---------------------------------------------------------------------------
JavaException Traceback (most recent call last)
/tmp/ipykernel_16/3376390402.py in <module>
1 from pathml import VectraSlide, types
----> 2 test = VectraSlide("/home/anokhiml/Documents/pathml/tests/testdata/small_vectra.qptiff", slide_type = types.IF)
/usr/local/lib/python3.8/site-packages/pathml/core/slide_data.py in __init__(self, *args, **kwargs)
501 if "backend" not in kwargs:
502 kwargs["backend"] = "bioformats"
--> 503 super().__init__(*args, **kwargs)
504
505
/usr/local/lib/python3.8/site-packages/pathml/core/slide_data.py in __init__(self, filepath, name, masks, tiles, labels, backend, slide_type, stain, platform, tma, rgb, volumetric, time_series, counts)
174 backend_obj = pathml.core.OpenSlideBackend(filepath)
175 elif backend.lower() == "bioformats":
--> 176 backend_obj = pathml.core.BioFormatsBackend(filepath)
177 elif backend.lower() == "dicom":
178 backend_obj = pathml.core.DICOMBackend(filepath)
/usr/local/lib/python3.8/site-packages/pathml/core/slide_backends.py in __init__(self, filename)
246 # init java virtual machine
247 javabridge.start_vm(class_path=bioformats.JARS, max_heap_size="50G")
--> 248 _init_logger()
249 # java maximum array size of 2GB constrains image size
250 ImageReader = bioformats.formatreader.make_image_reader_class()
/usr/local/lib/python3.8/site-packages/pathml/core/slide_backends.py in _init_logger()
224 "ch/qos/logback/classic/Level", "WARN", "Lch/qos/logback/classic/Level;"
225 )
--> 226 javabridge.call(
227 rootLogger, "setLevel", "(Lch/qos/logback/classic/Level;)V", logLevel
228 )
/usr/local/lib/python3.8/site-packages/javabridge/jutil.py in call(o, method_name, sig, *args)
886 '''
887 env = get_env()
--> 888 fn = make_call(o, method_name, sig)
889 args_sig = split_sig(sig[1:sig.find(')')])
890 ret_sig = sig[sig.find(')')+1:]
/usr/local/lib/python3.8/site-packages/javabridge/jutil.py in make_call(o, method_name, sig)
849 if method_id is None:
850 if jexception is not None:
--> 851 raise JavaException(jexception)
852 raise JavaError('Could not find method name = "%s" '
853 'with signature = "%s"' % (method_name, sig))
JavaException: setLevel
Good catch, thanks Ryan! |
Great! If tests pass when run from inside the container and we can get through H&E and MIF pipelines then I think it's good to go |
ok having some more trouble with javabridge inside the container... First I entered the container with the tests folder mounted: Then when running tests, I'm getting lots of failures,:
It's hard for me to tell exactly what's going on but I'm guessing it's also connected to using the different java version or something... will continue looking into this |
Will try out building from openjdk:8 base image, and installing python on top (instead of currently starting with a python image and installing openjdk8 on top) |
This Docker image contains pathml and all dependencies (including jdk8, deepcell, etc.). It also runs the full test suite in the build process to make sure everything is working as expected. Version number is 2.0.dev1 so that we can merge to master and test out the Github action which should build the image and publish it to Dockerhub. Once we verify that's working, we can bump to version 2.0.2 |
Add a Dockerfile which builds a working environment for pathml and starts up a jupyterlab instance in the container, which users can connect to and get up and running quickly. Also add a github actions workflow to build the image and publish it to dockerhub whenever we create a new release
This will close #145