2i2c-org / hub-user-image-template Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
This repository focuses on a more straightforward environment where people need a "vanilla" repo2docker setup in order to get the image running. This is super useful for most communities, though I think that there's an "advanced use-case" that we should cover as well, which is rolling your own Dockerfile.
The most obvious use-case that this enables is when you want to start with a different base image, which is not currently possible with repo2docker.
There are many communities that want to use other images as a base, since a lot of communities maintain base images that are meant to help with reproducibility. One non-python example is the rocker project in the R community.
As @sgibson91 noted, a good reference to use for inspiration would be the COESSING image repository, which does some more complex setup.
Another thing we should consider is that we might extend this repository to use more complex build files. For example, if people wanted an example using a postBuild
script to configure the Jupyter server. I think the question boils down to "how many use-cases require the use of a Dockerfile (like using a different base image) vs. how many can we just show off more complex repo2docker setups w/o a Dockerfile.
In a presentation by @yuvipanda, two types of image needs are considered:
environment.yml
using repo2dockerDockerfile
(build with or without repo2docker)I think there is a need for this template repo to clarify that repo2docker will respect a Dockerfile if its found, and build it without doing something fancy with high-level files. Further, that this is a reasonable use of this template if for example you want to add a single package like done in https://github.com/2i2c-org/scipy-notebook-with-nbgitpuller/blob/main/Dockerfile by adding a Dockerfile.
[...] this does not really reflect the instructions in the template repo of 2i2c (https://github.com/2i2c-org/hub-user-image-template) which mostly emphasizes a repo2docker build from an environment file. Correct me if I am wrong, but I believe inheriting from the Pangeo image requires using the Dockerfile.
I see a couple of options to make this easier for users:
- I make a leap specific template based on the 2i2c one that emphasizes the dockerfile rather than environment.yaml (but that seems like a bit of a smell since then we have to maintain two repos)
- we can work on the 2i2c side to tune the readme or maybe have different templates ? (I think ultimately working on this upstream is preferable).
I like the way you presented it in a way the “build from scratch” route is more advanced in a sense and might make more sense in some cases (e.g. I recently built a slim image for our project and keeping it small probably increases the dask worker spin up), but for most folks it’s just “I am missing package abc, let me add that really quick.
I am hearing from researchers at LEAP that they have trouble building images locally.
I realize this can be hard on a variety of machines (windows seems to cause trouble), so here is a suggestion:
Can we provide a docker image with docker, repo2docker, etc that we could run on a 2i2c hub, so that user can create and test their repo before pushing to github (and thus creating a potentially big image in the registry via the CI)?
Happy to help with testing this
I suspect the pins for the below are incorrect for latest repo2docker based images, this template should be updated - possibly as part of the image management work if it is going to continue to be the base for community images
- jupyter_contrib_nbextensions==0.5.1
# Required until https://github.com/jupyterhub/repo2docker/pull/1196 is merged
- jupyterhub-singleuser>=3.0,<4.0
No response
No response
A researcher at LEAP just noticed that the link in the readme https://docs.2i2c.org/en/latest/admin/howto/environment/hub-user-image-template-guide.html is not working anymore. Does anyone here know what the correct replacement is?
The links to the following bullet points in the README file don't work.
Also the links within Overall workflow
I'd suggest to remove or comment them if the documentation is WIP.
No response
Context
A common workflow for this action is:
main
Users are probably looking for the information in step 4, but it's a bit hard to find for people who don't know where to look. For example, you need to know to look for the "Update jupyter dependencies with repo2docker" section, and look to the bottom for the SHA. But what if somebody is using RStudio and not Jupyter? What if somebody doesn't realize that this is not only updating the dependencies but also pushing a new image? They may not know to click there.
Proposed solution
I think that we should add a final step to our action called something like "Print important information about new image".
This would print all of the necessary information a person might want in order to update their image. For example, the location of the registry, the new image tag, a single copy/pasteable string to put into the Configurator, etc.
Ideally this is something that we could put into the repo2docker action, but I'm not sure how feasible that is. I think we want these logs to be as easy to find as possible, and if they're embedded as a part of the repo2docker action logs it might be hard to find nonetheless.
An even cooler option (if it's possible) would be to do something similar to the "Test this on Binder" action, and have it post a comment to a PR like:
Finished building user image 🎉
If you merge this PR, the image will be here: `<URL to image on registry>`
The image name and tag will be: `<image-name>:<hash>`
No response
This is a template repo that many of our communities use to self-serve images for their hubs. We often make changes and improvements to this template, e.g., #10. But it's not clear to me how we push those improvements to the repositories already using this template.
Since this is a template repo, not a fork, trying to pull changes from this repo into a downstream repo in the "usual" way (say, by adding this repo as a template and running git fetch --all && git merge...
) will result in a trying to merge unrelated commit histories
error.
No response
No response
We should add a GitHub action to this template that automatically provides a "test on Binder" comment to new Pull Requests.
This would allow others to quickly test out images to make sure things are updated as expected (and, to make sure that an environment actually builds!)
The peddie image has a good example of this workflow in action: https://github.com/2i2c-org/peddie-image/blob/main/.github/workflows/binder.yaml
(Originally posted in 2i2c-org/infrastructure#493 (comment))
We have pins to the patch version in our environment.yml file, and when users clone that and make changes, I think that sets a bad precedence for them.
I've maintained docker images for several years, and having things pinned and not pinned has pro's and con's, but I'm a firm believer that we and people cloning this repo will end up benefiting from not pinning dependencies overall.
Indicate disagreement or agreement to take the action of unpinning the following dependencies entirely
jupyter_contrib_nbextensions==0.5.1
jupyterhub-singleuser>=3.0,<4.0
nbgitpuller=1.1.*
hub-user-image-template/environment.yml
Lines 7 to 14 in f9aff1e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.