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

Refine task of improving JupyterHub/Binder launch feature #1498

Open
agoose77 opened this issue Aug 28, 2024 · 2 comments
Open

Refine task of improving JupyterHub/Binder launch feature #1498

agoose77 opened this issue Aug 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@agoose77
Copy link
Contributor

agoose77 commented Aug 28, 2024

The scene of execution and launching of interactive content in MyST is complex (because the scene is complex!).

At the heart of this, I think there are three possible ways a user might want to provide launch and/or execution support for their content:

  1. Build image from content & environment repo (repo2docker) using a BinderHub
    • MyBinder.org
    • Generic BinderHub
  2. Build image from environment repo (repo2docker) using a BinderHub, and provision content from separate repo with nbgitpuller
  3. Use pre-existing image and provision with nbgitpuller on a JupyterHub
  4. Talk to pre-existing server without provisioning environment or content (manual)1

The above strategies should work for both Jupyter and JupyterLite distributions, both for execution (Thebe) and launch links.

I think our config probably needs a re-work to reflect this, and Thebe might need some more support to facilitate it.

Here's a sketch of how our config might change:

Existing configuration (simplified)

project:
  jupyter: undefined(false) | boolean | object | 'lite' | 'binder'
    lite: boolean
    binder: undefined(false) | boolean | object
      url: string (url)
      provider: string (git | gitlab | github | or custom)
      repo: string (org-name/repo-name | url | string)
      ref: string (undefined | string)
    server:  undefined | object
      url: string (url)
      token: string (any)

Suggested configuration (simplified)

project:
  jupyter:
    lite:
      # JupyterLite can build custom environment
      environment:
        url: string (url)
        provider: string (git | gitlab | github | or custom)
        repo: string (org-name/repo-name | url | string)
        ref: string (undefined | string)

      # Does it make sense to pull content at runtime? 
      # Binder does this because images are ephemeral
      # We have to build the env at build-time anyway
      # content:
      
    binder:
      # Binder can build images
      environment:
        url: string (url)
        provider: string (git | gitlab | github | or custom)
        repo: string (org-name/repo-name | url | string)
        ref: string (undefined | string)

      # nbgitpuller can provision image
      content:
        url: string (url)
        provider: string (git | gitlab | github | or custom)
        repo: string (org-name/repo-name | url | string)
        ref: string (undefined | string)
    hub:
      # Hubs can't build images
      # environment:

      # But can configure spawn
      options:
        ...

      # nbgitpuller can provision image
      content:
        url: string (url)
        provider: string (git | gitlab | github | or custom)
        repo: string (org-name/repo-name | url | string)
        ref: string (undefined | string)
    server: ...

Footnotes

  1. This only makes sense for Thebe, probably. But perhaps not.

@agoose77 agoose77 added the enhancement New feature or request label Aug 28, 2024
@agoose77
Copy link
Contributor Author

agoose77 commented Sep 3, 2024

  1. Rename content to provisioning :)
  2. Nest nbgitpuller as a provisioner type.

@agoose77
Copy link
Contributor Author

agoose77 commented Nov 25, 2024

This needs more work, but I don't have cycles in this very moment to undertake it.

More notes:

Hubs can actually support image building. There are actually the following deployment types:

  • binder
  • jupyterhub with static profile list
  • ephemeral jupyterhub (pre-configured image(s), no per-user auth, no storage)
  • jupyterhub with binderhub (c.f. jupyterhub-fancy-profiles)

Therefore, we might want to interrogate the deployment target to determine whether the defined launch information is valid.

Some targets can accept an image name, others an image definition. Some accept spawn args, others not?

Lite can use litegitpuller, so we should support that.
For now, we can only use a single provisioner. (nbgitpuller is limited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant