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

Dockerfile for plotting maps in pace #106

Merged
merged 2 commits into from
Feb 10, 2022
Merged

Conversation

elynnwu
Copy link
Collaborator

@elynnwu elynnwu commented Feb 8, 2022

Purpose

In order to utilize fv3viz on daint for plotting cubed-sphere tile data as maps with cartopy, we use a docker image to install all the requirements. Daint can run this through sarus.

Infrastructure changes:

  • postprocessing.Dockerfile: this is the dockerfile used to make this image

Instead of installing fv3viz as a package, we install all the requirements and import the plotting function directly. To import cube plotting inside the container:

import sys
sys.path.append("/fv3net/external/fv3viz/")
from fv3viz import pcolormesh_cube

To plot on daint:

sarus pull elynnwu/pace:ubuntu18
srun -C gpu --partition=debug --account=# sarus run --mount=type=bind,source=/path/to/data/files,destination=/work elynnwu/pace:ubuntu18 python /work/example.py

Checklist

Before submitting this PR, please make sure:

  • You have followed the coding standards guidelines established at Code Review Checklist.
  • All relevant documentation has been updated or added (e.g. README, CONTRIBUTING docs)

Comment on lines 52 to 53
RUN git clone https://github.com/ai2cm/fv3net.git
RUN python -m pip install fv3net/external/vcm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd strongly recommend pinning the commit of fv3net, the repo gives no stability guarantees.

If this is relevant now or in the future, we push images of fv3net to GCR every commit. I believe the image name is us.gcr.io/vcm-ml/fv3net.

@elynnwu
Copy link
Collaborator Author

elynnwu commented Feb 10, 2022

launch jenkins

Copy link
Contributor

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Don't hesitate to put more comments on those to describe the why of the packages, this is often a good idea for future reference when requirements evolves

@elynnwu elynnwu merged commit 2b059ba into main Feb 10, 2022
@elynnwu elynnwu deleted the feature/post-processing-image branch February 10, 2022 18:06
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.

3 participants