Dockerfile: rewrite using Micromamba Image#685
Dockerfile: rewrite using Micromamba Image#685forrestfwilliams merged 11 commits intoinsarlab:mainfrom
Conversation
- Rewrites the MintPy dockerfile using the mambaorg/micromamba image - Forces Python=3.6 for faster image build - Sets the user as micromamba, not root - Optionally allows the image to start with a Jupyter Lab instance
- tag micromamba version - remove apt-get lists
jhkennedy
left a comment
There was a problem hiding this comment.
This looks pretty good! And should be a big build improvement
Co-authored-by: Joseph H Kennedy <me@jhkennedy.org>
|
Up to date version of the image can be found at forrestwilliams/mintpy:1.3.1 |
|
@forrestfwilliams this is great! I was able to build this image and run the tests inside it just fine, like: So in terms of the dockerfile, I'd call this g2g! (unless it's worth adding @yunjunz, I assume you'd like to do the final approval? |
|
Other thoughts for you @forrestfwilliams and @yunjunz:
Edit: Moved 2nd point to #123. |
|
Good point @jhkennedy. Let's update the docker image's link in the two *.md files to |
|
I tried to test the docker image following the same command as @jhkennedy wrote above. It passed the first two datasets for (ISCE and ARIA) and failed at generating KMZ file for the GAMMA dataset, as shown in the error message below. Manually running the ******************** step - google_earth ********************
creating Google Earth KMZ file for geocoded velocity file: ...
save_kmz.py /home/micromamba/data/test/WellsEnvD2T399/mintpy/geo/geo_velocity.h5 -o /home/micromamba/data/test/WellsEnvD2T399/mintpy/geo/geo_velocity.kmz
data coverage in y/x: (0, 0, 753, 537)
subset coverage in y/x: (0, 0, 753, 537)
update LENGTH, WIDTH, Y/XMAX
update/add SUBSET_XMIN/YMIN/XMAX/YMAX: 90/12/843/549
update Y/X_FIRST
update REF_Y/X
read mask from file: geo_maskTempCoh.h5
masking out pixels with zero value in file: None
colormap: jet
plotting data ...
figure size : [16.83, 12.00]
show reference point
writing /home/micromamba/data/test/WellsEnvD2T399/mintpy/geo/geo_velocity.png with dpi=600
Killed
Traceback (most recent call last):
File "test_smallbaselineApp.py", line 209, in <module>
main(sys.argv[1:])
File "test_smallbaselineApp.py", line 190, in main
test_isce=inps.test_isce)
File "test_smallbaselineApp.py", line 153, in test_dataset
raise RuntimeError('Test failed for example dataset {}'.format(dset_name))
RuntimeError: Test failed for example dataset WellsEnvD2T399 |
|
@yunjunz the |
|
@jhkennedy you are right. After increasing the resource limit for Docker from the default values, all tests passed for me as well. |
|
Morning! I'll go ahead and make these changes:
@yunjunz, for |
|
@forrestfwilliams yes, users do not need to access the two variables. |
- hard code MINTPY_HOME and PYAPS_HOME - install wget - update installation.md and docker.md
|
I've updated the dockerfile/docs. I also ran the tests in a container built from the new image and all tests passed! I'm re-uploading the image to docker and I'll let you know when it's done. |
|
New build is available at |
|
Oops sorry I missed these |
|
No worries at all. I am not a regular user of docker. @forrestfwilliams could you confirm if my modification of using ARG MINTPY_HOME and PYAPS_HOME in the DockerFile is reasonable? |
yunjunz
left a comment
There was a problem hiding this comment.
Looks all good to me.
Thank you @forrestfwilliams for updating this and @jhkennedy for the constructive review!
|
@yunjunz, I'd like to get @jhkennedy's opinion on this but my understanding is that |
jhkennedy
left a comment
There was a problem hiding this comment.
@forrestfwilliams @yunjunz ARG is something that could be overridden at build time, but is also a convenient and often used way to have constants/variables in the docker file, so I don't see any issues using it for that.
I only see one small problem is someone did specify different values at build time (the directory to clone into might not exist), but added a suggestion that would solve that.
Co-authored-by: Joseph H Kennedy <me@jhkennedy.org>
Co-authored-by: Joseph H Kennedy <me@jhkennedy.org>
|
The PR is ready to merge in my opinion. @forrestfwilliams please feel free to merge it if you think it's ready. |
|
Thanks @yunjunz ! I think we're ready to merge as well but I'm not sure I have the permissions to do so. |
|
I just sent you an invite. Could you try again after acceptance? |
|
Merged! Thanks for inviting me to join insarlab! |
|
Great to have you here! |
References issue #123
A recent build can be found at
https://hub.docker.com/repository/docker/forrestwilliams/mintpyReminders