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

Add a howto on determining packages content for an image #474

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jmunroe
Copy link

@jmunroe jmunroe commented Jul 13, 2023

No description provided.

@github-actions
Copy link
Contributor

Binder 👈 Try on Mybinder.org!
Binder 👈 Try on Pangeo GCP Binder!
Binder 👈 Try on Pangeo AWS Binder!

@jmunroe
Copy link
Author

jmunroe commented Jul 13, 2023

This PR is coming from

as part of the RTD documentation aimed at users of Pangeo Docker Images. It describes

  • How to find my current image tag
  • How to finding list of packages in any given tag
  • How to finding diff of packages between any two tags

@yuvipanda comments?

Copy link
Member

@yuvipanda yuvipanda left a comment

Choose a reason for hiding this comment

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

Thanks, @jmunroe! I've left some comments, mostly about reducing the amount of code here and being a bit more descriptive. Thank you for working on this!

docs/howto/determining-packages.md Show resolved Hide resolved
docs/howto/determining-packages.md Outdated Show resolved Hide resolved

Using GitHub the web [site](https://github.com/pangeo-data/pangeo-docker-images), select a particular tag from the branches/tag drop down menu. Navigate to the image and select the `packages.txt` file.

### Using the command line with Bash
Copy link
Member

Choose a reason for hiding this comment

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

IMO, just focusing on using the GitHub UI is good enough.

Copy link
Author

Choose a reason for hiding this comment

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

I think it depends on the user and what other tools they are used to using.

Copy link
Member

Choose a reason for hiding this comment

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

For sure! However, IMO this page is way too overwhelming now, with implementations in multiple languages that must be read and understood, copy pasted and run. It's also hard to keep middle-complexity code like this working fine over time, and there's no linting, etc (for example, there's a few linting violations in the python code). If we want to provide people code based support, I think the better way to do that is to make a python package they can quickly pip install and run, and that can have tests, etc. For now, let's get rid of the code here?

docs/howto/determining-packages.md Show resolved Hide resolved
docs/howto/determining-packages.md Outdated Show resolved Hide resolved
@jmunroe
Copy link
Author

jmunroe commented Jul 24, 2023

Hi @yuvipanda . Thanks for the feedback on the changes. I've tried to address your comments.

@jmunroe jmunroe requested a review from yuvipanda July 24, 2023 15:24
@jbusecke
Copy link
Collaborator

jbusecke commented Jul 25, 2023

Thank you for working on this @jmunroe and @yuvipanda. Reading this I came across this statement:

Given the LEAP hub exclusively uses pangeo images

Which is not strictly true currently (we offer the education image I made), and might become a lot less true now that we have the option to specify arbitrary images (which is amazing). I think this documentation here is great, but it is very specific to the pangeo-docker-images. Is there a more general way to list/diff any docker image? Or maybe there is some way to enable this to work at least for comparisons between pangeo images and ones created with the 2i2c template(i think this template is not currently generating the required packages.txt files, but that seems like something that could easily be implemented)?

To motivate this use-case a bit: I was planning on putting some time and energy into educating the LEAP community how to build their own images. I think that for the diverse needs of LEAP researchers it would often make sense to set up project-specific images maintained by single researchers/groups of researchers. I think upstreaming as much of this to 2i2c and other communities could be very nice.

@jmunroe
Copy link
Author

jmunroe commented Jul 26, 2023

I spoke with @yuvipanda -- I am going to pull out the code snippets and leave on the GitHub UI related instructions since that will end up being more maintainable.


Using GitHub the web [site](https://github.com/pangeo-data/pangeo-docker-images), select a particular tag from the branches/tag drop down menu. Navigate to the image and select the `packages.txt` file.

### Using the command line with Bash
Copy link
Member

Choose a reason for hiding this comment

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

For sure! However, IMO this page is way too overwhelming now, with implementations in multiple languages that must be read and understood, copy pasted and run. It's also hard to keep middle-complexity code like this working fine over time, and there's no linting, etc (for example, there's a few linting violations in the python code). If we want to provide people code based support, I think the better way to do that is to make a python package they can quickly pip install and run, and that can have tests, etc. For now, let's get rid of the code here?

- `pangeo-data/pangeo-notebook:tag`
- `quay.io/pangeo-data/pangeo-notebook:tag`

The first part is the registry (`docker.io`, which is often omitted, to mean DockerHub or `quay.io`).
Copy link
Member

Choose a reason for hiding this comment

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

The paranthetical sentence is confusing to me. Perhaps rewrite it into two sentences?


The next part the repository of the image itself (e.g. `pangeo-data/pangeo-notebook`)

The tag is the last part. Each image is also assigned a tag of the form `YYYY.MM.DD` indicating when it was last updated.
Copy link
Member

Choose a reason for hiding this comment

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

If you look at https://hub.docker.com/r/pangeo/pangeo-notebook/tags, this is not actually true. Tags can be one of:

  1. a date
  2. a commit hash
  3. latest or master (which we should recommend against using, as they change)


## How to find the list of available image tags:

Using GitHub [Pangeo Docker Images repo](https://github.com/pangeo-data/pangeo-docker-images), the list of select a particular tag from the branches/tag drop down menu. You can also get there directly using https://github.com/pangeo-data/pangeo-docker-images/tags .
Copy link
Member

Choose a reason for hiding this comment

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

The list of actual tags is either at dockerhub (https://hub.docker.com/r/pangeo/pangeo-notebook/tags) or quay.io's equivalent page. It's made with the git commit sha for each merged PR as well as dates, so it's not just the git tags.

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.

None yet

3 participants