I plan on fleshing out the docs in this repo a bit more to add relevant examples that illustrate practical use cases for using repo2docker
Have Actions comment with a Binder badge automatically on a PR, or with a chatops command that corresponds to the branch referenced in the PR. This is so reviewers can get easy access to a live notebook to review notebooks in the PR with just a click. Will look something like this:
Automatically launch notebooks when a PR is opened or with a chatops command on paperspace gradient.
A rough sketch is something like this
...
- name: build-environment
id: repo2docker
uses: machine-learning-apps/repo2docker-action
with:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: "hamelsmu/repo2docker-test"
- name: paperspace-deploy
id: paperspace
run: |
pip install gradient
gradient apiKey ${PAPERSPACE_TOKEN}
gradient jobs create --container ${IMAGE_NAME} --projectId ${PAPERSPACE_PROJECT_ID} --machineType K80 --ports 8888:8888
env:
PAPERSPACE_TOKEN: ${{ secrets.PAPERSPACE_TOKEN }}
PAPERSPACE_PROJECT_ID: ${{ secrets.PAPERSPACE_PROJECT_ID }}
IMAGE_NAME: ${{ steps.repo2docker.outputs.IMAGE_SHA_NAME }}
Launch repo2docker images on the major clouds: GCP, AWS, Azure and maybe FloydHub
A rough sketch looks like this on GCP - Google Cloud Functions
....
- uses: exelban/gcloud@master
env:
PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
IMAGE_NAME: ${{ steps.repo2docker.outputs.IMAGE_SHA_NAME }}
with:
args: --quiet beta run deploy notebook-serve-action --allow-unauthenticated --platform managed --region us-west1 --image $IMAGE_NAME
Examples with codespaces
@betatim, @willingc @neovintage any other ideas? The possibilities are so exciting, would love your ideas and thoughts!
The datasette
publish command [code] builds and pushes a container containing a datasette instance to various online cloud hosts.
Would it be useful to provide something like that either in this action or perhaps as part repo2docker
[@betatim].
I also wonder if that publish recipe could be extracted into another Github action, or in repo2docker context, a plugin style package that would make it ways to adopt in other projects? (datasette already uses a plugin model, for example. (Here are @simonw's initial notes on speccing out a plugin model.)
Following up on @psychemedia ’s suggestion
Does anyone have any favorite cloud providers or hosting services for Notebooks from containers other than Binder? The most use friendly ones I could find are Paperspace and Google Cloud mentioned above.
There are other severless paradigms but they don’t always fit notebooks very well. Would be cool if the major clouds offered Binder-as-a-service for private use cases.
Regarding the plugin idea this is very natural to the way Actions work and people can just stack actions together that achieve the workflow they want. I could make the “deploy notebook container to X” functionality a separate action so things stay modular...
@hamelsmu Not an enterprise application but it would be great to offer something like this integrated with GitHub classroom. One big use case for binder is hosting smaller workshops/meetings/tutorials using notebooks.
this would be so cool! JupyterLab actually has a little bot that adds Binder links to their PRs, maybe worth asking them how it works, e.g.: https://github.com/jupyterlab/jupyterlab/pull/8410#issuecomment-626757346
@choldgraf I already have something for this made that works on this repo, but I will take a look in case there are additional ideas there!
Most helpful comment
Following up on @psychemedia ’s suggestion
Does anyone have any favorite cloud providers or hosting services for Notebooks from containers other than Binder? The most use friendly ones I could find are Paperspace and Google Cloud mentioned above.
There are other severless paradigms but they don’t always fit notebooks very well. Would be cool if the major clouds offered Binder-as-a-service for private use cases.
Regarding the plugin idea this is very natural to the way Actions work and people can just stack actions together that achieve the workflow they want. I could make the “deploy notebook container to X” functionality a separate action so things stay modular...